/* =====================================================================
   Mazda UAE - shared header, footer, side icons and callback popup
   (facelift design, every page)
   Loaded by Views/master.cshtml, which puts the hf-chrome class on
   <html>; every rule is scoped under html.hf-chrome, so without that
   class nothing here applies. Behaviour (header layout, pinned header,
   popup closing) lives in scripts/site-chrome.js.
   The page bodies keep their own styles; the home page sections are in
   css/home-facelift.css.
   ===================================================================== */

/* ---------- Arabic type for the header, footer and popup ----------
   MazdaType has no Arabic letters, so Arabic text falls back to whatever the visitor's
   system has. "Mazda Arabic" is IBM Plex Sans Arabic for the Arabic code points only
   (unicode-range); it is listed after MazdaType, so Latin letters and digits stay
   MazdaType. Same weights as MazdaType (400 / 500 / 700). Only downloaded when Arabic
   text is shown in one of these areas. */
@font-face {
    font-family: "Mazda Arabic";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/ibmplexsansarabic/v15/Qw3CZRtWPQCuHme67tEYUIx3Kh0PHR9N6Ys43PWrfQ.woff2) format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: "Mazda Arabic";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/ibmplexsansarabic/v15/Qw3NZRtWPQCuHme67tEYUIx3Kh0PHR9N6YPO_-CRXMR5Kw.woff2) format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: "Mazda Arabic";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/ibmplexsansarabic/v15/Qw3NZRtWPQCuHme67tEYUIx3Kh0PHR9N6YOG-eCRXMR5Kw.woff2) format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* ---------- tokens ---------- */
html.hf-chrome {
    --hf-ink: #0b0b0c;
    --hf-accent: #911921;
    --hf-accent-hi: #c8202b;
    --hf-ease: cubic-bezier(.2, .7, .2, 1);
    --hf-ease-out: cubic-bezier(.16, 1, .3, 1);
    --hf-gutter: clamp(16px, 4vw, 48px);
    --hf-head-h: 125px;
    --hf-chrome-font: "MazdaType", "Mazda Arabic", "Mazda Type", Helvetica, Arial, sans-serif;
}
html.hf-chrome.hf-head-fixed { --hf-head-h: 76px; }
@media (max-width: 959px) {
    html.hf-chrome, html.hf-chrome.hf-head-fixed { --hf-head-h: 75px; }
}

/* =====================================================================
   HEADER (shared partial, Views/Partials/Navigation)
   ===================================================================== */
html.hf-chrome .header-global__spacer { background: var(--hf-ink); }
html.hf-chrome .header-global__inner-wrapper {
    background: var(--hf-ink);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    transition: transform .5s var(--hf-ease-out), background-color .4s, box-shadow .4s, height .4s var(--hf-ease);
}
html.hf-chrome.hf-head-fixed .header-global__inner-wrapper {
    position: fixed;
    height: var(--hf-head-h);
    background: rgba(11, 11, 12, .8);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
}
html.hf-chrome.hf-head-fixed.hf-head-away .header-global__inner-wrapper {
    transform: translateY(calc(-100% - 2px));
    box-shadow: none;
}
html.hf-chrome.hf-head-instant .header-global__inner-wrapper { transition: none !important; }

html.hf-chrome .header-global .header-global__logo-link .header-global__logo { transition: width .4s var(--hf-ease); }
html.hf-chrome.hf-head-fixed .header-global .header-global__flyout .header-global__flyout__item {
    position: fixed;
    top: var(--hf-head-h);
    max-height: calc(100vh - var(--hf-head-h));
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* ---------- desktop layout (960px and up) ----------
   Row 1, a slim utility strip: Locations, Book a service, E-brochure, Fleet, Pre-owned ... Contact us + language.
   Row 2, the main bar: logo | main menus, centred | "Book a test drive" button (built by site-chrome.js
   from the header's own Test Drive link, which then leaves the strip).
   Once pinned, only the main bar stays. */
@media (min-width: 960px) {
    html.hf-chrome .header-global__inner-wrapper::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 40px;
        background: #050506;
        border-bottom: 1px solid rgba(255, 255, 255, .07);
        transition: opacity .3s;
    }
    html.hf-chrome.hf-head-fixed .header-global__inner-wrapper::before { display: none; }

    html.hf-chrome .header-global__inner-container {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
        grid-template-rows: 40px minmax(0, 1fr);
        grid-template-areas: "util util util" "logo nav cta";
        align-items: center;
        height: 100%;
    }
    html.hf-chrome.hf-head-fixed .header-global__inner-container { grid-template-rows: 0 minmax(0, 1fr); }
    html.hf-chrome .header-global__inner-wrapper__right { display: contents; }

    /* logo */
    html.hf-chrome .header-global__inner-wrapper__left { grid-area: logo; justify-self: start; align-items: flex-start; width: auto; }
    html.hf-chrome .header-global .header-global__logo-link .header-global__logo { width: 62px; }
    html.hf-chrome.hf-head-fixed .header-global .header-global__logo-link .header-global__logo { width: 50px; }

    /* utility strip */
    html.hf-chrome .header-global__menu__upper { grid-area: util; min-width: 0; height: 40px; align-items: center; margin: 0; }
    html.hf-chrome.hf-head-fixed .header-global__menu__upper { display: none; }
    html.hf-chrome .header-global__menu__upper .header-global__nav { width: 100%; align-items: center; }
    html.hf-chrome .header-global__menu__upper .header-global__nav__list { flex: 1 1 auto; min-width: 0; align-items: center; }
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item { padding: 0 14px; }
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item:first-child { padding-inline-start: 0; }
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item-link {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        white-space: nowrap;
        font-size: 11px;
        letter-spacing: .14em;
        line-height: 40px;
        color: #8f8f8f;
        transition: color .3s;
    }
    html.hf-chrome .header-global__menu__upper .hf-head-icon { width: 14px; height: 14px; flex: none; opacity: .75; }
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item-link:hover { color: #fff; }

    /* order: the places people go most first, "Contact us" at the far end next to the language switch */
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item:has(> a[href*="locations"]) { order: 1; }
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item:has(> a[href*="book-a-service"]) { order: 2; }
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item:has(> a[href*="brochure"]) { order: 3; }
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item:has(> a[href*="fleet"]) { order: 4; }
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item:has(> a[href*="preowned"]) { order: 5; }
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item:has(> a[href*="contact"]) { order: 9; margin-inline-start: auto; }
    html.hf-chrome.hf-head-cta-ready .header-global__menu__upper .header-global__nav__list-item:has(> a[href*="test-drive"]) { display: none; }

    /* language: a small two-way switch */
    html.hf-chrome .header-global__nav__list--lang {
        display: flex;
        align-items: center;
        flex: none;
        margin-inline-start: 6px;
        padding: 2px;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 999px;
    }
    html.hf-chrome .header-global__nav__list--lang .header-global__nav__list-item { padding: 0; }
    html.hf-chrome .header-global__nav__list--lang .header-global__nav__list-item::before,
    html.hf-chrome .header-global__nav__list--lang .header-global__nav__list-item::after { display: none !important; }
    html.hf-chrome .header-global__nav__list--lang .header-global__nav__list-item-link {
        display: block;
        min-width: 34px;
        padding: 0 9px;
        border-radius: 999px;
        font-size: 10px;
        letter-spacing: .14em;
        line-height: 22px;
        text-align: center;
        text-transform: uppercase;
        color: #9a9a9a;
        transition: color .3s, background-color .3s;
    }
    html.hf-chrome .header-global__nav__list--lang .header-global__nav__list-item-link.active { background: #fff; color: #0b0b0c; }
    html.hf-chrome .header-global__nav__list--lang a.header-global__nav__list-item-link:hover { color: #fff; }

    /* main menus, centred */
    html.hf-chrome .header-global__menu__lower { grid-area: nav; justify-self: center; margin: 0; }
    html.hf-chrome .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item { padding: 0 17px; }
    html.hf-chrome .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item:last-child {
        margin-inline-start: 6px;
        padding-inline-start: 23px;
        border-inline-start: 1px solid rgba(255, 255, 255, .14);
    }
    html.hf-chrome .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item-link {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        white-space: nowrap;
        font-size: 12.5px;
        letter-spacing: .17em;
        color: #e2e2e2;
        transition: color .3s;
    }
    html.hf-chrome .hf-head-caret {
        width: 6px;
        height: 6px;
        flex: none;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        opacity: .55;
        transform: translateY(-2px) rotate(45deg);
        transition: transform .35s var(--hf-ease), opacity .3s;
    }
    html.hf-chrome .header-global__nav__list-item-link.menu--active .hf-head-caret { transform: translateY(1px) rotate(225deg); opacity: 1; }

    /* thin white underline that draws in */
    html.hf-chrome .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item-link::after {
        background-color: #fff;
        width: 100%;
        left: 0;
        right: auto;
        bottom: -2px;
        opacity: 1;
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform .45s var(--hf-ease);
    }
    html.hf-chrome body.is-rtl .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item-link::after {
        left: auto;
        right: 0;
        transform-origin: right center;
    }
    html.hf-chrome .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item-link:hover,
    html.hf-chrome .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item-link.menu--active { color: #fff; }
    html.hf-chrome .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item-link:hover::after,
    html.hf-chrome .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item-link.menu--active::after { transform: scaleX(1); }

    /* test drive button */
    html.hf-chrome .hf-head-cta {
        grid-area: cta;
        justify-self: end;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        height: 44px;
        padding: 0 22px 0 16px;
        border-radius: 999px;
        background: #fff;
        color: #0b0b0c;
        font-family: var(--hf-chrome-font);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .16em;
        text-transform: uppercase;
        white-space: nowrap;
        text-decoration: none;
        transition: background-color .3s, color .3s, height .4s var(--hf-ease);
    }
    html.hf-chrome .hf-head-cta svg { width: 20px; height: 20px; flex: none; }
    html.hf-chrome .hf-head-cta:hover, html.hf-chrome .hf-head-cta:focus-visible { background: var(--hf-accent-hi); color: #fff; }
    html.hf-chrome .hf-head-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
    html.hf-chrome.hf-head-fixed .hf-head-cta { height: 40px; }
    html.hf-chrome body.is-rtl .hf-head-cta {
        padding: 0 16px 0 22px;
        font-family: var(--hf-chrome-font);
        font-size: 14px;
        letter-spacing: 0;
        text-transform: none;
    }
    html.hf-chrome body.is-rtl .header-global__menu__upper .header-global__nav__list-item-link,
    html.hf-chrome body.is-rtl .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item-link { letter-spacing: 0; }
    html.hf-chrome body.is-rtl .header-global__menu__upper .header-global__nav__list-item-link { font-size: 13px; }
}

/* 960-1199px: tighter spacing, no strip icons, so everything stays on one line */
@media (min-width: 960px) and (max-width: 1199px) {
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item { padding: 0 10px; }
    html.hf-chrome .header-global__menu__upper .header-global__nav__list-item-link { letter-spacing: .1em; }
    html.hf-chrome .header-global__menu__upper .hf-head-icon { display: none; }
    html.hf-chrome .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item { padding: 0 11px; }
    html.hf-chrome .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item:last-child { padding-inline-start: 15px; }
    html.hf-chrome .header-global__menu__lower .header-global__nav:not(.header-global__nav--mobile) .header-global__nav__list-item-link { font-size: 12px; letter-spacing: .12em; }
    html.hf-chrome .hf-head-cta { padding: 0 16px 0 12px; letter-spacing: .1em; }
}

/* phones and tablets keep the site's own compact header (logo, Vehicles, Menu) */
@media (max-width: 959px) {
    html.hf-chrome .hf-head-cta { display: none; }
}

@media (min-width: 1200px) {
    html.hf-chrome .header-global__inner-wrapper { padding-inline: 0; }
    html.hf-chrome .header-global__inner-container,
    html.hf-chrome .header-global .header-global__flyout__item-container { max-width: none; width: 85%; }
}

/* =====================================================================
   FOOTER (shared partial, Views/Partials/Navigation)
   ===================================================================== */
/* The footer follows the page instead of sitting in space reserved at the bottom (the site's
   padding-bottom + absolute footer). The page column becomes a flex column so the content
   area contains page content that ends in floats (e.g. the offers message) and short
   pages still end with the footer at the bottom of the screen. */
html.hf-chrome .page-container { display: flex; flex-direction: column; }
html.hf-chrome .content-container { flex: 1 0 auto; display: flow-root; padding-bottom: 0; }
html.hf-chrome .footer { flex: none; }
html.hf-chrome .footer {
    position: relative;
    bottom: auto;
    height: auto;
    padding: 0;
    background: var(--hf-ink);
    color: #f5f5f5;
}
html.hf-chrome .footer::before {
    content: "";
    display: block;
    height: 1px;
    background: rgba(255, 255, 255, .08);
}
html.hf-chrome .footer__inner-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "logo social" "nav nav" "copy copy";
    align-items: center;
    gap: 34px 32px;
    width: auto;
    max-width: none;
    margin: 0 auto;
    padding: clamp(48px, 6vw, 80px) var(--hf-gutter) 36px;
}
html.hf-chrome .footer__logo-slogan {
    grid-area: logo;
    justify-self: start;
    width: 76px;
    height: auto;
    margin: 0;
    float: none;
}
html.hf-chrome .footer__social {
    grid-area: social;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: auto;
    margin: 0;
    float: none;
    clear: none;
    text-align: start;
}
@media (min-width: 768px) {
    html.hf-chrome .footer__social { flex-wrap: nowrap; }
}
html.hf-chrome .footer__social .has-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .16);
    transition: background-color .3s, border-color .3s, transform .3s var(--hf-ease);
}
html.hf-chrome .footer__social .has-icon i { color: #cfcfcf; font-size: 16px; line-height: 1; transition: color .3s; }
@media (hover: hover) {
    html.hf-chrome .footer__social .has-icon:hover { background: var(--hf-accent); border-color: var(--hf-accent); transform: translateY(-3px); }
    html.hf-chrome .footer__social .has-icon:hover i { color: #fff; }
}
html.hf-chrome .footer__nav {
    grid-area: nav;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 14px 30px;
    width: auto;
    margin: 0;
    padding: 30px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .09);
    float: none;
    clear: none;
    text-align: start;
}
html.hf-chrome .footer__nav-list-item { margin: 0; }
/* The site re-adds a "|" after the cookie-preferences item (a !important rule, or a span set by script); this design spaces items with a gap instead. */
html.hf-chrome .footer .footer__nav > .footer__nav-list-item::after,
html.hf-chrome .footer__nav-list-item::after { display: none !important; }
html.hf-chrome .footer .gb-cookie-preference-separator { position: absolute !important; visibility: hidden !important; pointer-events: none; }
html.hf-chrome .footer__nav-list-item .hyperlink {
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #9a9a9a;
    transition: color .3s;
}
html.hf-chrome .footer__nav-list-item .hyperlink:hover { color: #fff; }
html.hf-chrome body.is-rtl .footer__nav-list-item .hyperlink { letter-spacing: 0; font-size: 13px; }
html.hf-chrome .footer__copyright {
    grid-area: copy;
    margin: 0;
    text-align: start;
    color: #6c6c6c;
    font-size: 11px;
    letter-spacing: .2em;
}
@media (min-width: 1200px) {
    html.hf-chrome .footer__inner-wrapper { width: 85%; padding-inline: 0; }
}
@media (max-width: 767px) {
    html.hf-chrome .footer__inner-wrapper {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "logo" "social" "nav" "copy";
        justify-items: center;
        text-align: center;
        gap: 26px;
    }
    html.hf-chrome .footer__logo-slogan { justify-self: center; width: 64px; }
    html.hf-chrome .footer__social { justify-content: center; }
    html.hf-chrome .footer__nav { justify-content: center; gap: 12px 22px; }
    html.hf-chrome .footer__copyright { text-align: center; }
}

/* floating side icons: glass buttons */
html.hf-chrome .floating-icons { gap: 8px; inset-inline-end: 16px; }
html.hf-chrome .floating-icons .icon {
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(14, 14, 15, .74);
    border: 1px solid rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
    transition: background-color .3s, transform .3s var(--hf-ease);
}
html.hf-chrome .floating-icons .icon i { font-size: 17px; color: #fff; }
html.hf-chrome .floating-icons .icon:hover { background: var(--hf-accent); transform: scale(1.06); }
html.hf-chrome .floating-icons .icon:hover i { color: #fff; }
html.hf-chrome .floating-icons .icon span {
    top: 50%;
    height: 34px;
    margin-top: -17px;
    line-height: 34px;
    border-radius: 999px;
    background: #fff;
    color: var(--hf-ink);
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}
html.hf-chrome .floating-icons.ltr .icon span { margin-right: 10px; }
html.hf-chrome .floating-icons.rtl .icon span { margin-left: 10px; }

/* ---------- Arabic pages: header and footer text in MazdaType + Mazda Arabic ----------
   Icons are left alone: <i> elements and anything with an icon class keep their icon fonts. */
html.hf-chrome body.is-rtl .header-global,
html.hf-chrome body.is-rtl .header-global :is(a, span, li, p, button, h2, h3, h4, label):not([class*="icon"]):not(.fa):not([class*="fa-"]),
html.hf-chrome body.is-rtl .footer,
html.hf-chrome body.is-rtl .footer :is(a, span, li, p, h2, h3, h4):not([class*="icon"]):not(.fa):not([class*="fa-"]),
html.hf-chrome body.is-rtl .floating-icons .icon span {
    font-family: var(--hf-chrome-font);
}


/* =====================================================================
   CALLBACK POPUP ("Let us call you ...", Views/Partials/_callme.cshtml)
   CSS only: the form, its validation, reCAPTCHA, phone field and
   tracking are untouched. The popup's markup carries inline styles and
   global rules of its own, hence the id-based selectors and !important.
   ===================================================================== */

/* The popup's wrapper becomes the backdrop. The popup script shows it with jQuery's fadeIn
   (which clears the inline display:none, so this display applies) and hides it again
   with an inline display:none. */
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper {
    position: fixed;
    inset: 0;
    z-index: 999900;
    display: grid;
    align-items: center;
    justify-items: center;
    padding: 24px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(8, 8, 10, .6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .sgpb-popup-dialog-main-div-theme-wrapper-4 {
    position: relative !important;
    inset: auto !important;
    width: 100% !important; /* of the backdrop's content box, so a scrollbar never makes it overflow */
    max-width: 600px;
    height: auto !important;
    margin: 0 !important;
    background: transparent !important;
    animation: hf-pop-in .6s var(--hf-ease-out) both !important;
}
@keyframes hf-pop-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

/* the card */
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-popup-dialog-main-div {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 24px;
    background: #fff !important;
    box-shadow: 0 40px 120px rgba(0, 0, 0, .5);
    overflow: visible !important; /* the phone field's country list opens below the field */
    font-family: var(--hf-chrome-font);
    text-align: start;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-popup-dialog-main-div > div { overflow: visible !important; }

/* head of the card, dark like the header: icon, "Request a callback", title */
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me.vc_row { margin-left: 0 !important; margin-right: 0 !important; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .vc_column-inner { padding-left: 0 !important; padding-right: 0 !important; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column { margin-bottom: 0 !important; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper { display: flex; flex-direction: column; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > p { width: auto !important; } /* the site's phone styles set 90% */
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > p:first-child {
    order: 0;
    margin: 0;
    padding: 36px 40px 0;
    border-radius: 24px 24px 0 0;
    background: var(--hf-ink);
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > p:first-child img {
    width: 46px !important;
    filter: invert(1);
    opacity: .92;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > h2 {
    order: 1;
    margin: 0 !important;
    padding: 20px 40px 0;
    background: var(--hf-ink);
    color: rgba(255, 255, 255, .6) !important;
    font-family: var(--hf-chrome-font);
    font-size: 11px !important;
    font-weight: 500;
    letter-spacing: .24em;
    line-height: 1.4;
    text-transform: uppercase;
    text-align: center !important;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > p:nth-child(2) {
    order: 2;
    margin: 0 !important;
    padding: 10px 40px 34px;
    background: var(--hf-ink);
    color: #fff;
    font-family: var(--hf-chrome-font);
    font-size: clamp(21px, 2.2vw, 26px) !important;
    font-weight: 500;
    line-height: 1.25;
    text-align: center !important;
    text-wrap: balance;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > .wpcf7 { order: 3; padding: 30px 40px 36px; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > p:last-child:empty { display: none; }

/* close: a round button on the dark head (its "Close" text stays as the accessible name) */
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    z-index: 2 !important;
    float: none !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, .2) !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .06) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    cursor: pointer;
    transition: background-color .3s, border-color .3s, transform .45s var(--hf-ease);
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button::before,
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 1.5px;
    margin: -.75px 0 0 -8px;
    border-radius: 2px;
    background: #fff;
    transform: rotate(45deg);
    transition: background-color .3s;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button::after { transform: rotate(-45deg); }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button:hover,
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button:focus-visible { background: #fff !important; border-color: #fff !important; transform: rotate(90deg); }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button:hover::before,
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button:hover::after,
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button:focus-visible::before,
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button:focus-visible::after { background: var(--hf-ink); }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
html.hf-chrome body.is-rtl #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button { right: auto !important; left: 16px !important; }

/* fields: two columns, consent lines across */
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper form#form { width: auto; margin: 0; padding: 0; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .forms__group {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
    margin: 0;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .forms__group::before,
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .forms__group::after { content: none !important; display: none !important; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .forms__group > .input-row {
    float: none !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .forms__group > .input-row--checkbox,
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .forms__group > .mazda-privacy-notice-text { grid-column: 1 / -1; }

html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .input-row:not(.input-row--checkbox) > label {
    display: block;
    margin: 0 0 7px !important;
    font-family: var(--hf-chrome-font);
    font-size: 10.5px !important;
    font-weight: 700;
    letter-spacing: .16em !important;
    line-height: 1.3;
    color: #5c5c5c !important;
    text-transform: uppercase;
    text-align: start !important;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .input-row .form-field:not([type="checkbox"]) {
    box-sizing: border-box;
    width: 100% !important;
    height: 50px !important;
    margin: 0 !important;
    border: 1px solid #dcdcd8 !important;
    border-radius: 12px !important;
    background-color: #f6f6f4 !important;
    color: #111 !important;
    font-family: var(--hf-chrome-font) !important;
    font-size: 15px !important;
    box-shadow: none !important;
    transition: border-color .25s, background-color .25s, box-shadow .25s;
}
/* the phone field keeps the padding the country picker sets */
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .input-row .form-field:not([type="checkbox"]):not(#textfieldPhone) { padding: 0 14px !important; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .input-row select.form-field {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230b0b0c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 12px 8px !important;
    cursor: pointer;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .input-row .form-field:not([type="checkbox"]):hover { border-color: #b9b9b4 !important; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .input-row .form-field:not([type="checkbox"]):focus {
    border-color: var(--hf-ink) !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(11, 11, 12, .07) !important;
    outline: none;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .iti { width: 100%; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .iti__selected-flag { border-radius: 12px 0 0 12px; }

/* consent (the site's script turns it into a plain checkbox and adds the privacy line) */
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .mazda-consent-row label[data-atom="a07-label"] {
    max-width: none !important;
    gap: 12px !important;
    cursor: pointer;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .mazda-consent-row input[name="Subscription"] {
    width: 18px !important;
    height: 18px !important;
    margin: 1px 0 0 !important;
    accent-color: var(--hf-ink);
    cursor: pointer;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .mazda-consent-label {
    max-width: none !important;
    color: #3a3a3a !important;
    font-family: var(--hf-chrome-font) !important;
    font-size: 12.5px !important;
    line-height: 1.55 !important;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .mazda-privacy-notice-text {
    width: auto !important;
    max-width: none !important;
    margin: -4px 0 0 !important;
    color: #6b6b6b !important;
    font-family: var(--hf-chrome-font) !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .mazda-privacy-notice-text a,
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .mazda-consent-label a { color: var(--hf-ink) !important; }

/* reCAPTCHA keeps its 80% scale; the box is sized to what shows */
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .g-recaptcha {
    display: block !important;
    height: 62px;
    margin: 24px 0 0 !important;
    bottom: auto !important;
}

/* submit */
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .btnSubmit {
    display: flex !important;
    align-items: center;
    justify-content: center;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 54px;
    margin: 22px 0 0 !important;
    padding: 0 24px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--hf-ink) !important;
    color: #fff !important;
    font-family: var(--hf-chrome-font) !important;
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: .22em;
    line-height: 1 !important;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .3s, opacity .3s, transform .3s var(--hf-ease);
}
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .btnSubmit:not(:disabled):hover { background: var(--hf-accent-hi) !important; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .btnSubmit:not(:disabled):active { transform: scale(.985); }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .btnSubmit:focus-visible { outline: 2px solid var(--hf-ink); outline-offset: 3px; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .btnSubmit:disabled { background: #d2d2ce !important; color: #fff !important; cursor: not-allowed; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .btnSubmit.btn-disable { background: var(--hf-ink) !important; opacity: .55; }
html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #errormsg {
    position: static !important;
    margin: 12px 0 0 !important;
    font-size: 12.5px !important;
}

/* Arabic */
html.hf-chrome body.is-rtl #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > h2 { font-size: 14px !important; letter-spacing: 0; }
html.hf-chrome body.is-rtl #sgpb-popup-dialog-main-div-wrapper .input-row:not(.input-row--checkbox) > label { font-size: 12.5px !important; letter-spacing: 0 !important; }
html.hf-chrome body.is-rtl #sgpb-popup-dialog-main-div-wrapper .btnSubmit { font-size: 15px !important; letter-spacing: 0; text-transform: none; }
/* the form's markup is left-to-right even in Arabic: fields read from the right, the phone number stays LTR */
html.hf-chrome body.is-rtl #sgpb-popup-dialog-main-div-wrapper .forms__group { direction: rtl; }
html.hf-chrome body.is-rtl #sgpb-popup-dialog-main-div-wrapper .iti { direction: ltr; }
html.hf-chrome body.is-rtl #sgpb-popup-dialog-main-div-wrapper .input-row select.form-field {
    padding-right: 14px !important;
    padding-left: 40px !important;
    background-position: left 16px center !important;
}
html.hf-chrome body.is-rtl #sgpb-popup-dialog-main-div-wrapper .g-recaptcha { direction: rtl; transform-origin: 100% 0 !important; }

@media (max-width: 599px) {
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper { padding: 12px; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-popup-dialog-main-div { border-radius: 20px; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > p:first-child { padding: 28px 24px 0; border-radius: 20px 20px 0 0; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > p:first-child img { width: 40px !important; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > h2 { padding: 16px 56px 0; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > p:nth-child(2) { padding: 8px 24px 26px; font-size: 20px !important; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > .wpcf7 { padding: 24px 20px 26px; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .forms__group { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button { top: 12px !important; right: 12px !important; width: 36px !important; height: 36px !important; }
    html.hf-chrome body.is-rtl #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button { right: auto !important; left: 12px !important; }
}
/* laptop screens: tighter spacing so the whole card fits without scrolling */
@media (min-width: 600px) and (max-height: 880px) {
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper { padding-top: 16px; padding-bottom: 16px; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > p:first-child { padding-top: 24px; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > p:first-child img { width: 38px !important; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > h2 { padding-top: 12px; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > p:nth-child(2) { padding: 6px 40px 22px; font-size: 22px !important; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .call-me .wpb_text_column > .wpb_wrapper > .wpcf7 { padding: 22px 40px 26px; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .forms__group { row-gap: 14px; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .input-row:not(.input-row--checkbox) > label { margin-bottom: 6px !important; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .input-row .form-field:not([type="checkbox"]) { height: 46px !important; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .g-recaptcha { margin-top: 16px !important; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .btnSubmit { height: 50px; margin-top: 16px !important; }
}


/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html.hf-chrome .header-global__inner-wrapper { transition: none; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper .sgpb-popup-dialog-main-div-theme-wrapper-4 { animation: none !important; }
    html.hf-chrome #sgpb-popup-dialog-main-div-wrapper #sgpb-close-button { transition: none; }
}
