/* ==========================================================================
   Contact Form Block — Smith 2.0
   Two columns: form left, photo + fraud notice right. Underline-style inputs.
   ========================================================================== */

.smith-contact-form {
    background-color: var(--color-white, #fff);
    padding: clamp(3.5rem, 9vw, 7rem) clamp(1.25rem, 5vw, 4rem); /* Figma 112/64 */
}

.smith-contact-form__inner {
    max-width: 1280px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Figma 600/600, 80px gap */
    gap: 5rem;
    align-items: start;
}

.smith-contact-form__heading {
    margin: 0 0 2.5rem; /* Figma heading -> form gap 40px */
    font-family: var(--font-family-heading, "Hoefler Text", Georgia, serif);
    font-weight: 400; /* 400: Smith Style Guide - Hoefler Text is Regular. See docs/DECISIONS.md D8 */
    font-size: 3.25rem; /* Figma 52px */
    line-height: 1.2;
    color: var(--color-blue-zodiac, #0e1b44);
}

.smith-contact-form__intro {
    margin: -0.5rem 0 1.5rem;
    font-family: var(--font-family-base, "Barlow", sans-serif);
    font-size: 1.125rem;
    color: rgba(14, 27, 68, 0.8);
}

.smith-contact-form__row {
    display: flex;
    gap: 2.5rem; /* Figma two-up gap 40px */
}
.smith-contact-form__row .smith-contact-form__field { flex: 1 1 0; }

.smith-contact-form__field {
    margin-bottom: 2.5rem; /* Figma gap between fields 40px */
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Figma label -> input 8px */
}

.smith-contact-form__field label {
    font-family: var(--font-family-base, "Barlow", sans-serif);
    font-weight: 700;
    font-size: 1rem; /* Figma Barlow Bold 16px */
    color: var(--color-blue-zodiac, #0e1b44);
}
.smith-contact-form__field span { color: var(--color-surfie-green, #0f7e7c); }

/* BugZap #213: newsletter opt-in row. The markup is already right - a <label>
   wrapping the checkbox and a <span> - so this is layout only, no template
   change. Flex puts the box to the LEFT of the text and keeps the text in one
   block rather than wrapping under the control. `align-items: flex-start` so a
   wrapped two-line message stays aligned to the box instead of centring
   against it. 14px per her "14px or so"; flex-shrink: 0 stops the box being
   squeezed by the text at narrow widths, which is what would otherwise happen
   inside a flex row. */
.smith-contact-form__optin {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.smith-contact-form__field--optin input[type="checkbox"] {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    margin: 0;
    /* Nudge down so the box sits on the first line's cap height rather than
       its top edge - 17px copy at 1.5 line-height leaves ~4px of leading. */
    margin-top: 4px;
    accent-color: var(--color-surfie-green, #0f7e7c);
}

.smith-contact-form__optin span {
    flex: 1 1 auto;
    min-width: 0;
}

/* BugZap #213: `input` here used to be unqualified, so the newsletter opt-in
   CHECKBOX was picking up the text-input treatment - width 100%, height 48px,
   padding, a bottom border and a tinted background. Measured on /contact-us/:
   the checkbox rendered 604 x 48px, i.e. the full width of its own label, which
   is why Christine asked for "a text size check box positioned to the left of
   the text - 14px or so". Excluding the two control types that are boxes
   rather than fields; they are laid out just below. */
.smith-contact-form__field input:not([type="checkbox"]):not([type="radio"]),
.smith-contact-form__field select,
.smith-contact-form__field textarea {
    width: 100%;
    box-sizing: border-box;
    height: 48px; /* Figma text input 48px */
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid rgba(15, 126, 124, 0.6);
    background: rgba(15, 126, 124, 0.05);
    font-family: var(--font-family-base, "Barlow", sans-serif);
    font-size: 1rem;
    color: var(--color-blue-zodiac, #0e1b44);
    border-radius: 0;
}

.smith-contact-form__field textarea {
    height: 180px; /* Figma text area 180px */
    padding: 0.75rem;
    resize: vertical;
}

/* Reason select sits in a divider band (Figma: 24px vertical padding, hairlines) */
.smith-contact-form__field--reason {
    padding: 24px 0;
    border-top: 1px solid rgba(9, 10, 7, 0.15);
    border-bottom: 1px solid rgba(9, 10, 7, 0.15);
}

/* reCAPTCHA placeholder (Figma 302x74) — replaced by the live widget later */
.smith-contact-form__recaptcha {
    width: 302px;
    max-width: 100%;
    height: 74px;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0 12px;
    background: #f9f9f9;
    border: 1px solid #d3d3d3;
    border-radius: 3px;
    box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.08);
    margin-bottom: 2.5rem;
}
.smith-contact-form__recaptcha-box {
    width: 24px;
    height: 24px;
    border: 2px solid #c1c1c1;
    border-radius: 2px;
    background: #fff;
}
.smith-contact-form__recaptcha-label {
    font-family: var(--font-family-base, "Barlow", sans-serif);
    font-size: 0.875rem;
    color: #282727;
}
.smith-contact-form__recaptcha-brand {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-family: var(--font-family-base, "Barlow", sans-serif);
    font-size: 8px;
    color: #555;
}

.smith-contact-form__field input:focus,
.smith-contact-form__field select:focus,
.smith-contact-form__field textarea:focus {
    outline: none;
    border-color: var(--color-surfie-green, #0f7e7c);
    border-bottom-width: 2px;
}

.smith-contact-form__form .btn--cta { margin-top: 0.5rem; }
.smith-contact-form__form .btn--cta[disabled] { opacity: 0.6; cursor: not-allowed; }

/* --- Aside: photo + notice ------------------------------------------------- */
.smith-contact-form__photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 300 / 229; /* Figma 600x458 */
    object-fit: cover;
    margin-bottom: 2.5rem; /* Figma photo -> notice gap 40px */
}

.smith-contact-form__notice {
    display: flex;
    align-items: center;
    gap: 1.25rem; /* Figma icon -> text 20px */
    padding: 20px 40px; /* Figma 40px horizontal / 20px vertical */
    background-color: var(--color-pampas, #f9f8f5);
}

.smith-contact-form__notice-icon {
    flex: 0 0 auto;
    width: 40px; /* Figma 40x40 */
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-selective-yellow, #f0b200);
    color: var(--color-blue-zodiac, #0e1b44);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.smith-contact-form__notice-text {
    margin: 0;
    font-family: var(--font-family-base, "Barlow", sans-serif);
    font-style: italic;
    font-size: 1.25rem; /* Figma Barlow Italic 20px */
    line-height: 1.5;
    color: rgba(14, 27, 68, 0.85);
}

@media (max-width: 860px) {
    .smith-contact-form { padding: 4rem 1.5rem; }
    .smith-contact-form__inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .smith-contact-form__row { flex-direction: column; gap: 0; }
}



/* Frame (Contact/7): the heading runs a single line past the 600 column, the
   photo column tops level with the first field row (+100), not the heading. */
@media (min-width: 992px) {
    .smith-contact-form__heading {
        white-space: nowrap;
    }
    .smith-contact-form__photo {
        margin-top: 100px;
    }
}
