/* =====================================================================
   Formularios públicos — estándar único de inputs
   ---------------------------------------------------------------------
   Se activa con la clase .fp en <body> (ver layouts/template.blade.php,
   @section('body_class', 'fp') en cada vista de formulario).
   Se carga DESPUÉS de walmart.css: todo va bajo .fp para pisar las reglas
   viejas (.input-container, .select-container, .likert) sin editarlas,
   porque walmart.css también lo usa layouts/app.
   ===================================================================== */

.fp {
    --fp-primary: #0058A3;
    --fp-primary-dark: #003D73;
    --fp-primary-soft: #E6F1FB;
    --fp-focus: #0071CE;
    --fp-focus-ring: rgba(0, 113, 206, .18);
    --fp-cta: #FFC220;
    --fp-cta-hover: #F2B200;
    --fp-cta-text: #041E42;
    --fp-title: #041E42;
    --fp-text: #1F2937;
    --fp-muted: #5B6472;
    --fp-border: #C9D1DB;
    --fp-line: #E3E7ED;
    --fp-bg: #F3F5F8;
    --fp-error: #B42318;
    --fp-error-soft: #E8A39C;
    --fp-error-bg: #FFFBFA;
    --fp-disabled-bg: #F3F5F8;
    --fp-disabled-text: #6B7480;

    --fp-radius: 10px;
    --fp-radius-card: 16px;
    --fp-h: 48px;
    --fp-pad-x: 14px;
    --fp-gap-label: 6px;
    --fp-gap-row: 20px;
    --fp-gap-group: 28px;
    --fp-card-pad: 32px;

    background: var(--fp-bg);
    color: var(--fp-text);
}

/* ---------- Contenedor del formulario ---------- */
.fp .panel {
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: var(--fp-radius-card);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
    padding: var(--fp-card-pad) calc(var(--fp-card-pad) - 15px);
    margin-bottom: 32px;
}

.fp .fp-required-note {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--fp-muted);
}

.fp .fp-required-note .fp-req { margin: 0 2px; }

/* ---------- Título de grupo (item.group) ---------- */
.fp .box-title {
    margin: var(--fp-gap-group) 0 var(--fp-gap-row);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fp-line);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--fp-title);
}

.fp .form-body .box-title:first-of-type { margin-top: 0; }
/* grupo sin nombre en el admin: sin línea separadora suelta */
.fp .box-title:has(> b:empty) { display: none; }
.fp .box-title b { font-weight: inherit; }

/* Separación entre filas: la pone el contenedor, no cada input */
.fp .form-group { margin-bottom: var(--fp-gap-row); }
.fp .input-container,
.fp .select-container { margin-bottom: 0; }
/* Descripciones vacías que las vistas pintan igual (<label class=""></label>): no deben sumar espacio */
.fp .form-group label:empty { display: none; }

/* Practicing envuelve el input en .input-group (flex): que no lo ponga en fila */
.fp .form-group > .input-group { display: block; }

/* ---------- Campo: label · control · ayuda/error ---------- */
.fp .fp-field {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.fp .fp-label,
.fp .select-container label.fp-label {
    position: static;
    display: block;
    max-width: none;
    margin: 0 0 var(--fp-gap-label);
    padding: 0;
    background: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--fp-text);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.fp .fp-req {
    color: var(--fp-error);
    margin-left: 3px;
    font-weight: 700;
}

.fp .fp-control {
    display: block;
    width: 100%;
    height: var(--fp-h);
    margin: 0;
    padding: 0 var(--fp-pad-x);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    background: #fff;
    color: var(--fp-text);
    font-family: inherit;
    font-size: 16px; /* 16px evita el zoom automático de iOS */
    line-height: 1.4;
    box-shadow: none;
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.fp textarea.fp-control {
    height: auto;
    min-height: 104px;
    padding: 12px var(--fp-pad-x);
    resize: vertical;
}

.fp .fp-control::placeholder { color: #8A93A0; opacity: 1; }

.fp .fp-control:focus {
    outline: none;
    border-color: var(--fp-focus);
    box-shadow: 0 0 0 4px var(--fp-focus-ring);
}

.fp .fp-control:disabled,
.fp .fp-control[readonly] {
    background: var(--fp-disabled-bg);
    border-color: var(--fp-line);
    color: var(--fp-disabled-text);
}

.fp .fp-help {
    display: block;
    margin-top: var(--fp-gap-label);
    font-size: 13px;
    line-height: 1.45;
    color: var(--fp-muted);
}

/* ---------- Error ---------- */
.fp .fp-error {
    display: block;
    margin-top: var(--fp-gap-label);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--fp-error);
}

.fp .fp-field.has-error > .fp-label,
.fp .fp-field.has-error .select-container label.fp-label { color: var(--fp-error); }

.fp .fp-control.is-invalid,
.fp .has-error .fp-control {
    border-color: var(--fp-error);
    background: var(--fp-error-bg);
    box-shadow: 0 0 0 1px var(--fp-error);
}

.fp .fp-control.is-invalid:focus,
.fp .has-error .fp-control:focus {
    box-shadow: 0 0 0 1px var(--fp-error), 0 0 0 5px rgba(180, 35, 24, .15);
}

/* Mensaje general del formulario (message_info) */
.fp .fp-alert {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #F5C2BE;
    border-radius: var(--fp-radius);
    background: #FEF3F2;
    color: #7A1A12;
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Select (Tom Select v2) ---------- */
.fp .fp-select { width: 100%; }

.fp .ts-wrapper.single,
.fp .ts-wrapper.multi { padding: 0 !important; background: transparent; }

.fp .ts-wrapper .ts-control,
.fp .ts-wrapper.multi.has-items .ts-control,
.fp .ts-wrapper.single .ts-control {
    min-height: var(--fp-h);
    padding: 6px 40px 6px var(--fp-pad-x);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    background: #fff;
    box-shadow: none;
    font-size: 16px;
    line-height: 1.4;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* flecha */
.fp .ts-wrapper .ts-control::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid var(--fp-muted);
    border-bottom: 2px solid var(--fp-muted);
    transform: rotate(45deg);
    pointer-events: none;
}

.fp .ts-wrapper.dropdown-active .ts-control::after { margin-top: -2px; transform: rotate(-135deg); }

.fp .ts-wrapper .ts-control > input {
    font-size: 16px;
    min-width: 4rem;
}

.fp .ts-wrapper .ts-control > input::placeholder { color: #8A93A0; }

.fp .ts-wrapper.focus .ts-control {
    border-color: var(--fp-focus);
    box-shadow: 0 0 0 4px var(--fp-focus-ring);
}

/* opción elegida: varias = chips; una sola = texto plano */
.fp .ts-wrapper.multi .ts-control > div.item {
    margin: 0;
    padding: 4px 10px;
    border: 0;
    border-radius: 99px;
    background: var(--fp-primary-soft);
    color: var(--fp-primary-dark);
    font-size: 14px;
    font-weight: 500;
}

.fp .ts-wrapper.fp-ts-one .ts-control > div.item {
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--fp-text);
    font-size: 16px;
    font-weight: 400;
}

.fp .ts-wrapper .ts-control .item .font-medium,
.fp .ts-dropdown .font-medium { font-weight: inherit; }

.fp .ts-dropdown {
    margin-top: 4px;
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    box-shadow: 0 8px 24px rgba(16, 24, 40, .12);
    overflow: hidden;
    font-size: 15px;
    z-index: 20;
}

.fp .ts-dropdown .option {
    padding: 11px var(--fp-pad-x);
    color: var(--fp-text);
}

.fp .ts-dropdown .active {
    background: var(--fp-primary-soft);
    color: var(--fp-primary-dark);
}

.fp .ts-dropdown .no-results { padding: 11px var(--fp-pad-x); color: var(--fp-muted); }

/* select en error: el wrapper .validador-previo.is-invalid envuelve al componente */
.fp .is-invalid .ts-wrapper .ts-control,
.fp .has-error .ts-wrapper .ts-control {
    border-color: var(--fp-error);
    background: var(--fp-error-bg);
    box-shadow: 0 0 0 1px var(--fp-error);
}

.fp .ts-wrapper.disabled .ts-control {
    background: var(--fp-disabled-bg);
    border-color: var(--fp-line);
    opacity: 1;
}

/* ---------- Fecha (Pikaday) ---------- */
.fp .fp-field .pika-single { font-family: inherit; }

/* ---------- Archivo ---------- */
.fp .fp-file {
    height: auto;
    min-height: var(--fp-h);
    padding: 8px;
    font-size: 15px;
    cursor: pointer;
}

.fp .fp-file::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--fp-primary-soft);
    color: var(--fp-primary);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

.fp .fp-uploading { color: var(--fp-primary); font-weight: 500; }

/* ---------- Checkbox ---------- */
.fp .fp-check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    background: #fff;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--fp-text);
    cursor: pointer;
}

.fp .fp-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--fp-primary);
    cursor: pointer;
}

.fp .fp-check:focus-within {
    border-color: var(--fp-focus);
    box-shadow: 0 0 0 4px var(--fp-focus-ring);
}

.fp .has-error .fp-check {
    border-color: var(--fp-error);
    background: var(--fp-error-bg);
    box-shadow: 0 0 0 1px var(--fp-error);
}

/* ---------- Likert ---------- */
/* walmart.css define form .likert con width:19% y, en celular, !important: se pisa aquí */
.fp form ul.likert.fp-likert,
.fp ul.likert.fp-likert {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(0, 1fr);
    flex-direction: initial !important;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fp ul.likert.fp-likert::before { display: none !important; }

.fp form ul.likert.fp-likert li,
.fp ul.likert.fp-likert li {
    display: block !important;
    position: relative;
    width: auto;
    text-align: center;
}

.fp form ul.likert.fp-likert li input[type="radio"],
.fp ul.likert.fp-likert li input[type="radio"] {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}

.fp ul.likert.fp-likert li label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* círculos alineados aunque el texto tenga 1, 2 o 3 líneas */
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 84px;
    margin: 0;
    padding: 14px 6px 10px;
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    background: #fff;
    color: var(--fp-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.fp ul.likert.fp-likert li label::before {
    content: '';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #9AA6B5;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
}

.fp ul.likert.fp-likert li label:hover { border-color: var(--fp-primary); }

.fp ul.likert.fp-likert li input:checked + label {
    border: 2px solid var(--fp-primary);
    background: var(--fp-primary-soft);
    color: var(--fp-primary-dark);
}

.fp ul.likert.fp-likert li input:checked + label::before {
    border-color: var(--fp-primary);
    background: var(--fp-primary);
    box-shadow: inset 0 0 0 4px #fff;
}

.fp ul.likert.fp-likert li input:focus-visible + label {
    border-color: var(--fp-focus);
    box-shadow: 0 0 0 4px var(--fp-focus-ring);
}

.fp .has-error ul.likert.fp-likert li label {
    border-color: var(--fp-error-soft);
    background: var(--fp-error-bg);
}

.fp .has-error ul.likert.fp-likert li label::before { border-color: var(--fp-error); }

/* ---------- Grupo repetible (inputsgroup) ---------- */
.fp .fp-group-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid var(--fp-border);
    border-radius: 12px;
    background: #fff;
}

.fp .fp-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--fp-primary);
}

.fp .fp-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    margin-bottom: 12px;
    padding: 0 16px;
    border: 1px dashed var(--fp-primary);
    border-radius: var(--fp-radius);
    background: #fff;
    color: var(--fp-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.fp .fp-btn-add:hover { background: var(--fp-primary-soft); }

.fp .fp-btn-remove {
    padding: 6px 8px;
    border: 0;
    background: transparent;
    color: var(--fp-error);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.fp .fp-group-warning {
    margin: 0;
    font-size: 13px;
    color: #92400E;
}

/* ---------- Inputs Bootstrap (paso previo de Assessment / Movilidad) ---------- */
.fp .form-control {
    height: var(--fp-h);
    padding: 0 var(--fp-pad-x);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    font-size: 16px;
    color: var(--fp-text);
    box-shadow: none;
}

.fp textarea.form-control { height: auto; padding: 12px var(--fp-pad-x); }

.fp .form-control:focus {
    border-color: var(--fp-focus);
    box-shadow: 0 0 0 4px var(--fp-focus-ring);
    outline: none;
}

.fp .form-control.is-invalid {
    border-color: var(--fp-error);
    background: var(--fp-error-bg);
    box-shadow: 0 0 0 1px var(--fp-error);
}

.fp .invalid-feedback,
.fp .text-danger.small {
    display: block;
    margin-top: var(--fp-gap-label);
    font-size: 13px;
    font-weight: 500;
    color: var(--fp-error);
}

/* ---------- Botón principal ---------- */
.fp .btn-warning {
    min-height: 44px;
    padding-left: 20px;
    padding-right: 20px;
    border: 0;
    border-radius: 12px;
    background: var(--fp-cta);
    color: var(--fp-cta-text);
    font-weight: 700;
    box-shadow: none;
}

.fp .btn-warning:hover,
.fp .btn-warning:focus {
    background: var(--fp-cta-hover);
    color: var(--fp-cta-text);
}

.fp .btn-warning:focus-visible { box-shadow: 0 0 0 4px var(--fp-focus-ring); }

.fp .btn-block.btn-warning {
    height: 52px;
    font-size: 16px;
}

.fp .btn-warning[disabled],
.fp .btn-warning.disabled {
    background: #FFE08A;
    color: #3B4452;
    opacity: 1;
}

/* ---------- Footer ---------- */
.fp > div > .footer,
.fp .footer {
    background: #fff;
    border-top: 1px solid var(--fp-line);
    color: var(--fp-muted);
    font-size: 13px;
}

/* =====================================================================
   Renovación visual: header + tarjeta superpuesta, avance, envío,
   gracias y micro-animaciones (igual en todos los formularios)
   ===================================================================== */

/* ---------- Header con la tarjeta montada encima ---------- */
.fp .fp-header {
    padding: 28px 16px 116px !important;
    text-align: center;
}

.fp .fp-header .company-logo {
    display: block;
    width: auto;
    height: auto !important;
    max-width: 260px;
    max-height: 92px;
    margin: 0 auto;
    padding: 0 !important;
    object-fit: contain;
}

.fp .fp-intro {
    position: relative;
    z-index: 1;
    margin-top: -88px !important;
    color: var(--fp-text) !important;
}

/* Parte de arriba de la tarjeta: título y descripción del formulario */
.fp .fp-intro > .col-md-8 {
    background: #fff;
    border: 1px solid var(--fp-line);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    padding: 40px 40px 8px !important;
    box-shadow: 0 -8px 24px rgba(16, 24, 40, .06);
}

/* Form con banner (Marca empleadora): el segundo bloque continúa la misma tarjeta */
.fp .fp-intro > .col-md-8 ~ .col-md-8 {
    border-top: 0;
    border-radius: 0;
    box-shadow: none;
    padding-top: 8px !important;
}

.fp .fp-intro h2 {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--fp-title);
}

.fp .fp-intro h2:empty { display: none; }

.fp .fp-intro p { font-size: 15px; line-height: 1.65; color: #3B4452; }

/* Parte de abajo de la tarjeta: el formulario. La columna pierde su gutter
   para que el panel tenga exactamente el mismo ancho que la parte de arriba. */
.fp .fp-intro + .row > .col-md-8 {
    padding-left: 0;
    padding-right: 0;
}

.fp .fp-intro + .row .panel {
    margin-top: 0;
    border-top: 0;
    border-radius: 0 0 20px 20px;
    padding-top: 12px;
    box-shadow: 0 18px 40px rgba(16, 24, 40, .08);
}

/* ---------- Barra de avance ---------- */
.fp .fp-progress-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    height: 4px;
    background: rgba(255, 255, 255, .35);
}

.fp .fp-progress-top > span,
.fp .fp-progress-track > span {
    display: block;
    height: 100%;
    background: var(--fp-cta);
    border-radius: 0 99px 99px 0;
    transition: width .45s cubic-bezier(.2, .8, .2, 1);
}

.fp .fp-progress-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--fp-muted);
}

.fp .fp-progress-track {
    flex: 0 0 120px;
    height: 6px;
    background: var(--fp-line);
    border-radius: 99px;
    overflow: hidden;
}

.fp .fp-progress-track > span { background: var(--fp-primary); border-radius: 99px; }

.fp .fp-progress-summary.is-complete { color: #1E6B2B; font-weight: 600; }
.fp .fp-progress-summary.is-complete .fp-progress-track > span { background: #2E7D32; }

/* ---------- Botón: "Enviando…" con spinner ---------- */
.fp .fp-sending { display: none; align-items: center; justify-content: center; gap: 10px; }
.fp .fp-is-sending .fp-btn-label,
.fp .fp-is-sending.btn .fp-btn-label { display: none; }
.fp .fp-is-sending .fp-sending,
.fp .fp-is-sending.btn .fp-sending { display: inline-flex; }
.fp .fp-is-sending .btn-warning,
.fp .btn-warning.fp-is-sending { pointer-events: none; background: #FFE08A; }

.fp .fp-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(4, 30, 66, .25);
    border-top-color: var(--fp-cta-text);
    border-radius: 50%;
    animation: fp-spin .7s linear infinite;
}

@keyframes fp-spin { to { transform: rotate(360deg); } }

/* ---------- Página de gracias ---------- */
.fp .fp-thanks > .col-md-8 {
    border-bottom: 1px solid var(--fp-line);
    border-radius: 20px;
    padding: 48px 40px 40px !important;
    margin-bottom: 48px;
    box-shadow: 0 18px 40px rgba(16, 24, 40, .08);
}

.fp .fp-thanks-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #E7F4EA;
    color: #2E7D32;
    animation: fp-pop .5s cubic-bezier(.2, 1.4, .4, 1) backwards;
}

.fp .fp-thanks-body { max-width: 560px; margin: 0 auto; font-size: 16px; line-height: 1.6; color: #3B4452; }
.fp .fp-thanks-body h3 { margin: 6px 0 14px; font-size: 20px; color: var(--fp-title); }
.fp .fp-thanks-gif img { width: 100%; max-width: 180px; height: auto; margin-top: 20px; }
.fp .fp-thanks-redirect { margin-top: 16px; }

@keyframes fp-pop {
    from { opacity: 0; transform: scale(.6); }
    to { opacity: 1; transform: scale(1); }
}

/* ---------- Términos y condiciones / documentos legales ---------- */
.fp .fp-doc > .col-md-8 {
    border-bottom: 1px solid var(--fp-line);
    border-radius: 20px;
    padding: 44px 48px 48px !important;
    margin-bottom: 48px;
    box-shadow: 0 18px 40px rgba(16, 24, 40, .08);
}

.fp .fp-doc-kicker {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 99px;
    background: var(--fp-primary-soft);
    color: var(--fp-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fp .fp-doc-title {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--fp-title);
}

.fp .fp-doc-meta {
    margin: 0 0 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--fp-line);
    font-size: 13px;
    color: var(--fp-muted);
}

/* El contenido viene del admin (HTML libre): se le da una tipografía de lectura */
.fp .fp-doc-body {
    max-width: 72ch;
    font-size: 16px;
    line-height: 1.75;
    color: #2B3340;
    overflow-wrap: anywhere;
}

.fp .fp-doc-body > :first-child { margin-top: 0; }

/* Texto pegado desde Word trae tamaños y fuentes inline: se iguala al resto */
.fp .fp-doc-body p [style],
.fp .fp-doc-body li [style],
.fp .fp-doc-body p[style],
.fp .fp-doc-body li[style],
.fp .fp-doc-body font {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.fp .fp-doc-body p,
.fp .fp-doc-body li { font-size: 16px; }

.fp .fp-doc-body p { margin: 0 0 14px; }

.fp .fp-doc-body h1,
.fp .fp-doc-body h2,
.fp .fp-doc-body h3,
.fp .fp-doc-body h4 {
    margin: 32px 0 12px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--fp-title);
}

.fp .fp-doc-body h1 { font-size: 22px; }
.fp .fp-doc-body h2 { font-size: 20px; }
.fp .fp-doc-body h3 { font-size: 18px; }
.fp .fp-doc-body h4 { font-size: 16px; }

.fp .fp-doc-body ul,
.fp .fp-doc-body ol { margin: 0 0 16px; padding-left: 22px; }
.fp .fp-doc-body li { margin-bottom: 6px; }
.fp .fp-doc-body li::marker { color: var(--fp-primary); }

.fp .fp-doc-body a { color: var(--fp-primary); text-decoration: underline; text-underline-offset: 2px; }
.fp .fp-doc-body a:hover { color: var(--fp-primary-dark); }

.fp .fp-doc-body strong,
.fp .fp-doc-body b { color: var(--fp-title); }

.fp .fp-doc-body table { width: 100%; margin: 0 0 16px; border-collapse: collapse; font-size: 14px; }
.fp .fp-doc-body th,
.fp .fp-doc-body td { padding: 8px 10px; border: 1px solid var(--fp-line); text-align: left; }
.fp .fp-doc-body th { background: var(--fp-bg); }

.fp .fp-doc-body img { max-width: 100%; height: auto; }

/* ---------- Micro-animaciones ---------- */
@keyframes fp-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* Campos (y los que aparecen por una dependencia) entran con un fundido suave.
   OJO: "backwards" y no "both": una animación que se queda aplicada al terminar
   convierte cada columna en su propia capa y el desplegable de un select queda
   tapado por los campos de abajo. */
.fp .form-body .row > [class*="col-"],
.fp .box-title,
.fp .fp-error,
.fp .fp-alert { animation: fp-in .28s ease backwards; }

/* La columna con un select abierto (o con foco) va por encima de sus vecinas */
.fp .form-body .row > [class*="col-"]:focus-within,
.fp .form-body .row > [class*="col-"]:has(.ts-wrapper.dropdown-active) {
    position: relative;
    z-index: 30;
}

/* La tarjeta solo hace fundido (sin transform): un transform en un contenedor
   rompería el position:fixed de la barra de avance que vive adentro. */
@keyframes fp-fade { from { opacity: 0; } to { opacity: 1; } }

.fp .fp-intro > .col-md-8,
.fp .fp-intro + .row .panel { animation: fp-fade .4s ease backwards; }

.fp .fp-control,
.fp .ts-wrapper .ts-control,
.fp ul.likert.fp-likert li label,
.fp .fp-check { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }

.fp .fp-control:hover:not(:focus):not(:disabled),
.fp .ts-wrapper:not(.focus):not(.disabled) .ts-control:hover { border-color: #9AA6B5; }

.fp .btn-warning { transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.fp .btn-warning:hover:not([disabled]) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255, 194, 32, .35); }
.fp .btn-warning:active:not([disabled]) { transform: none; box-shadow: none; }

/* Check verde al completar un campo de texto (placeholder=" " en la plantilla) */
.fp input.fp-control:not([type="file"]):not(:placeholder-shown):not(:focus):not(.is-invalid),
.fp textarea.fp-control:not(:placeholder-shown):not(:focus):not(.is-invalid) {
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E7D32' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 18px;
    background-position: right 14px center;
}

.fp textarea.fp-control:not(:placeholder-shown):not(:focus):not(.is-invalid) { background-position: right 14px top 14px; }

/* Select con opción elegida: mismo check, a la izquierda de la flecha */
.fp .ts-wrapper.has-items:not(.focus) .ts-control::before {
    content: '';
    position: absolute;
    right: 38px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E7D32' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / 18px;
    animation: fp-pop .3s ease backwards;
}

.fp .is-invalid .ts-wrapper .ts-control::before { display: none; }
.fp .ts-wrapper.has-items .ts-control { padding-right: 64px; }

@media (prefers-reduced-motion: reduce) {
    .fp *,
    .fp *::before,
    .fp *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ---------- Celular ---------- */
@media (max-width: 767px) {
    .fp {
        --fp-gap-row: 18px;
        --fp-gap-group: 24px;
        --fp-card-pad: 20px;
    }

    .fp .panel { padding: 20px 1px; }

    .fp .fp-header { padding: 20px 16px 76px !important; }
    .fp .fp-header .company-logo { max-height: 56px; max-width: 200px; }
    .fp .fp-intro { margin-top: -56px !important; padding: 0 8px; }
    .fp .fp-intro + .row { padding: 0 8px; }
    .fp .fp-intro > .col-md-8 { padding: 28px 20px 4px !important; border-radius: 18px 18px 0 0; }
    .fp .fp-intro h2 { font-size: 24px; }
    .fp .fp-intro + .row .panel { border-radius: 0 0 18px 18px; }
    .fp .fp-thanks > .col-md-8 { padding: 36px 20px 28px !important; border-radius: 18px; }
    .fp .fp-doc > .col-md-8 { padding: 28px 20px 32px !important; border-radius: 18px; }
    .fp .fp-doc-title { font-size: 24px; }
    .fp .fp-doc-body,
    .fp .fp-doc-body p,
    .fp .fp-doc-body li { font-size: 15px; }

    /* Botón de enviar fijo abajo mientras se recorre el formulario */
    .fp .fp-submit-bar {
        position: sticky;
        bottom: 0;
        z-index: 20;
        margin: 8px -1px 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        border-top: 1px solid var(--fp-line);
        box-shadow: 0 -8px 20px rgba(16, 24, 40, .08);
        backdrop-filter: blur(6px);
    }

    .fp .fp-progress-summary { margin-bottom: 10px; }
    .fp .fp-progress-track { flex-basis: 72px; }
}

@media (max-width: 600px) {
    .fp form ul.likert.fp-likert,
    .fp ul.likert.fp-likert {
        grid-auto-flow: row !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .fp ul.likert.fp-likert li label {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        min-height: var(--fp-h);
        padding: 10px 14px;
        font-size: 15px;
        font-weight: 500;
        text-align: left;
    }
}
