/* Estilos para el módulo de Notificaciones Push */

.notification-toast {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--gray-200);
    padding: 1rem;
    margin-bottom: 1rem;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
    position: relative;
}

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

.notification-toast-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-900);
}

.notification-toast-header i {
    color: var(--primary);
    font-size: 1.25rem;
}

.notification-toast-body {
    color: var(--gray-700);
    font-size: 0.9rem;
    line-height: 1.5;
}

.notification-toast-body p {
    margin: 0;
}

.notification-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    max-height: 200px;
    object-fit: cover;
}

.notification-toast-time {
    margin-top: 0.5rem;
    color: var(--gray-500);
    font-size: 0.75rem;
}

.btn-close-toast {
    background: transparent;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    font-size: 1.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.btn-close-toast:hover {
    color: var(--gray-900);
}

/* Estados de notificaciones */
.notification-status-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 2px solid;
    margin-bottom: 1.5rem;
}

.notification-status-card.enabled {
    border-color: var(--success);
    background: rgba(40, 167, 69, 0.05);
}

.notification-status-card.denied {
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.05);
}

.notification-status-card.default {
    border-color: var(--warning);
    background: rgba(255, 193, 7, 0.05);
}

/* Formulario de notificaciones */
#notification-form .form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

#notification-form .form-control,
#notification-form .form-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.75rem;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#notification-form .form-control:focus,
#notification-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.1);
}

#notification-form textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Historial de notificaciones */
#notifications-history .table {
    font-size: 0.9rem;
}

#notifications-history .table thead {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

#notifications-history .table th {
    font-weight: 600;
    color: var(--gray-700);
    padding: 1rem;
    white-space: nowrap;
}

#notifications-history .table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    color: var(--gray-700);
}

#notifications-history .table tbody tr:hover {
    background: var(--gray-50);
}

/* Botón de activar notificaciones */
.btn-enable-notifications {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-enable-notifications:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-enable-notifications:active {
    transform: translateY(0);
}

/* Alerta de estado de FCM */
.fcm-status-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.fcm-status-alert.success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.fcm-status-alert.warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.fcm-status-alert.danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.fcm-status-alert i {
    font-size: 1.25rem;
}

/* Token display */
.token-display {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    word-break: break-all;
    color: var(--gray-700);
    margin-top: 0.5rem;
}

/* Preview de notificación */
.notification-preview {
    background: var(--gray-50);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1rem;
}

.notification-preview-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.notification-preview-content {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Estadísticas de notificaciones */
.notification-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.notification-stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.notification-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.notification-stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Animaciones para estados de envío */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(5, 150, 105, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    .notification-toast {
        max-width: 100%;
        margin: 0.5rem;
    }
    
    #notifications-history .table {
        font-size: 0.8rem;
    }
    
    #notifications-history .table th,
    #notifications-history .table td {
        padding: 0.5rem;
    }
    
    .notification-stats {
        grid-template-columns: 1fr;
    }
}

/* Modo oscuro (si se implementa) */
@media (prefers-color-scheme: dark) {
    .notification-toast {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .notification-toast-header {
        border-bottom-color: #4a5568;
        color: #e2e8f0;
    }
    
    .notification-toast-body {
        color: #cbd5e0;
    }
    
    .btn-close-toast:hover {
        color: #e2e8f0;
    }
}
