/* Formulario Visa Definitiva - Truall
   Archivo limpio / reemplazo completo
*/

.tr_vd_form,
.tr_vd_form * {
    box-sizing: border-box;
}

.tr_vd_form {
    width: 100%;
}

/* Base Ninja Forms */
.tr_vd_form .nf-form-content {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.tr_vd_form .nf-form-layout,
.tr_vd_form .nf-form-content,
.tr_vd_form .nf-before-form-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Oculta textos auxiliares/errores que alteran el alto */
.tr_vd_form .nf-form-fields-required,
.tr_vd_form .nf-error-msg,
.tr_vd_form .nf-form-errors,
.tr_vd_form .nf-after-field,
.tr_vd_form .nf-error-wrap,
.tr_vd_form .nf-error-field-errors,
.tr_vd_form .nf-response-msg,
.tr_vd_form .nf-error-required-error,
.tr_vd_form .nf-error-invalid-email {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Grilla real Ninja Forms */
.tr_vd_form nf-fields-wrap,
.tr_vd_form .nf-fields-wrap {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 22px !important;
    row-gap: 20px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: start !important;
}

.tr_vd_form nf-field {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mensaje, checkbox y botón a ancho completo */
.tr_vd_form nf-field:nth-of-type(5),
.tr_vd_form nf-field:nth-of-type(6),
.tr_vd_form nf-field:nth-of-type(7) {
    grid-column: 1 / -1 !important;
}

/* El alto lo controla solo el grid-gap */
.tr_vd_form .nf-field-container,
.tr_vd_form .field-wrap,
.tr_vd_form .nf-field,
.tr_vd_form .nf-field-element {
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.tr_vd_form .nf-field-label {
    margin: 0 0 7px !important;
    padding: 0 !important;
}

.tr_vd_form .nf-field-label label {
    font-size: 15px !important;
    line-height: 1.18 !important;
    font-weight: 800 !important;
    color: #243D67 !important;
}

.tr_vd_form .ninja-forms-req-symbol {
    color: #D93025 !important;
    font-weight: 800 !important;
}

/* Campos */
.tr_vd_form .nf-field-element input[type="text"],
.tr_vd_form .nf-field-element input[type="email"],
.tr_vd_form .nf-field-element input[type="tel"],
.tr_vd_form .nf-field-element textarea,
.tr_vd_form .nf-field-element select {
    width: 100% !important;
    max-width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    border: 1.5px solid #D7DEE9 !important;
    border-radius: 18px !important;
    background: #F7F9FC !important;
    padding: 0 18px !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    color: #243D67 !important;
    box-shadow: none !important;
    outline: none !important;
}

.tr_vd_form .nf-field-element textarea {
    height: 118px !important;
    min-height: 118px !important;
    padding: 16px 18px !important;
    resize: vertical;
}

.tr_vd_form .nf-field-element input::placeholder,
.tr_vd_form .nf-field-element textarea::placeholder {
    color: #9AA8BB !important;
    opacity: 1 !important;
}

.tr_vd_form .nf-field-element input:focus,
.tr_vd_form .nf-field-element textarea:focus,
.tr_vd_form .nf-field-element select:focus {
    border-color: #243D67 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(36, 61, 103, 0.10) !important;
}

/* Checkbox */
.tr_vd_form .checkbox-container .field-wrap,
.tr_vd_form .checkbox-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.tr_vd_form .checkbox-container .nf-field-element {
    width: auto !important;
    order: 1 !important;
}

.tr_vd_form .checkbox-container .nf-field-label {
    width: auto !important;
    order: 2 !important;
    margin: 0 !important;
}

.tr_vd_form .checkbox-container input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    margin: 0 !important;
    accent-color: #243D67;
}

.tr_vd_form .checkbox-container label {
    font-size: 15px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    color: #334155 !important;
}

/* Botón */
.tr_vd_form .submit-container input[type="button"],
.tr_vd_form .submit-container input[type="submit"] {
    width: 100% !important;
    height: 58px !important;
    min-height: 58px !important;
    border: 0 !important;
    border-radius: 20px !important;
    background: #243D67 !important;
    color: #ffffff !important;
    font-size: 17px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.tr_vd_form .submit-container input[type="button"]:hover,
.tr_vd_form .submit-container input[type="submit"]:hover {
    background: #1D3154 !important;
    transform: translateY(-1px);
}

/* Errores: borde + halo, sin textos */
.tr_vd_form .field-wrap.nf-error .nf-element,
.tr_vd_form .field-wrap.nf-fail .nf-element,
.tr_vd_form .field-wrap.nf-error .ninja-forms-field,
.tr_vd_form .field-wrap.nf-fail .ninja-forms-field,
.tr_vd_form .nf-field-container.nf-error .nf-element,
.tr_vd_form .nf-field-container.nf-fail .nf-element,
.tr_vd_form .nf-error.field-wrap .nf-element,
.tr_vd_form .nf-fail.field-wrap .nf-element,
.tr_vd_form .nf-error input.nf-element,
.tr_vd_form .nf-fail input.nf-element,
.tr_vd_form .nf-error textarea.nf-element,
.tr_vd_form .nf-fail textarea.nf-element {
    border: 2px solid #E32B2B !important;
    box-shadow: 0 0 0 7px rgba(227, 43, 43, 0.08) !important;
    background-color: #F8FAFD !important;
}

.tr_vd_form .checkbox-wrap.nf-error input[type="checkbox"],
.tr_vd_form .checkbox-wrap.nf-fail input[type="checkbox"],
.tr_vd_form .nf-error input[type="checkbox"],
.tr_vd_form .nf-fail input[type="checkbox"] {
    border: 2px solid #E32B2B !important;
    box-shadow: 0 0 0 5px rgba(227, 43, 43, 0.08) !important;
}

/* Responsive */
@media (max-width: 767px) {
    .tr_vd_form nf-fields-wrap,
    .tr_vd_form .nf-fields-wrap {
        grid-template-columns: 1fr !important;
        row-gap: 16px !important;
    }

    .tr_vd_form nf-field,
    .tr_vd_form nf-field:nth-of-type(5),
    .tr_vd_form nf-field:nth-of-type(6),
    .tr_vd_form nf-field:nth-of-type(7) {
        grid-column: auto !important;
    }

    .tr_vd_form .nf-field-label label {
        font-size: 14px !important;
    }

    .tr_vd_form .nf-field-element input[type="text"],
    .tr_vd_form .nf-field-element input[type="email"],
    .tr_vd_form .nf-field-element input[type="tel"],
    .tr_vd_form .nf-field-element textarea,
    .tr_vd_form .nf-field-element select {
        height: 52px !important;
        min-height: 52px !important;
        border-radius: 16px !important;
        font-size: 15px !important;
    }

    .tr_vd_form .nf-field-element textarea {
        height: 112px !important;
        min-height: 112px !important;
    }

    .tr_vd_form .submit-container input[type="button"],
    .tr_vd_form .submit-container input[type="submit"] {
        height: 56px !important;
        min-height: 56px !important;
        border-radius: 18px !important;
        font-size: 16px !important;
    }
}