/* ==============================================
   ESTILOS CONSOLIDADOS - NUEVA ENCUESTA RC COMPLETA
   ============================================== */

/* ==============================================
   VARIABLES CSS PERSONALIZADAS
   ============================================== */
:root {
    /* Colores */
    --survey-primary: #2e7d32;
    --survey-accent: #4caf50;
    --survey-background: #f5f5f5;
    --survey-surface: #ffffff;
    --survey-text: #212121;
    --survey-text-secondary: #757575;
    --survey-border: #e0e0e0;
    --survey-border-focus: #4caf50;
    --survey-error: #d32f2f;
    --survey-success: #4caf50;
    --survey-warning: #ff9800;
    
    /* Espaciado */
    --survey-spacing-xs: 4px;
    --survey-spacing-sm: 8px;
    --survey-spacing-md: 16px;
    --survey-spacing-lg: 24px;
    --survey-spacing-xl: 32px;
    --survey-spacing-2xl: 48px;
    
    /* Radio de borde */
    --survey-radius-sm: 4px;
    --survey-radius-md: 8px;
    --survey-radius-lg: 12px;
    --survey-radius-full: 9999px;
    
    /* Sombras */
    --survey-shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --survey-shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --survey-shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    
    /* Tipografía */
    --survey-font-size-xs: 0.75rem;
    --survey-font-size-sm: 0.875rem;
    --survey-font-size-base: 1rem;
    --survey-font-size-lg: 1.125rem;
    --survey-font-size-xl: 1.25rem;
    --survey-font-size-2xl: 1.5rem;
    --survey-font-size-3xl: 2rem;
    
    --survey-font-weight-normal: 400;
    --survey-font-weight-medium: 500;
    --survey-font-weight-semibold: 600;
    --survey-font-weight-bold: 700;
    
    --survey-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Transiciones */
    --survey-transition-fast: 0.2s ease;
    --survey-transition-medium: 0.3s ease;
    --survey-transition-slow: 0.5s ease;
    
    /* Dimensiones */
    --survey-max-width: 800px;
    --survey-progress-height: 8px;

        /* ==============================================
            Estilos específicos de encuesta
            ============================================== */    
    /* Espaciado entre componentes de formulario */
    --survey-question-gap: 24px;     /* Entre preguntas */
    --survey-option-gap: 8px;        /* Entre opciones */
    --survey-option-padding: 11px;   /* Padding opciones */
    --survey-label-gap: 16px;        /* Entre label y campo */

    /* Dimensiones de elementos */
    --survey-input-size: 16px;                          /* Tamaño checkboxes/radios */
    --survey-input-min-height: 48px;                    /* Altura mínima opciones */
    --survey-textarea-min-height: 100px;                /* Altura mínima textareas */
    --survey-border-width: 2px;                         /* Grosor de bordes */
    --survey-hover-offset: 4px;                         /* Desplazamiento en hover */

    /* Ranking específico */
    --survey-ranking-item-gap: 10px;                    /* Gap entre items */
    --survey-ranking-wrapper-gap: 12px;                 /* Gap entre columnas */
    --survey-ranking-item-padding-v: 8px;               /* Padding vertical items */
    --survey-ranking-item-padding-h: 12px;              /* Padding horizontal items */
    --survey-ranking-number-width: 40px;                /* Ancho columna números */
    --survey-ranking-number-min-height: 40px;           /* Altura mínima números */
    --survey-ranking-border-radius: 8px;                /* Radio de borde ranking */

    /* Ajustes específicos */
    --survey-header-margin-adjust: -15px;               /* Ajuste margen header */
    --survey-input-margin-micro: 2px;                   /* Márgenes micro inputs */
}

/* ==============================================
   ESTILOS BASE Y RESET
   ============================================== */
.survey-container * {
    box-sizing: border-box;
}

/* ==============================================
   CONTENEDOR PRINCIPAL
   ============================================== */
.survey-container {
    max-width: var(--survey-max-width);
    margin: 0 auto;
    padding: var(--survey-spacing-lg);
    font-family: var(--survey-font-family);
    color: var(--survey-text) !important;
    background-color: var(--survey-background) !important;
    min-height: 100vh;
}

/* Forzar colores en el body para toda la página */
body {
    background-color: var(--survey-background) !important;
    color: var(--survey-text) !important;
}

/* Asegurar que todos los labels mantengan el color oscuro */
label {
    color: var(--survey-text) !important;
}

/* Forzar colores en todos los inputs tipo radio y checkbox */
input[type="radio"],
input[type="checkbox"] {
    /*background-color: #ffffff !important;
    border-color: #e0e0e0 !important;*/
}

/* ==============================================
   HEADER DE PÁGINA
   ============================================== */
.page-header {
    margin-top: var(--survey-header-margin-adjust);
    text-align: center;
    margin-bottom: var(--survey-question-gap);
    animation: fadeIn 0.5s ease;
}

.segment-info {
    font-size: var(--survey-font-size-sm);
    color: var(--survey-text-secondary);
    margin-bottom: var(--survey-spacing-sm);
    font-weight: var(--survey-font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-header h2 {
    color: var(--survey-accent);
    margin: 0;
    font-size: var(--survey-font-size-2xl);
    font-weight: var(--survey-font-weight-bold);
}

/* ==============================================
   BARRA DE PROGRESO
   ============================================== */
.progress-container {
    margin-bottom: var(--survey-spacing-xl);
}

.progress-bar {
    width: 100%;
    height: var(--survey-progress-height);
    background-color: var(--survey-border);
    border-radius: var(--survey-radius-sm);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #45a049 100%);
    transition: width var(--survey-transition-medium);
    border-radius: var(--survey-radius-sm);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.progress-text {
    text-align: center;
    font-size: var(--survey-font-size-sm);
    color: var(--survey-text-secondary);
    margin-top: var(--survey-spacing-sm);
    font-weight: var(--survey-font-weight-medium);
}

/* ==============================================
   CONTENEDOR DE CONTENIDO
   ============================================== */
.content-container {
    background-color: var(--survey-surface);
    padding: var(--survey-spacing-xl);
    border-radius: var(--survey-radius-lg);
    box-shadow: var(--survey-shadow-sm);
    margin-bottom: var(--survey-spacing-lg);
    animation: slideUp 0.5s ease;
}

/* ==============================================
   GRUPOS DE FORMULARIO
   ============================================== */
.form-group {
    margin-bottom: var(--survey-question-gap);
}

.form-group:last-child {
    margin-bottom: var(--survey-option-gap);
}

.field-label {
    display: block;
    margin-bottom: var(--survey-label-gap);
    font-weight: var(--survey-font-weight-medium);
    color: var(--survey-text);
    font-size: var(--survey-font-size-sm);
}

.field-help {
    font-size: var(--survey-font-size-sm);
    color: var(--survey-text-secondary);
    margin-top: var(--survey-spacing-xs);
}

/* ==============================================
   ELEMENTOS DE FORMULARIO
   ============================================== */
select,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: var(--survey-option-padding);
    border: var(--survey-border-width) solid var(--survey-border);
    border-radius: var(--survey-radius-md);
    font-size: var(--survey-font-size-base);
    transition: all var(--survey-transition-fast);
    background-color: var(--survey-surface) !important;
    color: var(--survey-text) !important;
    font-family: var(--survey-font-family);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select:hover,
input[type="text"]:hover,
input[type="number"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
textarea:hover {
    border-color: #bdbdbd;
}

select:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;

    border-color: var(--survey-border);
    background-color: var(--survey-surface);
}

textarea {
    min-height: var(--survey-textarea-min-height);
    resize: vertical;
    line-height: 1.5;
}

/* ==============================================
   RADIO BUTTONS
   ============================================== */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--survey-option-gap);
}

.radio-option {
    display: flex;
    align-items: center;
    padding: var(--survey-option-padding);
    border: var(--survey-border-width) solid var(--survey-border);
    border-radius: var(--survey-radius-md);
    cursor: pointer;
    transition: all var(--survey-transition-fast);
    background-color: var(--survey-surface) !important;
    color: var(--survey-text) !important;
}

.radio-option:hover {
    border-color: var(--survey-accent);
    background-color: #f8fdf8;
    transform: translateX(var(--survey-hover-offset));
}

.radio-option input[type="radio"] {
    margin-right: var(--survey-label-gap);
    width: var(--survey-input-size);
    height: var(--survey-input-size);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 0;
    margin-bottom: var(--survey-option-gap);
}

.radio-option.selected {
    border-color: var(--survey-accent);
    background-color: #e8f5e9;
}

/* ==============================================
   OTREE RADIO BUTTONS STYLING
   ============================================== */

/* Labels principales (hijos directos) de formfields */
._formfield > label {
    font-size: var(--survey-font-size-lg);
    font-weight: var(--survey-font-weight-medium);
    color: var(--survey-text);
    margin-bottom: var(--survey-spacing-md);
    display: block;
}

._formfield .form-check {
    display: flex;
    align-items: flex-start;
    padding: var(--survey-option-padding);
    margin-bottom: var(--survey-option-gap);
    border: var(--survey-border-width) solid var(--survey-border);
    border-radius: var(--survey-radius-md);
    cursor: pointer;
    transition: all var(--survey-transition-fast);
    background-color: var(--survey-surface) !important;
    color: var(--survey-text) !important;
    position: relative;
    min-height: var(--survey-input-min-height);
    gap: var(--survey-label-gap);
}

._formfield .form-check:hover {
    border-color: var(--survey-accent);
    background-color: #f8fdf8;
    transform: translateX(var(--survey-hover-offset));
}

._formfield .form-check-input {
    width: var(--survey-input-size);
    height: var(--survey-input-size);
    cursor: pointer;
    z-index: 2;
    position: relative;
    margin: var(--survey-input-margin-micro) 0 0 0;
    flex-shrink: 0;
}

._formfield .form-check label {
    cursor: pointer;
    flex: 1;
    margin: 0;
    z-index: 2;
    position: relative;
    font-size: var(--survey-font-size-base);
    line-height: 1.4;
    padding-left: 0;
}

/* Hacer todo el contenedor clickeable */
._formfield .form-check::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    cursor: pointer;
}

._formfield .form-check-input:checked + label,
._formfield .form-check:has(input:checked) {
    border-color: var(--survey-accent);
    background-color: #e8f5e9;
}

/* ==============================================
   FORMFIELD_INPUT_HIDDEN - SOPORTE PARA CAMPOS OCULTOS
   ============================================== */
/* Asegurar que formfield_input_hidden sea visible */
.formfield_input_hidden {
    display: block !important;
}

/* Ocultar campos *_orden_inicial completamente */
.formfield_input_hidden ._formfield:has(textarea[name*="_orden_inicial"]),
.formfield_input_hidden ._formfield:has(input[name*="_orden_inicial"]) {
    display: none !important;
}

/* Ocultar directamente los campos orden_inicial por si el selector :has no funciona */
.formfield_input_hidden input[name*="_orden_inicial"],
.formfield_input_hidden textarea[name*="_orden_inicial"] {
    display: none !important;
}

/* Ocultar también el div padre del textarea orden_inicial */
.formfield_input_hidden .mb-3:has(textarea[name*="_orden_inicial"]) {
    display: none !important;
}

/* Aplicar estilos correctos para radio buttons dentro de formfield_input_hidden */
.formfield_input_hidden ._formfield .form-check {
    display: flex;
    align-items: flex-start;
    padding: var(--survey-option-padding);
    margin-bottom: var(--survey-option-gap);
    border: var(--survey-border-width) solid var(--survey-border);
    border-radius: var(--survey-radius-md);
    cursor: pointer;
    transition: all var(--survey-transition-fast);
    background-color: var(--survey-surface) !important;
    color: var(--survey-text) !important;
    position: relative;
    min-height: var(--survey-input-min-height);
    gap: var(--survey-label-gap);
}

.formfield_input_hidden ._formfield .form-check:hover {
    border-color: var(--survey-accent);
    background-color: #f8fdf8;
    transform: translateX(var(--survey-hover-offset));
}

.formfield_input_hidden ._formfield .form-check-input {
    width: var(--survey-input-size);
    height: var(--survey-input-size);
    cursor: pointer;
    z-index: 2;
    position: relative;
    margin: var(--survey-input-margin-micro) 0 0 0;
    flex-shrink: 0;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Asegurar que todos los radio buttons sean visibles */
.formfield_input_hidden input[type="radio"] {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: var(--survey-input-size) !important;
    height: var(--survey-input-size) !important;
    margin-right: var(--survey-label-gap) !important;
    background-color: white !important;
    border: 2px solid #ccc !important;
    border-radius: 50% !important;
    appearance: auto !important;
    -webkit-appearance: radio !important;
    -moz-appearance: radio !important;
}

/* Estado checked para radio buttons */
.formfield_input_hidden input[type="radio"]:checked {
    background-color: var(--survey-accent) !important;
    border-color: var(--survey-accent) !important;
}

/* Eliminar outline azul del navegador */
.formfield_input_hidden input[type="radio"]:focus,
.formfield_input_hidden input[type="radio"]:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Eliminar outline en form-check también */
.formfield_input_hidden ._formfield .form-check:focus,
.formfield_input_hidden ._formfield .form-check:focus-within {
    outline: none !important;
}

.formfield_input_hidden ._formfield .form-check label {
    cursor: pointer;
    flex: 1;
    margin: 0;
    z-index: 2;
    position: relative;
    font-size: var(--survey-font-size-base);
    line-height: 1.4;
    padding-left: 0;
}

/* Hacer todo el contenedor clickeable */
.formfield_input_hidden ._formfield .form-check::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    cursor: pointer;
}

.formfield_input_hidden ._formfield .form-check-input:checked + label,
.formfield_input_hidden ._formfield .form-check:has(input:checked) {
    border-color: var(--survey-accent);
    background-color: var(--survey-surface);
}

/* Remover margin bottom del último _formfield para evitar espacio extra */
.formfield_input_hidden ._formfield:last-child {
    margin-bottom: var(--survey-option-gap);
}

/* ==============================================
   CHECKBOXES
   ============================================== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: var(--survey-option-padding);
    border: var(--survey-border-width) solid var(--survey-border);
    border-radius: var(--survey-radius-md);
    cursor: pointer;
    transition: all var(--survey-transition-fast);
    background-color: var(--survey-surface) !important;
    color: var(--survey-text) !important;
    margin-bottom: var(--survey-option-gap);
}

.checkbox-item:last-child {
    margin-bottom: 0;
}

.checkbox-item:hover {
    border-color: var(--survey-accent);
    background-color: #f8fdf8;
    transform: translateX(var(--survey-hover-offset));
}

.checkbox-item input[type="checkbox"] {
    margin-right: var(--survey-label-gap);
    width: var(--survey-input-size);
    height: var(--survey-input-size);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.checkbox-item.selected {
    border-color: var(--survey-accent);
    background-color: #e8f5e9;
}

.checkbox-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Campo de entrada para "Otro" */
.other-input-container {
    margin-top: var(--survey-spacing-sm);
    margin-left: var(--survey-spacing-xl);
    animation: slideDown 0.3s ease-out;
}

.other-input {
    width: 100%;
    padding: var(--survey-option-padding);
    border: var(--survey-border-width) solid var(--survey-border);
    border-radius: var(--survey-radius-md);
    font-size: var(--survey-font-size-base);
    font-family: inherit;
    transition: all var(--survey-transition-fast);
    background-color: var(--survey-surface);
}

.other-input:focus {
    outline: none;
    border-color: var(--survey-border-focus);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.other-input::placeholder {
    color: var(--survey-text-secondary);
    font-style: italic;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contador de selección */
.selection-counter {
    text-align: center;
    margin-top: var(--survey-spacing-md);
    padding: var(--survey-spacing-sm) var(--survey-spacing-md);
    background-color: #f5f5f5;
    border-radius: var(--survey-radius-md);
    font-size: var(--survey-font-size-sm);
    color: var(--survey-text-secondary);
}

.selection-counter.warning {
    background-color: #fff3e0;
    color: #f57c00;
    font-weight: var(--survey-font-weight-medium);
}


/* ==============================================
   RANKING / DRAG AND DROP
   ============================================== */
.ranking-container .ranking-wrapper {
    display: grid;
    grid-template-columns: var(--survey-ranking-number-width) 1fr; /* columna de números + columna de items */
    gap: var(--survey-ranking-wrapper-gap);
    align-items: start;
}

/* Columna fija de números */
.ranking-container .numbers {
    display: grid;
    gap: var(--survey-ranking-item-gap);
}

.ranking-container .numbers div {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    background: #22c55e;
    border-radius: var(--survey-ranking-border-radius);
    height: auto;
    min-height: var(--survey-ranking-number-min-height);
    transition: height 0.2s ease;
}

/* Lista ordenable */
.ranking-container .ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--survey-ranking-item-gap);
}

.ranking-container .item {
    background: #f3f4f6;
    padding: var(--survey-ranking-item-padding-v) var(--survey-ranking-item-padding-h);
    border-radius: var(--survey-ranking-border-radius);
    box-shadow: 0 1px 3px rgba(2, 235, 72, 0.08);
    display: flex;
    align-items: center;
    gap: var(--survey-ranking-item-gap);
    cursor: grab;
}

.ranking-container .drag-handle {
    color: #6b7280;
    font-size: 16px;
    user-select: none;
}

.ranking-container .item:active {
    cursor: grabbing;
}

.ranking-container .sortable-chosen {
    background: #e0f2fe;
}

.ranking-container .sortable-ghost {
    opacity: 0.6;
}

/* Ocultar solo el input del formfield */
.formfield_input_hidden input,
.formfield_input_hidden textarea {
    display: none;
}

/* ==============================================
   ESCALA LIKERT
   ============================================== */
.likert-scale {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: var(--survey-spacing-xs);
    margin: var(--survey-spacing-lg) 0;
}

.likert-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--survey-option-padding);
    border: var(--survey-border-width) solid var(--survey-border);
    border-radius: var(--survey-radius-md);
    cursor: pointer;
    transition: all var(--survey-transition-fast);
    text-align: center;
    min-height: 80px;
}

.likert-option:hover {
    border-color: var(--survey-accent);
    background-color: #f8fdf8;
    transform: translateY(-var(--survey-input-margin-micro));
}

.likert-option.selected {
    border-color: var(--survey-accent);
    background-color: #e8f5e9;
}

.likert-value {
    font-size: var(--survey-font-size-xl);
    font-weight: var(--survey-font-weight-bold);
    color: var(--survey-accent);
    margin-bottom: var(--survey-spacing-xs);
}

.likert-label {
    font-size: var(--survey-font-size-xs);
    color: var(--survey-text-secondary);
}

/* ==============================================
   NAVEGACIÓN
   ============================================== */
.navigation-container {
    text-align: center;
    margin-top: var(--survey-spacing-lg);
    padding-top: var(--survey-spacing-lg);
    border-top: 1px solid var(--survey-border);
}

.otree-btn-next,
.btn-primary {
    background-color: var(--survey-accent);
    color: white;
    padding: var(--survey-spacing-md) var(--survey-spacing-xl);
    border: none;
    border-radius: var(--survey-radius-md);
    font-size: var(--survey-font-size-base);
    font-weight: var(--survey-font-weight-medium);
    cursor: pointer;
    transition: all var(--survey-transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--survey-shadow-sm);
}

.otree-btn-next:hover,
.btn-primary:hover {
    background-color: #388e3c;
    transform: translateY(-var(--survey-input-margin-micro));
    box-shadow: var(--survey-shadow-md);
}

.otree-btn-next:active,
.btn-primary:active {
    transform: translateY(0);
}

.otree-btn-next:disabled,
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ==============================================
   PÁGINAS ESPECIALES
   ============================================== */

/* Página de consentimiento */
.consent-container {
    background-color: var(--survey-surface);
    padding: var(--survey-spacing-2xl);
    border-radius: var(--survey-radius-lg);
    box-shadow: var(--survey-shadow-md);
}

.consent-title {
    color: var(--survey-accent);
    text-align: center;
    margin-bottom: var(--survey-spacing-xl);
    font-size: var(--survey-font-size-3xl);
}

.consent-content {
    line-height: 1.8;
    color: var(--survey-text);
    margin-bottom: var(--survey-spacing-xl);
}

.consent-content h3 {
    color: var(--survey-primary);
    margin-top: var(--survey-spacing-lg);
    margin-bottom: var(--survey-spacing-md);
}

.consent-content ul {
    margin-left: var(--survey-spacing-lg);
    line-height: 1.8;
}

.consent-actions {
    display: flex;
    justify-content: center;
    gap: var(--survey-spacing-lg);
    margin-top: var(--survey-spacing-xl);
}

/* Página de agradecimiento */
.completion-container {
    text-align: center;
    padding: var(--survey-spacing-2xl);
}

.completion-icon {
    font-size: 4rem;
    color: var(--survey-success);
    margin-bottom: var(--survey-spacing-lg);
}

.completion-title {
    color: var(--survey-accent);
    font-size: var(--survey-font-size-3xl);
    margin-bottom: var(--survey-spacing-md);
}

.completion-message {
    color: var(--survey-text-secondary);
    font-size: var(--survey-font-size-lg);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ==============================================
   ANIMACIONES
   ============================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ==============================================
   MENSAJES Y ALERTAS
   ============================================== */
.alert {
    padding: var(--survey-option-padding);
    border-radius: var(--survey-radius-md);
    margin-bottom: var(--survey-question-gap);
    border-left: var(--survey-hover-offset) solid;
}

.alert-info {
    background-color: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

.alert-success {
    background-color: #e8f5e9;
    border-color: var(--survey-success);
    color: #2e7d32;
}

.alert-warning {
    background-color: #fff3e0;
    border-color: var(--survey-warning);
    color: #e65100;
}

.alert-error {
    background-color: #ffebee;
    border-color: var(--survey-error);
    color: #c62828;
}

/* ==============================================
   UTILIDADES
   ============================================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-sm { margin-top: var(--survey-spacing-sm); }
.mt-md { margin-top: var(--survey-spacing-md); }
.mt-lg { margin-top: var(--survey-spacing-lg); }
.mt-xl { margin-top: var(--survey-spacing-xl); }

.mb-sm { margin-bottom: var(--survey-spacing-sm); }
.mb-md { margin-bottom: var(--survey-spacing-md); }
.mb-lg { margin-bottom: var(--survey-spacing-lg); }
.mb-xl { margin-bottom: var(--survey-spacing-xl); }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */
@media (max-width: 768px) {
    .survey-container {
        padding: var(--survey-spacing-sm);
    }
    
    .content-container {
        padding: var(--survey-spacing-lg);
        border-radius: var(--survey-radius-md);
    }
    
    .page-header h2 {
        font-size: var(--survey-font-size-xl);
    }
    
    .field-label {
        font-size: var(--survey-font-size-base);
    }
    
    .likert-scale {
        flex-direction: column;
    }
    
    .likert-option {
        min-height: auto;
        flex-direction: row;
        justify-content: center;
    }
    
    .likert-value {
        margin-right: var(--survey-spacing-sm);
        margin-bottom: var(--survey-option-gap);
    }
    
    .consent-actions {
        flex-direction: column;
    }
    
    .otree-btn-next,
    .btn-primary {
        width: 100%;
        padding: var(--survey-spacing-md);
    }
}

@media (max-width: 480px) {
    .survey-container {
        padding: var(--survey-spacing-sm);
    }
    
    .content-container {
        padding: var(--survey-spacing-md);
    }
    
    .segment-info {
        font-size: var(--survey-font-size-xs);
    }
    
    .progress-text {
        font-size: var(--survey-font-size-xs);
    }
}


/* ==============================================
   FIX PARA COLOR GRIS EN INPUTS
   ============================================== */
/* Forzar fondo blanco y borde verde en inputs - Override para problema de color gris */
select,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
textarea {
    background-color: #ffffff !important;
    color: #212121 !important;
    border: 2px solid #4caf50 !important;
}

/* ==============================================
   ACCESIBILIDAD
   ============================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

*:focus-visible {
    outline: 2px solid var(--survey-accent);
    outline-offset: 2px;
}

/* Alto contraste */
@media (prefers-contrast: high) {
    :root {
        --survey-border: #000000;
        --survey-text: #000000;
        --survey-background: #ffffff;
    }
}

/* ==============================================
   PRINT STYLES
   ============================================== */
@media print {
    .navigation-container,
    .progress-container {
        display: none;
    }
    
    .survey-container {
        max-width: 100%;
        padding: 0;
    }
    
    .content-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}