/* Sistema de Notificações Global - Canto Superior Direito */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 420px;
    width: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    pointer-events: auto;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
    min-width: 300px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification:hover {
    transform: translateX(-4px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.notification.fade-out {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* Tipos de notificação */
.notification-success {
    background: #f0fdf4;
    border-left-color: #16a34a;
    color: #166534;
}

.notification-error {
    background: #fef2f2;
    border-left-color: #dc2626;
    color: #991b1b;
}

.notification-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.notification-info {
    background: #eff6ff;
    border-left-color: #2563eb;
    color: #1e40af;
}

/* Ícone */
.notification-icon {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 2px;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.notification-success .notification-icon {
    color: #16a34a;
}

.notification-error .notification-icon {
    color: #dc2626;
}

.notification-warning .notification-icon {
    color: #f59e0b;
}

.notification-info .notification-icon {
    color: #2563eb;
}

/* Conteúdo */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-message {
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    opacity: 0.95;
}

/* Botão fechar */
.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    border-radius: 6px;
    color: inherit;
    opacity: 0.7;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

.notification-success .notification-close:hover {
    background: rgba(22, 163, 74, 0.1);
}

.notification-error .notification-close:hover {
    background: rgba(220, 38, 38, 0.1);
}

.notification-warning .notification-close:hover {
    background: rgba(245, 158, 11, 0.1);
}

.notification-info .notification-close:hover {
    background: rgba(37, 99, 235, 0.1);
}

/* Barra de progresso (contagem regressiva) */
.notification-timer-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

.notification-timer {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: timerProgress linear forwards;
    border-radius: 0 0 12px 12px;
}

.notification-success .notification-timer {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.notification-error .notification-timer {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.notification-warning .notification-timer {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.notification-info .notification-timer {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

/* Animações */
@keyframes slideInRight {
    from {
        transform: translateX(calc(100% + 20px));
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(calc(100% + 20px));
        opacity: 0;
    }
}

@keyframes timerProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Modo escuro */
.dark .notification {
    background: #1e293b;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.dark .notification-success {
    background: #064e3b;
    border-left-color: #10b981;
    color: #6ee7b7;
}

.dark .notification-error {
    background: #7f1d1d;
    border-left-color: #ef4444;
    color: #fca5a5;
}

.dark .notification-warning {
    background: #78350f;
    border-left-color: #fbbf24;
    color: #fde68a;
}

.dark .notification-info {
    background: #1e3a8a;
    border-left-color: #60a5fa;
    color: #93c5fd;
}

.dark .notification-timer-wrapper {
    background: rgba(255, 255, 255, 0.1);
}

.dark .notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Modal de Confirmação e Alerta */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.confirmation-dialog {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

.dark .confirmation-dialog {
    background: #1e293b;
    color: #f1f5f9;
}

.confirmation-btn-cancel:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

.dark .confirmation-btn-cancel:hover {
    background: #475569 !important;
    border-color: #64748b !important;
}

.confirmation-btn-confirm:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-btn-ok:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* Responsivo */
@media (max-width: 640px) {
    .notification-container {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 10px;
    }
    
    .notification {
        min-width: auto;
        width: 100%;
    }
    
    .confirmation-dialog {
        width: 95%;
        max-width: none;
    }
}
