/* =========================================== */
/* === Estilos Configuración Simulador === */
/* =========================================== */

/* Contenedor Principal */
.enarmango-simulador-config {
    max-width: 850px; /* Ancho máximo del contenedor general */
    margin: 30px auto; /* Centrado con margen */
    padding: 0 15px; /* Padding lateral para móviles */
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* Fuente limpia */
}

/* Estilo Base de las Tarjetas */
.config-card {
    background-color: #fff;
    border: 1px solid #e0e0e0; /* Borde más suave */
    border-radius: 8px;
    margin-bottom: 25px;
    padding: 25px 30px; /* Más padding */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07); /* Sombra sutil */
    position: relative; /* Para posicionar el botón 'Volver' */
}

.config-card h2,
.config-card h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
    text-align: center;
}
.config-card h3 {
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee; /* Separador bajo título avanzado */
}

/* --- Botón Volver (Esquina Superior Izquierda) --- */
.config-volver-link {
    position: absolute;
    top: 15px;
    left: 15px; /* Cambiado a izquierda */
    font-size: 0.9em;
    color: #666;
    text-decoration: none;
    padding: 5px;
    line-height: 1;
    z-index: 5;
    transition: color 0.2s ease;
}
.config-volver-link:hover,
.config-volver-link:focus {
    color: #0073aa;
    outline: none;
}


/* --- Grid Layout --- */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columnas por defecto */
    gap: 30px 40px; /* Espacio vertical y horizontal */
}

/* Grupos de Formulario (Label + Input/Select/Checkboxes) */
.config-group {
    margin-bottom: 20px; /* Espacio debajo de cada grupo */
}
.config-group:last-child {
    margin-bottom: 0; /* Sin margen extra al final de una columna */
}

/* Labels */
.config-label {
    display: block;
    font-weight: 500;
    color: #444;
    margin-bottom: 8px; /* Espacio entre label y control */
    font-size: 0.95em;
}

/* Inputs y Selects */
.config-input,
.config-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.config-input:focus,
.config-select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
    outline: none;
}

/* Select más grande para número de preguntas */
.config-select-large {
    font-size: 1.5em; /* Letra más grande */
    padding: 12px 15px; /* Más padding */
    font-weight: 600;
}

/* Notas debajo de campos */
.config-field-note {
    font-size: 0.8em;
    color: #777;
    margin-top: 8px;
    font-style: italic;
}

/* --- Checkboxes de Especialidad --- */
.config-checkbox-group {
    max-height: 180px; /* Limitar altura y añadir scroll */
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 5px;
    background-color: #fdfdfd;
}
.config-checkbox-label {
    display: block; /* Uno por línea */
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 0.95em;
    line-height: 1.4;
}
.config-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle; /* Alinear mejor con el texto */
}
.config-checkbox-label:last-child {
    margin-bottom: 0;
}


/* --- Sección de Etiquetas/Temas --- */
.config-autocomplete-list {
    border: 1px solid #ccc;
    border-top: none; /* Unir con el input */
    max-height: 120px;
    overflow-y: auto;
    padding: 0;
    margin: -1px 0 0 0; /* Solapar borde superior */
    list-style: none;
    background: #fff;
    position: relative; /* Para z-index si es necesario */
    z-index: 10;
    border-radius: 0 0 5px 5px; /* Redondear esquinas inferiores */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.config-autocomplete-list li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9em;
}
.config-autocomplete-list li:hover {
    background-color: #f0f0f0;
}

/* Contenedor de Chips */
.config-chips-container {
    margin-top: 10px;
    padding: 5px 0;
    min-height: 30px; /* Espacio aunque no haya chips */
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.config-chips-container .chip {
    background-color: #e0eaf3; /* Azul claro */
    color: #333;
    border-radius: 15px; /* Más redondeado */
    padding: 4px 10px 4px 12px;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.config-chips-container .chip button { /* Botón 'x' */
    border: none;
    background: none;
    color: #555;
    cursor: pointer;
    margin-left: 6px;
    padding: 0;
    font-size: 1.1em;
    line-height: 1;
}
.config-chips-container .chip button:hover {
    color: #000;
}

/* --- Botón Iniciar Simulador y Enlace Config Avanzada --- */
.config-col-action {
     display: flex;
     flex-direction: column;
     justify-content: center; /* Centrar verticalmente (aproximado) */
     align-items: center; /* Centrar horizontalmente */
     gap: 15px; /* Espacio entre botón y enlace */
     text-align: center;
}

.config-button {
    border: none;
    border-radius: 25px; /* Redondeado */
    padding: 12px 35px; /* Buen tamaño */
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-flex; /* Para alinear spinner */
    align-items: center;
    justify-content: center;
     line-height: normal;
}

.config-button-start {
    background-color: #4CAF50; /* Verde */
    color: white !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.config-button-start:hover {
    background-color: #45a049;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.config-button-start:disabled .spinner {
     display: inline-block; /* Mostrar spinner cuando está deshabilitado */
}


.config-toggle-link {
    color: #0073aa;
    text-decoration: none; /* Sin subrayado por defecto */
    cursor: pointer;
    font-size: 0.9em;
    transition: color 0.2s;
}
.config-toggle-link:hover {
    color: #005075;
    text-decoration: underline;
}

/* Spinner (reutilizado) */
.spinner {
  /* ... tus estilos spinner ... */
  display: none; /* Oculto por defecto, mostrar cuando :disabled */
}


/* --- Responsividad --- */
@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr; /* 1 columna en móvil */
        gap: 20px 0; /* Solo espacio vertical */
    }
    .config-card {
        padding: 20px; /* Menos padding */
    }
     .config-card h2 {
        font-size: 1.5em;
     }
     .config-card h3 {
        font-size: 1.2em;
     }
    .config-col-action {
         margin-top: 15px; /* Espacio antes del botón en móvil */
         gap: 10px;
    }
    .config-button {
        padding: 10px 25px;
        font-size: 1em;
    }
    .config-volver-link {
        top: 10px;
        left: 10px;
    }
    /* Aumentar altura de checkboxes si se siente apretado */
    .config-checkbox-group {
         /* max-height: 250px; */
    }
}