/* ===== SISTEMA DE NOTIFICACIONES V2 - PALETA TIKTAK ===== */

/* Botón de notificaciones en header */
.notification-btn-v2 {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.notification-btn-v2:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-btn-v2.has-notifications {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    animation: bellShake 2s infinite;
}

.notification-btn-v2.floating {
    position: fixed;
    top: 20px;
    right: 80px;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Badge de contador */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    display: none;
}

.notification-badge.pulse {
    animation: pulse 0.5s ease-in-out;
}

/* Modal de notificaciones */
.notification-modal-v2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.notification-modal-v2.active {
    opacity: 1;
    visibility: visible;
}

.notification-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.notification-modal-v2.active .notification-modal-content {
    transform: translateY(0);
}

/* Header del modal - Paleta TikTak */
.notification-header {
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.notification-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.notification-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-mark-all-read {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-mark-all-read:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-close-notifications {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-close-notifications:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Cuerpo del modal */
.notification-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    max-height: 400px;
}

/* Lista de notificaciones */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: linear-gradient(90deg, rgba(79, 172, 254, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
    border-left: 4px solid #4facfe;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #4facfe;
    border-radius: 50%;
}

/* Icono de notificación */
.notification-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.notification-icon.blue {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.notification-icon.green {
    background: linear-gradient(135deg, #22C55E, #16A34A);
}

.notification-icon.red {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}

.notification-icon.purple {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.notification-icon.gray {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

/* Contenido de notificación */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    font-size: 16px;
    line-height: 1.4;
}

.notification-message {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

.notification-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.notification-new {
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
}

/* Acciones de notificación */
.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: 10px;
}

.btn-mark-read {
    background: #4facfe;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-mark-read:hover {
    background: #3d8bfe;
    transform: scale(1.1);
}

/* Estado vacío */
.no-notifications {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-notifications i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-notifications h4 {
    margin: 0 0 10px 0;
    color: #666;
}

.no-notifications p {
    margin: 0;
    font-size: 14px;
}

/* Loading */
.loading-notifications {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-notifications i {
    font-size: 32px;
    margin-bottom: 15px;
    color: #4facfe;
}

/* Footer del modal */
.notification-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.btn-load-more {
    background: #4facfe;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-load-more:hover {
    background: #3d8bfe;
    transform: translateY(-2px);
}

/* Indicador flotante */
.notification-floating-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
    cursor: pointer;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.notification-floating-indicator.show {
    transform: translateY(0);
    opacity: 1;
}

.indicator-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.indicator-text {
    font-weight: 600;
    font-size: 14px;
}

/* Toast de notificación */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 20px;
    max-width: 400px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10001;
    cursor: pointer;
}

.notification-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    font-size: 16px;
}

.toast-message {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: #f0f0f0;
    color: #666;
}

/* Modal de detalles */
.notification-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.notification-detail-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 70vh;
    overflow-y: auto;
}

.notification-detail-header {
    padding: 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-detail-header h3 {
    margin: 0;
    font-size: 20px;
}

.btn-close-detail {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-close-detail:hover {
    background: rgba(255, 255, 255, 0.2);
}

.notification-detail-body {
    padding: 25px;
}

.notification-extra-data {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.notification-detail-meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

/* Animaciones */
@keyframes bellShake {
    0%, 50%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
    .notification-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .notification-modal-v2.active .notification-modal-content {
        transform: translateY(0);
    }
    
    .notification-header {
        padding: 20px 15px;
        border-radius: 20px 20px 0 0;
    }
    
    .notification-header h3 {
        font-size: 18px;
        flex: 1;
    }
    
    .notification-actions {
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-mark-all-read {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .notification-item {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .notification-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin-right: 12px;
    }
    
    .notification-content {
        flex: 1;
        min-width: 200px;
    }
    
    .notification-title {
        font-size: 14px;
    }
    
    .notification-text {
        font-size: 13px;
    }
    
    .notification-time {
        font-size: 11px;
    }
    
    .notification-body {
        max-height: 60vh;
    }
    
    .notification-toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification-toast.show {
        transform: translateY(0);
    }
    
    .notification-floating-indicator {
        right: 10px;
        bottom: 80px;
    }
    
    .notification-btn-v2 {
        padding: 10px;
        font-size: 18px;
        min-width: 40px;
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .notification-modal-content {
        width: 100%;
        border-radius: 20px 20px 0 0;
    }
    
    .notification-header {
        padding: 15px;
    }
    
    .notification-header h3 {
        font-size: 16px;
    }
    
    .notification-item {
        padding: 12px;
    }
    
    .notification-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* Integración con el header existente */
.header .notification-btn-v2 {
    color: white;
}

.header .notification-btn-v2:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Estilos para diferentes temas */
.dark-theme .notification-modal-content {
    background: #2c3e50;
    color: white;
}

.dark-theme .notification-item {
    border-bottom-color: #34495e;
}

.dark-theme .notification-item:hover {
    background: #34495e;
}

.dark-theme .notification-title {
    color: white;
}

.dark-theme .notification-message {
    color: #bdc3c7;
}
