/* Sistema de Notificações Unificado - IA Fundo */

/* ===== TOAST NOTIFICATIONS (PRINCIPAL) ===== */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
    min-width: 300px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.notification-toast.hide {
    transform: translateX(400px);
    opacity: 0;
}

/* ===== CONTEÚDO DAS NOTIFICAÇÕES ===== */
.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
    width: 100%;
}

.notification-content i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

#notification-message {
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
    flex: 1;
}

/* ===== VARIANTES DE NOTIFICAÇÃO ===== */
/* Success */
.notification-toast.success-toast,
.notification-success {
    background: linear-gradient(135deg, var(--success-color), var(--success-dark, #1e7e34));
    color: white;
    border-color: var(--success-border, rgba(66, 184, 131, 0.3));
    border-left: 4px solid var(--secondary-color);
    box-shadow: 0 4px 20px rgba(66, 184, 131, 0.25);
}

.notification-toast.success-toast .notification-content i,
.notification-success .notification-content i {
    color: white;
}

/* Error */
.notification-toast.error-toast,
.notification-error {
    background: linear-gradient(135deg, var(--danger-color), #c82333);
    color: white;
    border-color: var(--danger-border, rgba(220, 53, 69, 0.3));
    border-left: 4px solid #ff4757;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.25);
}

.notification-toast.error-toast .notification-content i,
.notification-error .notification-content i {
    color: white;
}

/* Info */
.notification-toast.info-toast,
.notification-info {
    background: linear-gradient(135deg, var(--info-color), #0056b3);
    color: white;
    border-color: var(--info-border, rgba(0, 191, 255, 0.3));
    border-left: 4px solid var(--tertiary-color);
    box-shadow: 0 4px 20px rgba(0, 191, 255, 0.25);
}

.notification-toast.info-toast .notification-content i,
.notification-info .notification-content i {
    color: white;
}

/* Warning */
.notification-toast.warning-toast,
.notification-warning {
    background: linear-gradient(135deg, var(--warning-color), #e0a800);
    color: #212529;
    border-color: var(--warning-border, rgba(255, 193, 7, 0.3));
    border-left: 4px solid #ffc107;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.25);
}

.notification-toast.warning-toast .notification-content i,
.notification-warning .notification-content i {
    color: #212529;
}

/* ===== NOTIFICAÇÕES ALTERNATIVAS (DASHBOARD STYLE) ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 350px;
    min-width: 280px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid var(--success-color);
    background: var(--success-bg);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
    background: var(--danger-bg);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
    background: var(--warning-bg);
}

.notification.info {
    border-left: 4px solid var(--info-color);
    background: var(--info-bg);
}

.notification i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification.success i {
    color: var(--success-color);
}

.notification.error i {
    color: var(--danger-color);
}

.notification.warning i {
    color: var(--warning-color);
}

.notification.info i {
    color: var(--info-color);
}

.notification span {
    font-weight: 500;
    color: var(--text-color);
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    margin-left: 0.5rem;
    font-size: 1.1rem;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

/* ===== NOTIFICAÇÕES PARA PAINEL ESPECÍFICO ===== */
.painel-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    color: var(--text-color);
}

.painel-notification.show {
    transform: translateX(0);
}

.painel-notification.success {
    border-left: 4px solid var(--success-color);
}

.painel-notification.error {
    border-left: 4px solid var(--danger-color);
}

/* ===== NOTIFICAÇÕES DE GALERIA (BOTTOM RIGHT) ===== */
.gallery-notification,
.gallery-notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(25, 25, 35, 0.95);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    padding: 12px 20px;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    max-width: 350px;
}

.gallery-notification.show,
.gallery-notification-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.gallery-notification.error-toast,
.gallery-notification-toast.error-toast {
    background: rgba(220, 53, 69, 0.95);
}

.gallery-notification.success-toast,
.gallery-notification-toast.success-toast {
    background: rgba(66, 184, 131, 0.95);
}

.gallery-notification .notification-content,
.gallery-notification-toast .notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-notification i,
.gallery-notification-toast i {
    font-size: 1.3rem;
}

/* ===== NOTIFICAÇÕES DE COMANDOS (SPECIALIZED) ===== */
.command-notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    transition: all 0.3s ease;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.command-notification-toast.show {
    transform: translateX(0);
}

.command-notification-toast.success-toast {
    background: linear-gradient(135deg, var(--success-color), var(--success-dark, #1e7e34));
    color: white;
    border-left: 4px solid var(--secondary-color);
}

.command-notification-toast.error-toast {
    background: linear-gradient(135deg, var(--danger-color), #c82333);
    color: white;
    border-left: 4px solid #ff4757;
}

.command-notification-toast.info-toast {
    background: linear-gradient(135deg, var(--info-color), #0056b3);
    color: white;
    border-left: 4px solid var(--tertiary-color);
}

.command-notification-toast.warning-toast {
    background: linear-gradient(135deg, var(--warning-color), #e0a800);
    color: #212529;
    border-left: 4px solid #ffc107;
}

/* ===== ANIMAÇÕES ESPECÍFICAS ===== */
@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

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

/* ===== STACK DE NOTIFICAÇÕES ===== */
.notification-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.notification-stack > * {
    pointer-events: auto;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .notification-toast,
    .notification,
    .command-notification-toast {
        max-width: calc(100vw - 2rem);
        min-width: auto;
        left: 1rem;
        right: 1rem;
        transform: translateY(-100px);
    }
    
    .notification-toast.show,
    .notification.show,
    .command-notification-toast.show {
        transform: translateY(0);
    }
    
    .notification-toast.hide,
    .notification-toast:not(.show) {
        transform: translateY(-100px);
    }
    
    .gallery-notification,
    .gallery-notification-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }
}

@media (max-width: 576px) {
    .notification-toast,
    .notification,
    .command-notification-toast {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .notification-content {
        gap: 0.5rem;
    }
    
    .notification-content i {
        font-size: 1.1rem;
    }
    
    .gallery-notification,
    .gallery-notification-toast {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* ===== TEMA CLARO ===== */
:root[data-theme="light"] .notification-toast,
:root[data-theme="light"] .notification,
:root[data-theme="light"] .painel-notification,
html.light-theme .notification-toast,
html.light-theme .notification,
html.light-theme .painel-notification,
body.light-theme .notification-toast,
body.light-theme .notification,
body.light-theme .painel-notification {
    background: #ffffff;
    border-color: #dee2e6;
    color: #212529;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .gallery-notification,
:root[data-theme="light"] .gallery-notification-toast,
html.light-theme .gallery-notification,
html.light-theme .gallery-notification-toast,
body.light-theme .gallery-notification,
body.light-theme .gallery-notification-toast {
    background: rgba(255, 255, 255, 0.95);
    color: #212529;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* ===== PRINT STYLES ===== */
@media print {
    .notification-toast,
    .notification,
    .painel-notification,
    .gallery-notification,
    .gallery-notification-toast,
    .command-notification-toast {
        display: none !important;
    }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    .notification-toast,
    .notification,
    .painel-notification,
    .gallery-notification,
    .gallery-notification-toast,
    .command-notification-toast {
        transition: none !important;
        animation: none !important;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .notification-toast,
    .notification,
    .painel-notification,
    .command-notification-toast {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }
    
    .notification-toast.success-toast,
    .notification.success {
        border-color: #00ff00;
        background: #e6ffe6;
    }
    
    .notification-toast.error-toast,
    .notification.error {
        border-color: #ff0000;
        background: #ffe6e6;
    }
}

/* ===== UTILIDADES ===== */
.notification-fade-in {
    animation: notificationSlideIn 0.3s ease forwards;
}

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

.notification-slide-up {
    animation: notificationSlideUp 0.3s ease forwards;
}

.notification-slide-down {
    animation: notificationSlideDown 0.3s ease forwards;
}

/* ===== OVERLAY PARA MÚLTIPLAS NOTIFICAÇÕES ===== */
.notifications-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    padding: 1rem;
    overflow: hidden;
}

.notifications-overlay .notification-toast {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 0.5rem;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .notifications-overlay {
        width: 100vw;
        left: 0;
        right: 0;
        padding: 0.5rem;
    }
}