/**
 * ELITE NOTIFICATION SYSTEM v2.0
 * Sistema ultra-elegante de notificações - Nível Apple
 * Elite Financial System v10.0
 *
 * Design: Glassmorphism premium, animações delicadas, sombras suaves
 */

/* ============================================
   CONTAINER DE NOTIFICAÇÕES
   ============================================ */

.elite-notification-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: none;
    max-width: 420px;
}

/* ============================================
   NOTIFICAÇÃO INDIVIDUAL - BASE
   ============================================ */

.elite-notification {
    min-width: 360px;
    max-width: 420px;
    padding: 20px 24px;

    /* Glassmorphism Premium */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);

    /* Bordas e Sombras - Estilo Apple */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);

    pointer-events: auto;
    cursor: pointer;

    /* Layout */
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    overflow: hidden;

    /* Animação de entrada suave */
    animation: elite-notification-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;

    /* Transições suaves */
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Brilho sutil de fundo */
.elite-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    border-radius: 20px 20px 0 0;
}

/* ============================================
   ÍCONE DA NOTIFICAÇÃO - Redesenhado
   ============================================ */

.elite-notification-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    position: relative;

    /* Sombra suave do ícone */
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;

    /* Animação de pulso sutil */
    animation: elite-icon-pulse 2s ease-in-out infinite;
}

/* Brilho interno do ícone */
.elite-notification-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0) 50%
    );
    pointer-events: none;
}

.elite-notification-icon i {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ============================================
   CONTEÚDO DA NOTIFICAÇÃO
   ============================================ */

.elite-notification-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 2px;
}

.elite-notification-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    margin: 0;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.elite-notification-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin: 0;
    font-weight: 400;
    letter-spacing: -0.005em;
}

/* Link dentro da mensagem */
.elite-notification-link {
    color: #c4b5fd;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(196, 181, 253, 0.3);
    font-weight: 500;
}

.elite-notification-link:hover {
    color: #e0e7ff;
    border-bottom-color: rgba(224, 231, 255, 0.6);
}

/* ============================================
   BOTÃO DE FECHAR - Redesenhado
   ============================================ */

.elite-notification-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.elite-notification-close::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.elite-notification-close:hover::before {
    width: 100%;
    height: 100%;
}

.elite-notification-close:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: scale(1.05);
}

.elite-notification-close:active {
    transform: scale(0.95);
}

/* ============================================
   BARRA DE PROGRESSO - Redesenhada
   ============================================ */

.elite-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.5),
        rgba(255, 255, 255, 0.8)
    );
    border-radius: 0 0 20px 20px;
    animation: elite-notification-progress 5s linear forwards;
    box-shadow: 0 -1px 4px rgba(255, 255, 255, 0.3);
}

/* ============================================
   TIPOS DE NOTIFICAÇÃO - Cores Refinadas
   ============================================ */

/* SUCCESS - Verde Esmeralda */
.elite-notification.success {
    background: linear-gradient(
        135deg,
        rgba(16, 185, 129, 0.15) 0%,
        rgba(5, 150, 105, 0.10) 100%
    );
    border-color: rgba(16, 185, 129, 0.3);
}

.elite-notification.success .elite-notification-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow:
        0 4px 20px rgba(16, 185, 129, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.elite-notification.success .elite-notification-progress {
    background: linear-gradient(90deg, #10b981, #34d399);
    box-shadow: 0 -1px 8px rgba(16, 185, 129, 0.6);
}

/* ERROR - Vermelho Carmesim */
.elite-notification.error {
    background: linear-gradient(
        135deg,
        rgba(239, 68, 68, 0.15) 0%,
        rgba(220, 38, 38, 0.10) 100%
    );
    border-color: rgba(239, 68, 68, 0.3);
}

.elite-notification.error .elite-notification-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow:
        0 4px 20px rgba(239, 68, 68, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.elite-notification.error .elite-notification-progress {
    background: linear-gradient(90deg, #ef4444, #f87171);
    box-shadow: 0 -1px 8px rgba(239, 68, 68, 0.6);
}

/* WARNING - Âmbar Dourado */
.elite-notification.warning {
    background: linear-gradient(
        135deg,
        rgba(245, 158, 11, 0.15) 0%,
        rgba(217, 119, 6, 0.10) 100%
    );
    border-color: rgba(245, 158, 11, 0.3);
}

.elite-notification.warning .elite-notification-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow:
        0 4px 20px rgba(245, 158, 11, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.elite-notification.warning .elite-notification-progress {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 -1px 8px rgba(245, 158, 11, 0.6);
}

/* INFO - Azul Safira */
.elite-notification.info {
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.15) 0%,
        rgba(37, 99, 235, 0.10) 100%
    );
    border-color: rgba(59, 130, 246, 0.3);
}

.elite-notification.info .elite-notification-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow:
        0 4px 20px rgba(59, 130, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.elite-notification.info .elite-notification-progress {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    box-shadow: 0 -1px 8px rgba(59, 130, 246, 0.6);
}

/* ============================================
   ANIMAÇÃO DE SAÍDA
   ============================================ */

.elite-notification.elite-notification-exit {
    animation: elite-notification-fade-out 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* ============================================
   EFEITOS HOVER - Interatividade Delicada
   ============================================ */

.elite-notification:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.18),
        0 4px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.elite-notification:active {
    transform: translateY(-1px) scale(0.99);
}

/* ============================================
   TEMA CLARO - Design Invertido
   ============================================ */

.light-theme .elite-notification {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.9) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.03);
}

.light-theme .elite-notification::before {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0) 100%
    );
}

.light-theme .elite-notification-title {
    color: #111827;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.light-theme .elite-notification-message {
    color: rgba(17, 24, 39, 0.75);
}

.light-theme .elite-notification-link {
    color: #7c3aed;
    border-bottom-color: rgba(124, 58, 237, 0.3);
}

.light-theme .elite-notification-link:hover {
    color: #5b21b6;
    border-bottom-color: rgba(91, 33, 182, 0.5);
}

.light-theme .elite-notification-close {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.6);
}

.light-theme .elite-notification-close::before {
    background: rgba(0, 0, 0, 0.06);
}

.light-theme .elite-notification-close:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
    color: #111827;
}

.light-theme .elite-notification:hover {
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
}

/* ============================================
   ANIMAÇÕES - Suaves e Delicadas
   ============================================ */

@keyframes elite-notification-fade-in {
    0% {
        opacity: 0;
        transform: translateX(100%) translateY(-20px) scale(0.9);
        filter: blur(4px);
    }
    50% {
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
        filter: blur(0px);
    }
}

@keyframes elite-notification-fade-out {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0px);
    }
    100% {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
        filter: blur(2px);
    }
}

@keyframes elite-notification-progress {
    from {
        width: 100%;
        opacity: 1;
    }
    to {
        width: 0%;
        opacity: 0.5;
    }
}

@keyframes elite-icon-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* ============================================
   RESPONSIVO - Mobile Premium
   ============================================ */

@media (max-width: 768px) {
    .elite-notification-container {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        align-items: stretch;
    }

    .elite-notification {
        min-width: auto;
        max-width: none;
        width: 100%;
        padding: 18px 20px;
    }

    .elite-notification-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .elite-notification-title {
        font-size: 15px;
    }

    .elite-notification-message {
        font-size: 13px;
    }

    /* Animação mobile: vem de cima */
    @keyframes elite-notification-fade-in {
        0% {
            opacity: 0;
            transform: translateY(-100%) scale(0.95);
            filter: blur(4px);
        }
        50% {
            filter: blur(0px);
        }
        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
            filter: blur(0px);
        }
    }

    @keyframes elite-notification-fade-out {
        0% {
            opacity: 1;
            transform: translateY(0) scale(1);
            filter: blur(0px);
        }
        100% {
            opacity: 0;
            transform: translateY(-100%) scale(0.95);
            filter: blur(2px);
        }
    }
}

/* ============================================
   ACESSIBILIDADE
   ============================================ */

.elite-notification:focus {
    outline: none;
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.18),
        0 4px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08),
        0 0 0 3px rgba(99, 102, 241, 0.4);
}

.elite-notification-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    .elite-notification,
    .elite-notification-icon,
    .elite-notification-progress,
    .elite-notification-close {
        animation: none;
        transition: none;
    }

    .elite-notification {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* ============================================
   ESTADOS ESPECIAIS
   ============================================ */

/* Notificação sendo arrastada */
.elite-notification.dragging {
    cursor: grabbing;
    transform: scale(1.02);
    box-shadow:
        0 16px 64px rgba(0, 0, 0, 0.24),
        0 8px 16px rgba(0, 0, 0, 0.16);
}

/* Múltiplas notificações empilhadas */
.elite-notification-container:has(.elite-notification:nth-child(2)) .elite-notification:first-child {
    transform: translateY(0) scale(1);
}

.elite-notification-container:has(.elite-notification:nth-child(3)) .elite-notification:first-child {
    transform: translateY(0) scale(1);
}

/* ============================================
   PERFORMANCE OTIMIZADA
   ============================================ */

.elite-notification {
    will-change: transform, opacity;
    contain: layout style paint;
}

.elite-notification-icon {
    will-change: transform;
}
