/* BC Form - flex layout `bc_form`
   Live .ns_bc_section_form: #F7F9FB band, grid 1fr / 1.1fr, 64px gap, stretched
   rows. Text column is a flex column: eyebrow 11px #8a8a8a, h2 Teko 44px/800
   navy + sky, copy 16px/1.6; the photo (32px above, min 240px) flexes to finish
   level with the card. Card: white, 1px #EBEBEB border, 32px padding, 0 20px 50px
   navy 6% shadow. Fields 2-col 16px gap: labels 10px/700 1.5px #8a8a8a, inputs
   14px on #FAFAFA with 1px #EBEBEB border, 5px radius, 12px 14px padding, sky
   focus border; consent 12px #5A5A5A; full-width submit; 11px centred note. */
.bc_form {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #F7F9FB;
    color: var(--text);

    & .bc_form_anchor {
        position: absolute;
        top: 0;
        left: 0;
        width: 0;
        height: 0;
    }

    & .bc_form_grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
        gap: 64px;
        align-items: stretch;
    }

    & .bc_form_text {
        display: flex;
        flex-direction: column;
    }

    & .bc_form_eyebrow {
        display: block;
        margin: 0 0 16px;
        font-family: var(--font-body);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: #8A8A8A;
    }

    & .bc_form_title {
        margin: 0 0 28px;
        font-family: var(--font-display);
        font-size: 44px;
        font-weight: 800;
        line-height: 1.05;
        letter-spacing: 0;
        text-transform: uppercase;
        color: var(--primary);

        & .bc_form_title_highlight { color: var(--secondary); }
    }

    & .bc_form_content {
        & p {
            margin: 0 0 16px;
            font-family: var(--font-body);
            font-size: 16px;
            line-height: 1.6;
            color: var(--text);
        }

        & p:last-child { margin-bottom: 0; }
        & a { color: var(--secondary); }
    }

    & .bc_form_image {
        flex: 1 1 auto;
        min-height: 240px;
        margin-top: 32px;
        overflow: hidden;

        & img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
        }
    }

    & .bc_form_card {
        padding: 32px;
        border: 1px solid var(--grey-2);
        background: var(--white);
        box-shadow: 0 20px 50px rgba(8, 35, 60, .06);
    }

    /* Fallback form */
    & .bc_form_fallback_grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    & .bc_form_field {
        display: flex;
        flex-direction: column;

        &.is_full { grid-column: 1 / -1; }

        & label {
            margin-bottom: 6px;
            font-family: var(--font-body);
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            color: #8A8A8A;
        }

        & input,
        & select,
        & textarea {
            width: 100%;
            padding: 12px 14px;
            border: 1px solid var(--grey-2);
            border-radius: var(--radius-sm);
            background: #FAFAFA;
            font-family: var(--font-body);
            font-size: 14px;
            line-height: 1.4;
            color: var(--text);
            box-sizing: border-box;
            transition: border-color .15s var(--ease), background-color .15s var(--ease);

            &:focus {
                outline: none;
                border-color: var(--secondary);
                background: var(--white);
            }
        }
    }

    & .bc_form_required {
        color: var(--secondary);
    }

    & .bc_form_consent {
        grid-column: 1 / -1;
        display: flex;
        align-items: flex-start;
        gap: 10px;
        margin-top: 4px;

        & input[type="checkbox"] {
            flex: 0 0 18px;
            width: 18px;
            height: 18px;
            margin: 2px 0 0;
            accent-color: var(--secondary);
        }

        & label {
            margin: 0;
            font-family: var(--font-body);
            font-size: 12px;
            font-weight: 400;
            line-height: 1.5;
            letter-spacing: 0;
            text-transform: none;
            color: #5A5A5A;

            & a {
                font-weight: 700;
                color: var(--primary);
                text-decoration: underline;

                &:hover,
                &:focus { color: var(--secondary); }
            }
        }
    }

    & .bc_form_submit {
        width: 100%;
        margin-top: 20px;
    }

    & .bc_form_note {
        margin: 16px 0 0;
        font-family: var(--font-body);
        font-size: 11px;
        line-height: 1.5;
        text-align: center;
        color: #8A8A8A;
    }

    /* Formidable form (live form 11) - pull inputs and submit back to the card tokens */
    & .frm_forms { background: transparent; }

    & .frm_form_field {
        margin-bottom: 16px;

        & > label,
        & > .frm_primary_label {
            display: block;
            margin-bottom: 6px;
            font-family: var(--font-body);
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            color: #8A8A8A;
        }

        & .frm_required { color: var(--secondary); }

        & input[type="text"],
        & input[type="email"],
        & input[type="tel"],
        & input[type="number"],
        & select,
        & textarea {
            width: 100%;
            padding: 12px 14px;
            border: 1px solid var(--grey-2);
            border-radius: var(--radius-sm);
            background: #FAFAFA;
            font-family: var(--font-body);
            font-size: 14px;
            line-height: 1.4;
            color: var(--text);
            box-sizing: border-box;

            &:focus {
                outline: none;
                border-color: var(--secondary);
                background: var(--white);
            }
        }

        & textarea {
            min-height: 120px;
            resize: vertical;
        }

        & .frm_checkbox label {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-family: var(--font-body);
            font-size: 12px;
            font-weight: 400;
            line-height: 1.5;
            letter-spacing: 0;
            text-transform: none;
            color: #5A5A5A;

            & input[type="checkbox"] {
                flex: 0 0 18px;
                width: 18px;
                height: 18px;
                margin: 2px 0 0;
                accent-color: var(--secondary);
            }

            & a {
                font-weight: 700;
                color: var(--primary);
                text-decoration: underline;
            }
        }
    }

    & .frm_submit { margin-top: 8px; }

    & .frm_button_submit,
    & .frm_final_submit {
        width: 100%;
    }

    @media (max-width: 991px) {
        & .bc_form_grid {
            grid-template-columns: 1fr;
            gap: 40px;
        }

        /* Stacked: no neighbouring column to match, so the image takes its own height */
        & .bc_form_image {
            flex: 0 0 auto;
            min-height: 0;

            & img {
                height: auto;
                max-height: 360px;
            }
        }
    }

    @media (max-width: 600px) {
        & .bc_form_title { font-size: 34px; }
        & .bc_form_fallback_grid { grid-template-columns: 1fr; }
        & .bc_form_card { padding: 24px; }
        & .bc_form_image { margin-top: 24px; }
        & .bc_form_image img { max-height: 260px; }
    }
}
