/* ================================================================
   08-NOTIFICACIONES.css - SISTEMA DE NOTIFICACIONES GRIZALUM
   Todo lo relacionado con alertas, toasts y notificaciones
   ================================================================ */

/* ===== CONTENEDOR PRINCIPAL DE NOTIFICACIONES ===== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: 100%;
    pointer-events: none;
}

/* ===== NOTIFICACIÓN BASE ===== */
.grizalum-notification {
    background: white;
    border-radius: 16px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(212, 175, 55, 0.1);
    border-left: 4px solid var(--peru-gold);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 320px;
    max-width: 450px;
    backdrop-filter: blur(20px);
    animation: slideInNotification 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    transition: all 0.3s ease;
}

/* Brillo sutil en la notificación */
.grizalum-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(212, 175, 55, 0.1), 
        transparent);
    transition: left 0.8s ease;
}

.grizalum-notification:hover::before {
    left: 100%;
}

.grizalum-notification:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(212, 175, 55, 0.2);
}

/* ===== TIPOS DE NOTIFICACIÓN ===== */
.grizalum-notification.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(16, 185, 129, 0.05) 100%);
}

.grizalum-notification.error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(239, 68, 68, 0.05) 100%);
}

.grizalum-notification.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(245, 158, 11, 0.05) 100%);
}

.grizalum-notification.info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(59, 130, 246, 0.05) 100%);
}

/* ===== CONTENIDO DE LA NOTIFICACIÓN ===== */
.notification-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.grizalum-notification:hover .notification-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Colores de iconos por tipo */
.grizalum-notification .notification-icon {
    background: linear-gradient(135deg, var(--peru-gold) 0%, var(--peru-gold-dark) 100%);
}

.grizalum-notification.success .notification-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

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

.grizalum-notification.warning .notification-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

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

.notification-text {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-message {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
    font-weight: 500;
}

/* ===== BOTÓN DE CERRAR ===== */
.notification-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.notification-close:hover {
    color: var(--gray-600);
    background: var(--gray-100);
    transform: scale(1.1);
}

/* ===== BARRA DE PROGRESO AUTOMÁTICA ===== */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--peru-gold);
    border-radius: 0 0 16px 16px;
    transform-origin: left;
    animation: notificationProgress 5s linear forwards;
}

.grizalum-notification.success .notification-progress {
    background: #10b981;
}

.grizalum-notification.error .notification-progress {
    background: #ef4444;
}

.grizalum-notification.warning .notification-progress {
    background: #f59e0b;
}

.grizalum-notification.info .notification-progress {
    background: #3b82f6;
}

@keyframes notificationProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ===== ANIMACIONES ===== */
@keyframes slideInNotification {
    from {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutNotification {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
        max-height: 100px;
        margin-bottom: 12px;
    }
    to {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

.grizalum-notification.removing {
    animation: slideOutNotification 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ===== BADGE DE NOTIFICACIONES ===== */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 12px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
    animation: bounceIn 0.5s ease;
    z-index: 1;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.notification-badge.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* ===== RESPONSIVE MÓVIL ===== */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        gap: 8px;
    }
    
    .grizalum-notification {
        padding: 16px 20px;
        border-radius: 12px;
        min-width: auto;
        max-width: none;
        width: 100%;
    }
    
    .notification-content {
        gap: 12px;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .notification-title {
        font-size: 14px;
    }
    
    .notification-message {
        font-size: 13px;
    }
    
    .notification-close {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

@media (max-width: 575px) {
    .notification-container {
        top: 5px;
        right: 5px;
        left: 5px;
    }
    
    .grizalum-notification {
        padding: 12px 16px;
    }
    
    .notification-content {
        gap: 10px;
    }
    
    .notification-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
    
    .notification-close {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

/* ===== UTILIDADES ESPECÍFICAS ===== */

/* Forzar por encima de otros elementos */
.notification-container {
    z-index: 10001 !important;
}

/* Auto-remove después de tiempo */
.grizalum-notification[data-auto-remove="true"] {
    --remove-delay: 5s;
}

/* Prevenir overflow en textos largos */
.notification-title,
.notification-message {
    word-break: break-word;
    hyphens: auto;
}
/* ===== PANEL DE NOTIFICACIONES DEL ADMIN ===== */
#panel-notificaciones-admin {
    position: fixed !important;
    top: 70px !important;
    right: 20px !important;
    width: 350px !important;
    background: rgba(30, 41, 59, 0.95) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    backdrop-filter: blur(20px) !important;
    z-index: 999999 !important;
    color: white !important;
    max-height: 400px !important;
    overflow-y: auto !important;
}

.notif-panel-header {
    padding: 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.notif-panel-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: white !important;
}

.btn-cerrar {
    background: none !important;
    border: none !important;
    color: rgba(255,255,255,0.7) !important;
    font-size: 20px !important;
    cursor: pointer !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.btn-cerrar:hover {
    background: rgba(255,255,255,0.1) !important;
    color: white !important;
}

.notif-panel-body {
    max-height: 320px !important;
    overflow-y: auto !important;
}

.notif-item {
    padding: 12px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

.notif-item:last-child {
    border-bottom: none !important;
}

.notif-item.no-leida {
    background: rgba(59,130,246,0.1) !important;
    border-left: 4px solid #3b82f6 !important;
}

.notif-item.leida {
    opacity: 0.7 !important;
}

.notif-content {
    flex: 1 !important;
}

.notif-content h4 {
    margin: 0 0 4px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: white !important;
}

.notif-content p {
    margin: 0 0 4px 0 !important;
    font-size: 13px !important;
    color: rgba(255,255,255,0.8) !important;
    line-height: 1.4 !important;
}

.notif-content small {
    font-size: 11px !important;
    color: rgba(255,255,255,0.5) !important;
}

.btn-marcar {
    background: #10b981 !important;
    border: none !important;
    color: white !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 14px !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
}

.btn-marcar:hover {
    background: #059669 !important;
    transform: scale(1.1) !important;
}

/* ===== BOTÓN DE NOTIFICACIONES MEJORADO ===== */
.notification-center {
    position: relative;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    border: none;
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(212, 175, 55, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
    overflow: visible;
    z-index: 100;
}

.notification-center:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 8px 20px rgba(212, 175, 55, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #e4c06a 0%, #d4af37 100%);
}

.notification-center:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.notification-center i {
    transition: all 0.3s ease;
}

.notification-center:hover i {
    transform: rotate(-10deg) scale(1.1);
}
/* BOTÓN NOTIFICACIONES - MÁXIMA PRIORIDAD */
#btnNotificaciones.grizalum-notif-btn.custom-gold-button,
html body .grizalum-notif-btn#btnNotificaciones,
.grizalum-notif-btn[id="btnNotificaciones"] {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    width: 48px !important;
    height: 48px !important;
    color: white !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25) !important;
}

#btnNotificaciones.grizalum-notif-btn:hover,
html body .grizalum-notif-btn#btnNotificaciones:hover {
    background: linear-gradient(135deg, #e4c06a 0%, #d4af37 100%) !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4) !important;
}

#btnNotificaciones i,
.grizalum-notif-btn#btnNotificaciones i {
    color: white !important;
}
