/* SEID Cuestionarios PMCF — Frontend */

.spmcf-container {
    max-width: 840px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2c2c2c;
    line-height: 1.6;
}

.spmcf-container h2 { font-size: 1.7em; color: #1a1a1a; margin-bottom: 0.3em; }
.spmcf-container h3 { font-size: 1.2em; color: #1a1a1a; margin-top: 1.5em; }
.spmcf-container h4 { font-size: 1.05em; margin: 0 0 10px 0; color: #1a1a1a; }

.spmcf-subtitulo { color: #666; font-size: 1.1em; margin: 5px 0 20px 0; }

.spmcf-intro {
    background: #f5f9fc;
    border-left: 4px solid #2271b1;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 4px;
}
.spmcf-intro p { margin: 0 0 8px 0; }
.spmcf-intro p:last-child { margin-bottom: 0; }
.spmcf-intro-adicional { background: #fff8e8; border-left-color: #e8a600; }

/* INDICE */
.spmcf-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin: 25px 0;
}
.spmcf-card {
    display: block;
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.spmcf-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
    transform: translateY(-2px);
}
.spmcf-card-desc { color: #666; margin: 4px 0 10px; font-size: 0.95em; }
.spmcf-card-poblacion { font-size: 0.85em; color: #555; margin: 10px 0; }
.spmcf-card-cta { color: #2271b1; font-weight: 600; font-size: 0.95em; }

.spmcf-notas { background: #fafafa; padding: 20px; border-radius: 6px; margin-top: 30px; }
.spmcf-notas ul { padding-left: 20px; }

/* FORMULARIO */
.spmcf-form { margin: 20px 0; }

.spmcf-seccion {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background: #fcfcfc;
}
.spmcf-seccion > legend {
    padding: 4px 12px;
    font-weight: 600;
    color: #2271b1;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1.05em;
}

.spmcf-pregunta { margin: 18px 0; }
.spmcf-pregunta > label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
}
.spmcf-pregunta input[type="text"],
.spmcf-pregunta input[type="number"],
.spmcf-pregunta input[type="date"],
.spmcf-pregunta textarea,
.spmcf-pregunta select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
    background: white;
}
.spmcf-pregunta input:focus,
.spmcf-pregunta textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}
.spmcf-pregunta textarea { resize: vertical; min-height: 70px; }

/* Grupos de radio/checkboxes */
.spmcf-grupo {
    border: none;
    padding: 0;
    margin: 0;
}
.spmcf-grupo > legend {
    font-weight: 500;
    margin-bottom: 8px;
    padding: 0;
}
.spmcf-check-label {
    display: block;
    padding: 7px 10px;
    margin: 3px 0;
    border-radius: 4px;
    cursor: pointer;
    background: white;
    border: 1px solid #e5e5e5;
    transition: background 0.1s;
}
.spmcf-check-label:hover { background: #f0f6fc; }
.spmcf-check-label input {
    margin-right: 8px;
    vertical-align: middle;
}
.spmcf-check-label span { vertical-align: middle; }

.spmcf-req { color: #c0392b; }

/* RGPD */
.spmcf-rgpd {
    background: #fff8e8;
    border-color: #e8a600;
}
.spmcf-rgpd > legend {
    background: #fff8e8;
    border-color: #e8a600;
    color: #8a4a00;
}

/* Botones */
.spmcf-acciones { margin-top: 25px; text-align: center; }

.spmcf-boton {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: all 0.15s;
}
.spmcf-boton-primario {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}
.spmcf-boton-primario:hover {
    background: #185a8c;
    border-color: #185a8c;
    color: white;
}
.spmcf-boton-secundario {
    background: white;
    color: #2271b1;
    border-color: #2271b1;
}

.spmcf-nota { font-size: 0.85em; color: #666; margin-top: 15px; text-align: center; }

/* Mensajes */
.spmcf-error {
    background: #fce8e8;
    border-left: 4px solid #c0392b;
    padding: 12px 18px;
    margin: 15px 0;
    border-radius: 4px;
}
.spmcf-error-inline {
    color: #c0392b;
    font-size: 0.9em;
    margin-top: 4px;
}

/* Honeypot: oculto para humanos */
.spmcf-hp-wrap {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Confirmación */
.spmcf-confirmacion { text-align: center; padding: 40px 20px; }
.spmcf-tick {
    font-size: 4em;
    color: #2e7d32;
    width: 90px;
    height: 90px;
    line-height: 90px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: #e8f5e9;
}
.spmcf-grande { font-size: 1.2em; color: #1a1a1a; font-weight: 500; }

/* Responsive */
@media (max-width: 600px) {
    .spmcf-container { padding: 20px 15px; }
    .spmcf-container h2 { font-size: 1.4em; }
    .spmcf-cards { grid-template-columns: 1fr; }
    .spmcf-seccion { padding: 15px; }
    .spmcf-boton { width: 100%; box-sizing: border-box; }
}
