/* ─────────────────────────────────────────────────────────────────────────────
   Formulario de inscripción pública — vel-reg-form
   Voluntariat Esportiu de València
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Reset base ──────────────────────────────────────────────────────────── */
.vel-reg-form *,
.vel-reg-form *::before,
.vel-reg-form *::after {
    box-sizing: border-box;
}

/* ── Contenedor general ──────────────────────────────────────────────────── */
.vel-reg-form {
    max-width: 700px;
    margin: 0 auto;
    font-family: inherit;
    padding: 32px 0;
}

@media (max-width: 580px) {
    .vel-reg-form {
        padding: 20px 0;
    }

    .vel-reg-form__section {
        padding: 16px 16px 20px;
    }
}

/* ── Secciones (fieldset) ────────────────────────────────────────────────── */
.vel-reg-form__section {
    border: 1px solid #e2e4e9;
    border-radius: 8px;
    padding: 20px 24px 28px;
    margin-bottom: 20px;
    background: #fff;
}

/* El legend ocupa :first-child, así que el primer contenido real es :nth-child(2).
   Le quitamos el margin-top para que no se acumule con el padding del fieldset. */
.vel-reg-form__section > :nth-child(2) {
    margin-top: 0;
}

.vel-reg-form__section legend {
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--vel-color-brand, #d4541a);
    padding: 0 10px;
    margin-left: -10px;
    line-height: 1;
}

/* ── Campo individual ────────────────────────────────────────────────────── */
.vel-reg-form__field {
    display: flex;
    flex-direction: column;
    margin-top: 18px;
}

/* Etiqueta del campo */
.vel-reg-form__field > label,
.vel-reg-form__field-label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: #444750;
    margin-bottom: 5px;
    line-height: 1.3;
}

/* ── Control base (inputs, select, textarea) ─────────────────────────────── */
.vel-reg-form__field input[type="text"],
.vel-reg-form__field input[type="email"],
.vel-reg-form__field input[type="tel"],
.vel-reg-form__field input[type="date"],
.vel-reg-form__field select,
.vel-reg-form__field textarea {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #c8cbd4;
    border-radius: 5px;
    font-size: .9375rem;
    font-family: inherit;
    color: #1a1c22;
    background: #fafbfc;
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1.4;
}

.vel-reg-form__field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.vel-reg-form__field textarea {
    height: auto;
    padding: 10px 12px;
    resize: vertical;
    min-height: 88px;
    line-height: 1.55;
}

/* Focus */
.vel-reg-form__field input[type="text"]:focus,
.vel-reg-form__field input[type="email"]:focus,
.vel-reg-form__field input[type="tel"]:focus,
.vel-reg-form__field input[type="date"]:focus,
.vel-reg-form__field select:focus,
.vel-reg-form__field textarea:focus {
    border-color: var(--vel-color-brand, #d4541a);
    box-shadow: 0 0 0 3px rgba(212, 84, 26, .14);
    outline: none;
    background: #fff;
}

/* ── Input de archivo ────────────────────────────────────────────────────── */
.vel-reg-form__field input[type="file"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px dashed #c8cbd4;
    border-radius: 5px;
    font-size: .875rem;
    font-family: inherit;
    color: #50575e;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color .15s;
}

.vel-reg-form__field input[type="file"]:hover {
    border-color: var(--vel-color-brand, #d4541a);
}

/* ── Grids de columnas ───────────────────────────────────────────────────── */
/*
 * Las filas grid tienen su propio margin-top.
 * Los .vel-reg-form__field dentro de un row resetean su margen
 * para usar el gap del grid en su lugar.
 */
.vel-reg-form__row {
    display: grid;
    gap: 0 20px;
    margin-top: 18px;
    align-items: end; /* inputs alineados al fondo aunque las etiquetas tengan distinta altura */
}

.vel-reg-form__row--2col { grid-template-columns: 1fr 1fr; }
.vel-reg-form__row--3col { grid-template-columns: 1fr 1fr 1fr; }

/* Los campos dentro de un row no necesitan su propio margen superior */
.vel-reg-form__row > .vel-reg-form__field {
    margin-top: 0;
}

@media (max-width: 580px) {
    .vel-reg-form__row--2col,
    .vel-reg-form__row--3col {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .vel-reg-form__row--2col > .vel-reg-form__field + .vel-reg-form__field,
    .vel-reg-form__row--3col > .vel-reg-form__field + .vel-reg-form__field {
        margin-top: 18px;
    }
}

/* ── Grupos de radio ─────────────────────────────────────────────────────── */
.vel-reg-form__radio-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 18px;
    /* Misma altura visual que un input (40px) */
    min-height: 40px;
    padding: 0 2px;
}

.vel-reg-form__radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .9rem;
    font-weight: 400;
    color: #1a1c22;
    cursor: pointer;
    white-space: nowrap;
    margin-bottom: 0;
}

.vel-reg-form__radio-group input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--vel-color-brand, #d4541a);
    flex-shrink: 0;
    cursor: pointer;
}

/* ── Grupos de checkbox ──────────────────────────────────────────────────── */
.vel-reg-form__checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vel-reg-form__checkbox-group--grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 28px;
}

@media (max-width: 440px) {
    .vel-reg-form__checkbox-group--grid { grid-template-columns: 1fr; }
}

.vel-reg-form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: .9rem;
    color: #1a1c22;
    cursor: pointer;
    line-height: 1.45;
}

.vel-reg-form__checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--vel-color-brand, #d4541a);
    cursor: pointer;
}

/* ── Tabla de idiomas ────────────────────────────────────────────────────── */
.vel-reg-form__idiomas {
    border: 1px solid #e2e4e9;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 6px;
}

.vel-reg-form__idiomas-header,
.vel-reg-form__idioma-row {
    display: grid;
    grid-template-columns: 130px repeat(4, 1fr);
    align-items: center;
}

.vel-reg-form__idiomas-header {
    background: #f4f5f7;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #646970;
    padding: 8px 14px;
}

.vel-reg-form__idiomas-header span {
    text-align: center;
}

.vel-reg-form__idiomas-header span:first-child {
    text-align: left;
}

.vel-reg-form__idioma-row {
    padding: 10px 14px;
    border-top: 1px solid #e2e4e9;
}

.vel-reg-form__idioma-row:nth-child(odd) {
    background: #fafbfc;
}

.vel-reg-form__idioma-name {
    font-size: .875rem;
    font-weight: 600;
    color: #2d3037;
}

.vel-reg-form__idioma-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 400;
    padding: 2px 0;
}

.vel-reg-form__idioma-cell input[type="radio"] {
    accent-color: var(--vel-color-brand, #d4541a);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.vel-reg-form__idioma-mobile-label {
    display: none;
}

@media (max-width: 520px) {
    .vel-reg-form__idiomas-header { display: none; }

    .vel-reg-form__idiomas,
    .vel-reg-form__idioma-row {
        display: block;
    }

    .vel-reg-form__idioma-row {
        padding: 10px 14px;
    }

    .vel-reg-form__idioma-name {
        display: block;
        margin-bottom: 8px;
        font-size: .875rem;
    }

    .vel-reg-form__idioma-cell {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        margin-right: 14px;
        font-size: .85rem;
        justify-content: flex-start;
        margin-bottom: 4px;
    }

    .vel-reg-form__idioma-mobile-label {
        display: inline;
    }
}

/* ── Textos auxiliares ───────────────────────────────────────────────────── */
.vel-reg-form__required {
    color: #c0392b;
    margin-left: 2px;
}

.vel-reg-form__hint {
    font-weight: 400;
    color: #888;
    font-size: .8em;
    margin-left: 4px;
}

.vel-reg-form__note {
    font-size: .8125rem;
    color: #646970;
    background: #f5f6f8;
    border-left: 3px solid var(--vel-color-brand, #d4541a);
    padding: 9px 13px;
    border-radius: 0 4px 4px 0;
    margin: 16px 0 4px;
    line-height: 1.5;
}

/* ── Honeypot anti-spam — fuera de pantalla, invisible para humanos ─────── */
/* No usar display:none ni visibility:hidden — los bots lo detectan */
.vel-honeypot {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ── Tutor legal — resalte cuando el solicitante es menor ───────────────── */
.vel-reg-form__field--minor > label {
    color: var(--vel-color-brand, #d4541a);
}

.vel-reg-form__field--minor input {
    border-color: var(--vel-color-brand, #d4541a);
    box-shadow: 0 0 0 2px rgba(212, 84, 26, .1);
}

.vel-reg-form__field--minor .vel-reg-form__hint--tutor {
    color: var(--vel-color-brand, #d4541a);
    font-weight: 600;
}

/* ── Privacidad ──────────────────────────────────────────────────────────── */
.vel-reg-form__privacy {
    margin: 28px 0 22px;
    font-size: .875rem;
}

.vel-reg-form__privacy .vel-reg-form__checkbox {
    align-items: flex-start;
}

.vel-reg-form__privacy a {
    color: var(--vel-color-brand, #d4541a);
    text-decoration: underline;
}

/* ── Botón enviar ────────────────────────────────────────────────────────── */
.vel-reg-form__submit {
    margin-top: 4px;
    padding-bottom: 8px;
}

.vel-reg-form__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--vel-color-brand, #d4541a);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    font-family: inherit;
    transition: filter .15s, transform .1s;
    line-height: 1;
}

.vel-reg-form__btn:hover {
    filter: brightness(.88);
}

.vel-reg-form__btn:active {
    transform: scale(.97);
}

.vel-reg-form__btn .ti {
    font-size: 1.1em;
}

/* ── Panel de éxito ──────────────────────────────────────────────────────── */
.vel-form-success {
    text-align: center;
    padding: 52px 32px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    max-width: 540px;
    margin: 0 auto;
}

.vel-form-success__icon {
    font-size: 3.5rem;
    color: #16a34a;
    margin-bottom: 16px;
    line-height: 1;
}

.vel-form-success__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #15803d;
    margin: 0 0 12px;
}

.vel-form-success__text {
    color: #166534;
    font-size: .9375rem;
    line-height: 1.65;
    margin: 0;
}

/* ── Aviso de error ──────────────────────────────────────────────────────── */
.vel-form-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: .9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.vel-form-notice .ti {
    font-size: 1.15em;
    flex-shrink: 0;
    margin-top: 1px;
}

.vel-form-notice--error {
    background: #fff0f0;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}
