/**
 * EHERO ReCaptcha v3 Styles
 * Estilos para la interfaz del módulo reCaptcha v3
 */

/* Indicador de carga */
.ehero-recaptcha-loading {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
    margin: 10px 0;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    font-size: 14px;
}

.ehero-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: ehero-spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes ehero-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensajes de error */
.ehero-recaptcha-error {
    margin: 10px 0;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

/* Badge reCaptcha */
.ehero-recaptcha-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 11px;
    color: #495057;
    text-decoration: none;
    margin-top: 5px;
}

.ehero-recaptcha-badge:hover {
    background-color: #dee2e6;
    text-decoration: none;
    color: #495057;
}

.ehero-recaptcha-badge::before {
    content: "🛡️";
    margin-right: 4px;
}

/* Configuración del módulo en admin */
.ehero-admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ehero-admin-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 300;
}

.ehero-admin-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.ehero-config-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ehero-config-section .panel-heading {
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 15px 20px;
    font-weight: 600;
    color: #333;
}

.ehero-config-section .panel-body {
    padding: 20px;
}

/* Ayuda contextual */
.ehero-help-block {
    background-color: #e7f3ff;
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

.ehero-help-block h4 {
    margin: 0 0 8px 0;
    color: #1976d2;
    font-size: 14px;
    font-weight: 600;
}

.ehero-help-block p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
}

.ehero-help-block ol {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.ehero-help-block li {
    margin-bottom: 4px;
    font-size: 13px;
}

/* Indicador de estado */
.ehero-status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ehero-status-indicator.enabled {
    background-color: #d4edda;
    color: #155724;
}

.ehero-status-indicator.disabled {
    background-color: #f8d7da;
    color: #721c24;
}

.ehero-status-indicator::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
}

.ehero-status-indicator.enabled::before {
    background-color: #28a745;
}

.ehero-status-indicator.disabled::before {
    background-color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .ehero-recaptcha-loading {
        flex-direction: column;
        text-align: center;
    }
    
    .ehero-spinner {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .ehero-admin-header {
        padding: 15px;
        text-align: center;
    }
    
    .ehero-admin-header h2 {
        font-size: 20px;
    }
}

/* Integración con temas PrestaShop */
.bootstrap .ehero-recaptcha-loading {
    display: flex;
}

.bootstrap .ehero-recaptcha-error {
    margin-bottom: 15px;
}

/* Mejoras de accesibilidad */
.ehero-recaptcha-loading[aria-hidden="true"] {
    display: none;
}

.ehero-recaptcha-error[role="alert"] {
    position: relative;
}

/* Animaciones suaves */
.ehero-recaptcha-loading,
.ehero-recaptcha-error {
    transition: opacity 0.3s ease-in-out;
}

.ehero-recaptcha-loading.fade-in,
.ehero-recaptcha-error.fade-in {
    opacity: 1;
}

.ehero-recaptcha-loading.fade-out,
.ehero-recaptcha-error.fade-out {
    opacity: 0;
}

/* Soporte para modo oscuro */
@media (prefers-color-scheme: dark) {
    .ehero-recaptcha-loading {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .ehero-help-block {
        background-color: #2a4365;
        border-left-color: #3182ce;
        color: #e2e8f0;
    }
    
    .ehero-help-block h4 {
        color: #63b3ed;
    }
}
