

.atc-page {
    --atc-field-border: #7A857F;   
    --atc-error: #B3261E;         

    padding: var(--lv-s6) 0 var(--lv-s7);
}

.atc-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(16rem, 4fr);
    gap: var(--lv-s6);
    align-items: start;
}


.atc-heading {
    margin: 0 0 var(--lv-s2);
    padding-bottom: var(--lv-s2);
    border-bottom: 1px solid var(--lv-ink);
    font-size: var(--lv-fs-xl);
    line-height: 1.1;
}

.atc-heading--small {
    font-size: var(--lv-fs-lg);
}

.atc-hint {
    margin: 0 0 var(--lv-s4);
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
}


/* =====================================================
   FORMULARIO
===================================================== */

.atc-form {
    max-width: 44rem;
}

.atc-field {
    margin-bottom: var(--lv-s3);
}

.atc-field label {
    display: block;
    margin-bottom: .375rem;
    color: var(--lv-ink);
    font-weight: 600;
}

.atc-field input[type="text"],
.atc-field input[type="email"],
.atc-field textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: .75rem .875rem;
    border: 1px solid var(--atc-field-border);
    border-radius: var(--lv-radius-sm);
    background: var(--lv-white);
    color: var(--lv-ink);
    font-family: var(--lv-font);
    font-size: var(--lv-fs-base);   /* ≥16px: evita el zoom automático en iOS */
    line-height: 1.5;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.atc-field textarea {
    min-height: 14rem;
    resize: vertical;
}

.atc-field input:hover,
.atc-field textarea:hover {
    border-color: var(--lv-ink);
}

.atc-field input:focus-visible,
.atc-field textarea:focus-visible {
    border-color: var(--lv-blue);
    box-shadow: 0 0 0 3px rgba(48, 57, 144, .25);
    border-radius: var(--lv-radius-sm);
}

/* Válido: sólo tras validar, filete verde discreto */
.atc-field.is-valid input,
.atc-field.is-valid textarea {
    border-color: var(--lv-green);
}

/* Error */
.atc-field.is-invalid input,
.atc-field.is-invalid textarea {
    border-color: var(--atc-error);
    border-width: 2px;
    padding: calc(.75rem - 1px) calc(.875rem - 1px);
}

.atc-error {
    display: flex;
    align-items: flex-start;
    gap: .375rem;
    margin: .375rem 0 0;
    color: var(--atc-error);
    font-size: var(--lv-fs-sm);
    font-weight: 500;
}

.atc-error::before {
    content: "\F33A"; 
    font-family: "bootstrap-icons";
    line-height: 1.45;
}

.atc-error[hidden] {
    display: none;
}

/* --- Casilla de protección de datos --- */

.atc-field--check {
    margin-top: var(--lv-s4);
    padding-top: var(--lv-s3);
    border-top: 1px solid var(--lv-rule);
}

.atc-check {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.atc-check input[type="checkbox"] {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin: 0;
    accent-color: var(--lv-green);
    cursor: pointer;
}

/* Área táctil de 44px: la etiqueta entera activa la casilla */

.atc-check label {
    display: block;
    min-height: 44px;
    margin: 0;
    padding-top: .05rem;
    font-weight: 600;
    cursor: pointer;
}

.atc-optional {
    color: var(--lv-ink-2);
    font-weight: 400;
}

.atc-field--check.is-invalid .atc-check input[type="checkbox"] {
    outline: 2px solid var(--atc-error);
    outline-offset: 2px;
}

.atc-legal-inline {
    margin: 0 0 0 calc(24px + .75rem);
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
    line-height: 1.6;
}

/* --- Envío --- */

.atc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--lv-s2) var(--lv-s3);
    margin-top: var(--lv-s4);
}

.atc-actions .lv-btn {
    min-width: 12rem;
}

.atc-actions .lv-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.atc-notice {
    flex: 1 1 18rem;
    margin: 0;
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
    line-height: 1.5;
}


/* =====================================================
   OFICINAS DE GESTIÓN
===================================================== */

.atc-offices p {
    margin: 0 0 var(--lv-s3);
    color: var(--lv-ink-2);
}

.atc-address {
    margin: 0 0 var(--lv-s3);
    font-style: normal;
    line-height: 1.6;
}

.atc-channels {
    margin: 0;
    padding-top: var(--lv-s2);
    border-top: 1px solid var(--lv-rule);
}

.atc-channels > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0 .5rem;
    padding: .375rem 0;
}

.atc-channels dt {
    color: var(--lv-ink-2);
    font-weight: 400;
}

.atc-channels dd {
    margin: 0;
    font-weight: 600;
}


/* =====================================================
   ENLACES (subrayados para distinguirse del texto)
===================================================== */

.atc-page a {
    color: var(--lv-blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
    overflow-wrap: anywhere;
}

.atc-page a:hover {
    color: var(--lv-blue-ink);
    text-decoration-thickness: 2px;
}

/* Enlaces de contacto: área táctil cómoda sin cambiar el aspecto */
.atc-channels a {
    display: inline-block;
    padding: .5rem 0;
    margin: -.5rem 0;
}


/* =====================================================
   TRATAMIENTO DE DATOS
===================================================== */

.atc-legal {
    margin-top: var(--lv-s6);
}

.atc-legal-text {
    color: var(--lv-ink-2);
    font-size: var(--lv-fs-sm);
    line-height: 1.7;
}

.atc-legal-text p {
    margin: 0 0 1em;
}

.atc-legal-text p:last-child {
    margin-bottom: 0;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 991px) {

    .atc-page {
        padding: var(--lv-s5) 0 var(--lv-s6);
    }

    .atc-layout {
        grid-template-columns: 1fr;
        gap: var(--lv-s5);
    }

    .atc-form {
        max-width: none;
    }
}

@media (max-width: 575px) {

    .atc-heading {
        font-size: var(--lv-fs-lg);
    }

    .atc-heading--small {
        font-size: var(--lv-fs-md);
    }

    .atc-legal-inline {
        margin-left: 0;
        margin-top: .25rem;
    }

    .atc-actions .lv-btn {
        width: 100%;
    }
}
