/* Estilos para el sistema de notificaciones push */

/* Modal de configuración de notificaciones */
.notification-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.notification-settings-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.notification-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notification-settings-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-notification-settings {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-notification-settings:hover {
    background: rgba(255, 255, 255, 0.2);
}

.notification-settings-body {
    padding: 25px;
}

.notification-option {
    margin-bottom: 20px;
    padding: 15px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.notification-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.notification-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    margin-bottom: 5px;
}

.notification-option input[type="checkbox"] {
    transform: scale(1.2);
    accent-color: #667eea;
}

.notification-option p {
    margin: 0;
    color: #666;
    font-size: 14px;
    margin-left: 25px;
}

.notification-time {
    margin-bottom: 25px;
}

.notification-time label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.notification-time input[type="time"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.notification-time input[type="time"]:focus {
    border-color: #667eea;
}

.notification-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.test-btn,
.enable-btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.test-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

.enable-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.enable-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

/* Botón de configuración de notificaciones */
#notificationSettingsBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    position: relative;
}

#notificationSettingsBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#notificationSettingsBtn i {
    font-size: 16px;
}

/* Indicador de notificaciones */
#notificationSettingsBtn::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    border: 2px solid white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#notificationSettingsBtn.has-notifications::after {
    opacity: 1;
}

/* Estados de notificación */
.notification-option.enabled {
    border-color: #27ae60;
    background: #f0fff4;
}

.notification-option.disabled {
    opacity: 0.6;
    background: #f8f9fa;
}

/* Animaciones */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(10deg); }
    20%, 40%, 60%, 80% { transform: rotate(-10deg); }
}

#notificationSettingsBtn.ringing i {
    animation: bellRing 0.5s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
    .notification-settings-content {
        width: 95%;
        margin: 20px;
    }
    
    .notification-settings-body {
        padding: 20px;
    }
    
    .notification-actions {
        flex-direction: column;
    }
    
    .test-btn,
    .enable-btn {
        min-width: auto;
    }
}

/* Tema oscuro */
[data-theme="dark"] .notification-settings-content {
    background: #2d3748;
    color: white;
}

[data-theme="dark"] .notification-option {
    border-color: #4a5568;
    background: #4a5568;
}

[data-theme="dark"] .notification-option:hover {
    border-color: #4299e1;
    background: #2b6cb0;
}

[data-theme="dark"] .notification-option label {
    color: #e2e8f0;
}

[data-theme="dark"] .notification-option p {
    color: #a0aec0;
}

[data-theme="dark"] .notification-time label {
    color: #e2e8f0;
}

[data-theme="dark"] .notification-time input[type="time"] {
    background: #4a5568;
    border-color: #718096;
    color: white;
}

[data-theme="dark"] .notification-option.enabled {
    border-color: #48bb78;
    background: #2f855a;
}

[data-theme="dark"] .notification-option.disabled {
    background: #4a5568;
    opacity: 0.5;
}

/* Mejoras de accesibilidad */
.notification-option:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.notification-time input[type="time"]:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Estados de carga */
.notification-settings-content.loading {
    opacity: 0.7;
    pointer-events: none;
}

.notification-settings-content.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Notificaciones personalizadas */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    border-left: 4px solid #667eea;
}

.custom-notification.show {
    transform: translateX(0);
}

.custom-notification.success {
    border-left-color: #27ae60;
}

.custom-notification.error {
    border-left-color: #e74c3c;
}

.custom-notification.warning {
    border-left-color: #f39c12;
}

.custom-notification-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.custom-notification-message {
    font-size: 14px;
    color: #666;
    margin: 0;
}

[data-theme="dark"] .custom-notification {
    background: #2d3748;
    color: white;
}

[data-theme="dark"] .custom-notification-title {
    color: #e2e8f0;
}

[data-theme="dark"] .custom-notification-message {
    color: #a0aec0;
} 