/* assets/css/notificacoes.css - Estilos para Toast Notifications v3.0 */

/* Container de Toasts */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Toast Individual */
.toast {
    background: #1a1a1a;
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: 16px;
    min-width: 320px;
    max-width: 400px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: all;
    cursor: default;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Ícone do Toast */
.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

/* Conteúdo */
.toast-content {
    flex: 1;
    padding-top: 2px;
}

.toast-title {
    font-size: 14px;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    color: #CCCCCC;
    line-height: 1.4;
}

/* Botão Fechar */
.toast-close {
    background: none;
    border: none;
    color: #999999;
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFD700;
}

/* Tipos de Toast */
.toast-message {
    border-left: 4px solid #FFD700;
}

.toast-message .toast-icon {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
}

.toast-notification {
    border-left: 4px solid #FFA500;
}

.toast-notification .toast-icon {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: #000;
}

.toast-success {
    border-left: 4px solid #00C851;
}

.toast-success .toast-icon {
    background: linear-gradient(135deg, #00C851 0%, #00A041 100%);
    color: #fff;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-error .toast-icon {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
}

.toast-warning {
    border-left: 4px solid #FFA500;
}

.toast-warning .toast-icon {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: #000;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-info .toast-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #fff;
}

/* Toast Clicável */
.toast[style*="cursor: pointer"]:hover {
    border-color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* Animação de Pulso para Badges */
@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(255, 215, 0, 0);
    }
}

/* Badge com data-type para JavaScript */
.sidebar-badge {
    animation: pulse-badge 2s ease-in-out infinite;
}

.sidebar-badge[data-type="mensagens"],
.sidebar-badge[data-type="notificacoes"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading Spinner (para futuro uso) */
.toast-loading {
    border-left: 4px solid #17a2b8;
}

.toast-loading .toast-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #fff;
}

.toast-loading .toast-icon i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* Tema Escuro (já é padrão, mas definindo explicitamente) */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #1a1a1a;
        border-color: #2a2a2a;
    }
}

/* Acessibilidade */
.toast:focus-within {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* Suporte para múltiplos toasts empilhados */
.toast-container .toast:nth-child(1) {
    z-index: 100;
}

.toast-container .toast:nth-child(2) {
    z-index: 99;
    opacity: 0.9;
    transform: scale(0.98) translateY(-5px);
}

.toast-container .toast:nth-child(3) {
    z-index: 98;
    opacity: 0.8;
    transform: scale(0.96) translateY(-10px);
}

.toast-container .toast:nth-child(n+4) {
    display: none;
}
