/* ═══════════════════════════════════════════════════════════════════════
   EFBA Pharma (MX) - Formulario de contacto (Cascarón)
   Cobalt #2346a0 (action, focus), graphite text, 2px corners, 1px #7b848a field edge.
   Mobile: one column; >=900px: two-column field grid. No pill, no glass.
   ═══════════════════════════════════════════════════════════════════════ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-wrap {
    max-width: 880px;
}

.form-privacy {
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #3a4146;
    background: #eceef0;
    border: 1px solid #c7cbce;
    border-radius: 2px;
}

.form-privacy a,
.form-check a {
    color: #2346a0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.form-required-note {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: #5d666c;
}

.mx-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem 1.75rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.form-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1c2125;
}

.form-hint {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #5d666c;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.85rem;
    font: inherit;
    font-size: 16px; /* no iOS zoom */
    line-height: 1.5;
    color: #1c2125;
    background: #fff;
    border: 1px solid #7b848a;
    border-radius: 2px;
    appearance: none;
    -webkit-appearance: none;
}

.form-textarea {
    min-height: 9rem;
    resize: vertical;
}

.form-select {
    padding-right: 2.6rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232346a0' stroke-width='2.2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1.1rem;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: #5d666c;
}

.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.form-check input:focus-visible,
.form-submit:focus-visible,
.form-status a:focus-visible {
    outline: 2px solid #2346a0;
    outline-offset: 2px;
}

.field-error {
    display: none;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #9b1c1c;
}

.form-field.has-error .form-input,
.form-field.has-error .form-select,
.form-field.has-error .form-textarea,
.form-consent.has-error {
    border-color: #9b1c1c;
}

.form-field.has-error .form-input,
.form-field.has-error .form-select,
.form-field.has-error .form-textarea {
    box-shadow: inset 3px 0 0 #9b1c1c;
}

.form-field.has-error .field-error,
.form-consent.has-error .field-error {
    display: block;
}

.form-consent {
    padding: 0.9rem 1rem;
    border: 1px solid #c7cbce;
    border-radius: 2px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #3a4146;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    accent-color: #2346a0;
    cursor: pointer;
}

.form-status {
    display: none;
    padding: 0.85rem 1.1rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #3a4146;
    background: #eceef0;
    border: 1px solid #c7cbce;
    border-radius: 2px;
}

.form-status.is-visible { display: block; }

.form-status.is-error {
    color: #7a1616;
    background: #fdf1f0;
    border-color: #9b1c1c;
}

.form-status-title {
    margin: 0 0 0.4rem;
    font-weight: 600;
}

.form-status ul {
    margin: 0;
    padding-left: 1.2rem;
}

.form-status li + li { margin-top: 0.2rem; }

.form-status a {
    color: #7a1616;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.form-submit {
    display: inline-block;
    min-width: 12rem;
    min-height: 44px;
    padding: 0.7rem 1.75rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #2346a0;
    border: 1px solid #2346a0;
    border-radius: 2px;
    cursor: pointer;
}

.form-submit:hover { background: #1b3a86; border-color: #1b3a86; }
.form-submit:disabled { opacity: 0.65; cursor: wait; }

.form-success {
    padding: 1.25rem 1.5rem;
    line-height: 1.7;
    color: #1c2125;
    background: #eceef0;
    border: 1px solid #c7cbce;
    border-radius: 2px;
}

.form-success[hidden],
.mx-form[hidden] { display: none; }

.form-success p { margin: 0; }
.form-success p + p { margin-top: 0.35rem; }
.form-success-title { font-weight: 600; font-size: 1.0625rem; }
.form-success:focus { outline: 2px solid #2346a0; outline-offset: 2px; }

.form-ref {
    font-weight: 600;
    letter-spacing: 0.03em;
}

@media (min-width: 900px) {
    .mx-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
    .mx-form > .form-status,
    .mx-form > .form-field--wide,
    .mx-form > .form-consent,
    .mx-form > .form-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .form-privacy { padding: 0.9rem 1rem; }
    .form-submit { width: 100%; }
}

.form-noscript {
    margin: 16px 0 0;
    padding: 12px 16px;
    border: 1px solid #c7cbce;
    background: #eceef0;
    font-size: 14px;
    line-height: 1.6;
}
