/* =========================================================
   MAMAHOOD — BANKING DETAILS UPDATE
   ========================================================= */
/*
 * Shared Gravity Forms presentation for:
 * 1) My Business Desk → Manage Advertising → Update Banking Details; and
 * 2) the rare registration-exception secure banking-correction page.
 *
 * The Business Desk application shell/hero remains owned by Business Desk.
 * This module owns the shared Banking Details Gravity Form presentation and
 * the standalone exception-page hero so both routes feel like one experience.
 */

body.mh-banking-details-page,
.mh-bd-banking-live-form {
    --mh-bank-navy: #073570;
    --mh-bank-raspberry: #F23883;
    --mh-bank-raspberry-dark: #D92D70;
    --mh-bank-stone: #F7F3ED;
    --mh-bank-soft: #FAF7F3;
    --mh-bank-line: rgba(7, 53, 112, 0.14);
    --mh-bank-line-strong: rgba(7, 53, 112, 0.22);
    --mh-bank-text: #26374F;
    --mh-bank-muted: #687588;
}

/* =========================================================
   STANDALONE REGISTRATION-EXCEPTION PAGE
   ========================================================= */

body.mh-banking-details-page .entry-header,
body.mh-banking-details-page .page-header,
body.mh-banking-details-page .entry-title,
body.mh-banking-details-page .page-title,
body.mh-banking-details-page .entry-hero,
body.mh-banking-details-page .entry-hero-container-inner {
    display: none !important;
}

body.mh-banking-details-page .entry-content,
body.mh-banking-details-page .content-area,
body.mh-banking-details-page main {
    overflow: visible !important;
}

body.mh-banking-details-page .mh-public-banking-wrap {
    width: min(1040px, calc(100% - 40px));
    margin: 28px auto 72px;
    font-family: "DM Sans", sans-serif;
}

body.mh-banking-details-page .mh-public-banking-hero {
    position: relative;
    min-height: 390px;
    margin: 0 0 28px;
    overflow: hidden;
    border-radius: 0;
    background-color: var(--mh-bank-stone);
    background-image: var(--mh-banking-hero-image);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

body.mh-banking-details-page .mh-public-banking-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        90deg,
        rgb(247,243,237) 0%,
        rgb(247,243,237) 10%,
        rgba(247,243,237,.96) 18%,
        rgba(247,243,237,.78) 28%,
        rgba(247,243,237,.55) 38%,
        rgba(247,243,237,.32) 48%,
        rgba(247,243,237,.16) 56%,
        rgba(247,243,237,.07) 62%,
        rgba(247,243,237,.02) 66%,
        rgba(247,243,237,0) 68%
    );
    pointer-events: none;
}

body.mh-banking-details-page .mh-public-banking-hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 390px;
    max-width: 600px;
    padding: 72px 48px;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: center;
}

body.mh-banking-details-page .mh-public-banking-eyebrow {
    margin: 0 0 22px;
    color: var(--mh-bank-raspberry);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
}

body.mh-banking-details-page .mh-public-banking-hero h1 {
    max-width: 560px;
    margin: 0 0 18px;
    color: var(--mh-bank-navy);
    font-family: "DM Sans", sans-serif;
    font-size: clamp(38px, 5.2vw, 62px);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -.045em;
}

body.mh-banking-details-page .mh-public-banking-hero p:last-child {
    max-width: 500px;
    margin: 0;
    color: var(--mh-bank-navy);
    font-size: 17px;
    line-height: 1.55;
}

/* =========================================================
   SHARED FORM CARD
   ========================================================= */

body.mh-banking-details-page .mh-banking-form-card,
.mh-bd-banking-live-form .mh-banking-form-card {
    width: 100%;
    box-sizing: border-box;
    padding: 38px 40px 42px;
    background: #FFFFFF;
    border: 1px solid rgba(7, 53, 112, 0.10);
    border-radius: 22px;
    box-shadow: 0 14px 38px rgba(7, 53, 112, 0.065);
    font-family: "DM Sans", sans-serif;
}

.mh-bd-banking-live-form {
    margin: 0 0 30px;
}

body.mh-banking-details-page .mh-banking-form-intro,
.mh-bd-banking-live-form .mh-banking-form-intro {
    margin: 0 0 28px;
}

body.mh-banking-details-page .mh-banking-form-intro h2,
.mh-bd-banking-live-form .mh-banking-form-intro h2 {
    margin: 0 0 8px;
    color: var(--mh-bank-navy);
    font-family: "DM Sans", sans-serif;
    font-size: clamp(27px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.025em;
}

body.mh-banking-details-page .mh-banking-form-intro p,
.mh-bd-banking-live-form .mh-banking-form-intro p {
    max-width: 780px;
    margin: 0 0 7px;
    color: var(--mh-bank-muted);
    font-size: 14px;
    line-height: 1.6;
}

body.mh-banking-details-page .mh-banking-form-intro .mh-banking-form-note,
.mh-bd-banking-live-form .mh-banking-form-intro .mh-banking-form-note {
    margin-top: 8px;
    color: #516178;
}

/* =========================================================
   GRAVITY FORMS — MATCH ADVERTISING REGISTRATION
   ========================================================= */

body.mh-banking-details-page .mh-banking-form-host .gform_wrapper,
.mh-bd-banking-live-form .mh-banking-form-host .gform_wrapper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    font-family: "DM Sans", sans-serif !important;
}

body.mh-banking-details-page .mh-banking-form-host .gform_wrapper form,
.mh-bd-banking-live-form .mh-banking-form-host .gform_wrapper form {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.mh-banking-details-page .mh-banking-form-host .gform_heading,
.mh-bd-banking-live-form .mh-banking-form-host .gform_heading {
    display: none !important;
}

body.mh-banking-details-page .mh-banking-form-host .gform_fields,
.mh-bd-banking-live-form .mh-banking-form-host .gform_fields {
    /*
     * Gravity Forms treats each field as a grid item. Keep the outer grid gap
     * neutral and put the vertical rhythm on the complete field itself so the
     * next label can never look attached to the previous input.
     */
    row-gap: 0 !important;
    column-gap: 20px !important;
}

body.mh-banking-details-page .mh-banking-form-host .gfield,
.mh-bd-banking-live-form .mh-banking-form-host .gfield {
    min-width: 0 !important;
    margin: 0 0 24px !important;
}

body.mh-banking-details-page .mh-banking-form-host .gform_fields > .gfield:last-child,
.mh-bd-banking-live-form .mh-banking-form-host .gform_fields > .gfield:last-child {
    margin-bottom: 0 !important;
}

body.mh-banking-details-page .mh-banking-form-host .gfield_label,
body.mh-banking-details-page .mh-banking-form-host legend.gfield_label,
.mh-bd-banking-live-form .mh-banking-form-host .gfield_label,
.mh-bd-banking-live-form .mh-banking-form-host legend.gfield_label {
    margin: 0 0 5px !important;
    color: var(--mh-bank-navy) !important;
    font-family: "DM Sans", sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

body.mh-banking-details-page .mh-banking-form-host .gfield_required,
body.mh-banking-details-page .mh-banking-form-host .gfield_required_text,
.mh-bd-banking-live-form .mh-banking-form-host .gfield_required,
.mh-bd-banking-live-form .mh-banking-form-host .gfield_required_text {
    color: var(--mh-bank-raspberry) !important;
}

body.mh-banking-details-page .mh-banking-form-host .gfield_description,
body.mh-banking-details-page .mh-banking-form-host .instruction,
.mh-bd-banking-live-form .mh-banking-form-host .gfield_description,
.mh-bd-banking-live-form .mh-banking-form-host .instruction {
    /* Keep guidance visually attached to the field it explains. */
    margin: 5px 0 0 !important;
    padding: 0 !important;
    color: var(--mh-bank-muted) !important;
    font-family: "DM Sans", sans-serif !important;
    font-size: 12.5px !important;
    line-height: 1.5 !important;
}

body.mh-banking-details-page .mh-banking-form-host input[type="text"],
body.mh-banking-details-page .mh-banking-form-host select,
.mh-bd-banking-live-form .mh-banking-form-host input[type="text"],
.mh-bd-banking-live-form .mh-banking-form-host select {
    width: 100% !important;
    min-height: 52px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 13px 15px !important;
    background: #FFFFFF !important;
    border: 1px solid var(--mh-bank-line-strong) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    color: var(--mh-bank-text) !important;
    font-family: "DM Sans", sans-serif !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    transition: border-color .16s ease, box-shadow .16s ease !important;
}

body.mh-banking-details-page .mh-banking-form-host input[type="text"]:focus,
body.mh-banking-details-page .mh-banking-form-host select:focus,
.mh-bd-banking-live-form .mh-banking-form-host input[type="text"]:focus,
.mh-bd-banking-live-form .mh-banking-form-host select:focus {
    outline: none !important;
    border-color: var(--mh-bank-raspberry) !important;
    box-shadow: 0 0 0 3px rgba(242,56,131,.09) !important;
}

body.mh-banking-details-page .mh-banking-form-host .ginput_counter,
.mh-bd-banking-live-form .mh-banking-form-host .ginput_counter {
    margin: 6px 0 0 !important;
    color: #8A95A4 !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
}

/*
 * Account Number has both Gravity Forms' character counter and our help
 * sentence. Keep those two pieces together directly under the input rather
 * than letting the help sentence drift towards the following field label.
 */
body.mh-banking-details-page .mh-banking-form-host .ginput_counter + .gfield_description,
.mh-bd-banking-live-form .mh-banking-form-host .ginput_counter + .gfield_description {
    margin-top: 3px !important;
}

/* The registration form only asks for these when Bank = Other. */
body.mh-banking-details-page .mh-banking-form-host .mh-bank-other-field,
.mh-bd-banking-live-form .mh-banking-form-host .mh-bank-other-field {
    display: none !important;
}

body.mh-banking-details-page .mh-banking-form-host.mh-banking-other-visible .mh-bank-other-field,
.mh-bd-banking-live-form .mh-banking-form-host.mh-banking-other-visible .mh-bank-other-field {
    display: block !important;
}

body.mh-banking-details-page .mh-banking-form-host .gfield_checkbox,
.mh-bd-banking-live-form .mh-banking-form-host .gfield_checkbox {
    margin: 0 !important;
}

body.mh-banking-details-page .mh-banking-form-host .gfield_checkbox .gchoice,
.mh-bd-banking-live-form .mh-banking-form-host .gfield_checkbox .gchoice {
    display: grid !important;
    grid-template-columns: 22px minmax(0,1fr) !important;
    gap: 10px !important;
    align-items: start !important;
}

body.mh-banking-details-page .mh-banking-form-host input[type="checkbox"],
.mh-bd-banking-live-form .mh-banking-form-host input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin: 2px 0 0 !important;
    accent-color: var(--mh-bank-raspberry) !important;
}

body.mh-banking-details-page .mh-banking-form-host .gfield_checkbox label,
.mh-bd-banking-live-form .mh-banking-form-host .gfield_checkbox label {
    max-width: none !important;
    color: var(--mh-bank-text) !important;
    font-size: 13.5px !important;
    line-height: 1.55 !important;
}

body.mh-banking-details-page .mh-banking-form-host .gform_footer,
.mh-bd-banking-live-form .mh-banking-form-host .gform_footer {
    margin: 30px 0 0 !important;
    padding: 0 !important;
}

body.mh-banking-details-page .mh-banking-form-host .gform_button,
body.mh-banking-details-page .mh-banking-form-host input[type="submit"],
.mh-bd-banking-live-form .mh-banking-form-host .gform_button,
.mh-bd-banking-live-form .mh-banking-form-host input[type="submit"] {
    min-height: 50px !important;
    margin: 0 !important;
    padding: 13px 24px !important;
    background: var(--mh-bank-raspberry) !important;
    border: 1px solid var(--mh-bank-raspberry) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: #FFFFFF !important;
    font-family: "DM Sans", sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
}

body.mh-banking-details-page .mh-banking-form-host .gform_button:hover,
body.mh-banking-details-page .mh-banking-form-host input[type="submit"]:hover,
.mh-bd-banking-live-form .mh-banking-form-host .gform_button:hover,
.mh-bd-banking-live-form .mh-banking-form-host input[type="submit"]:hover {
    background: var(--mh-bank-raspberry-dark) !important;
    border-color: var(--mh-bank-raspberry-dark) !important;
}

/* Validation stays clear but friendly. */
body.mh-banking-details-page .mh-banking-form-host .gform_validation_errors,
.mh-bd-banking-live-form .mh-banking-form-host .gform_validation_errors {
    margin: 0 0 24px !important;
    padding: 16px 18px !important;
    background: #FFF7F4 !important;
    border: 1px solid rgba(190,75,45,.28) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

body.mh-banking-details-page .mh-banking-form-host .gform_validation_errors h2,
.mh-bd-banking-live-form .mh-banking-form-host .gform_validation_errors h2 {
    margin: 0 !important;
    color: #9B3D27 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

body.mh-banking-details-page .mh-banking-form-host .gfield_validation_message,
.mh-bd-banking-live-form .mh-banking-form-host .gfield_validation_message {
    margin-top: 7px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    color: #9B3D27 !important;
    font-size: 12.5px !important;
    line-height: 1.5 !important;
}

/* =========================================================
   SUCCESS / EXCEPTION MESSAGES
   ========================================================= */

body.mh-banking-details-page .mh-banking-update-success,
body.mh-banking-details-page .mh-banking-update-error,
.mh-bd-banking-live-form .mh-banking-update-success,
.mh-bd-banking-live-form .mh-banking-update-error {
    box-sizing: border-box;
    padding: 28px 30px;
    background: #FFFFFF;
    border: 1px solid rgba(7,53,112,.10);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(7,53,112,.05);
    color: var(--mh-bank-text);
    font-family: "DM Sans", sans-serif;
}

body.mh-banking-details-page .mh-banking-update-success h2,
.mh-bd-banking-live-form .mh-banking-update-success h2 {
    margin: 0 0 8px;
    color: var(--mh-bank-navy);
    font-size: 25px;
    line-height: 1.2;
}

body.mh-banking-details-page .mh-banking-update-success p,
body.mh-banking-details-page .mh-banking-update-error p,
.mh-bd-banking-live-form .mh-banking-update-success p,
.mh-bd-banking-live-form .mh-banking-update-error p {
    margin: 0;
    color: var(--mh-bank-muted);
    font-size: 14px;
    line-height: 1.6;
}

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

@media (max-width: 800px) {
    body.mh-banking-details-page .mh-public-banking-hero {
        min-height: 540px;
        background-position: 63% center;
    }

    body.mh-banking-details-page .mh-public-banking-hero::before {
        background: linear-gradient(
            180deg,
            rgb(247,243,237) 0%,
            rgba(247,243,237,.98) 35%,
            rgba(247,243,237,.78) 54%,
            rgba(247,243,237,.32) 68%,
            rgba(247,243,237,0) 78%
        );
    }

    body.mh-banking-details-page .mh-public-banking-hero-copy {
        min-height: 300px;
        max-width: none;
        padding: 44px 28px;
        justify-content: flex-start;
    }

    body.mh-banking-details-page .mh-banking-form-card,
    .mh-bd-banking-live-form .mh-banking-form-card {
        padding: 30px 26px 34px;
        border-radius: 18px;
    }
}

@media (max-width: 520px) {
    body.mh-banking-details-page .mh-public-banking-wrap {
        width: min(100% - 24px, 1040px);
        margin-top: 16px;
    }

    body.mh-banking-details-page .mh-public-banking-hero {
        min-height: 500px;
        background-position: 64% center;
    }

    body.mh-banking-details-page .mh-public-banking-hero-copy {
        padding: 34px 20px;
    }

    body.mh-banking-details-page .mh-public-banking-hero h1 {
        font-size: 39px;
    }

    body.mh-banking-details-page .mh-banking-form-card,
    .mh-bd-banking-live-form .mh-banking-form-card {
        padding: 26px 20px 30px;
    }
}
