html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =========================================================================
   Header search

   Desktop (≥ 768px): the search form is rendered INLINE between the logo
   cluster and the phone number — no toggle needed. The form sits in the
   normal flow of .header__container, transparent over the header.
   Mobile (< 768px): the form is hidden behind a toggle (.js-search-toggle)
   that opens a full-width dark drawer below the header chrome.
   ========================================================================= */
.header.-type-1 .header__container {
    position: relative;
}

.header__search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 2px;
    cursor: pointer;
    width: 38px;
    height: 38px;
    padding: 0;
    color: inherit;
    font-size: 16px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header__search-toggle:hover {
    background: var(--color-accent-1);
    border-color: var(--color-accent-1);
    color: #fff;
}

.header__search-toggle > i {
    line-height: 1;
}

/* Default (desktop ≥ 768px): the toggle button is mobile-only, so hide it. */
.header__search-toggle.-mobile {
    display: none;
}

/* Mobile (< 768px): show the mobile toggle, force the visual order in the
   left cluster to [logo] ... [search-toggle][menuBtn]. */
@media (max-width: 767px) {
    .header.-type-1 .header__left {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .header.-type-1 .header__left > .header__logo {
        order: 1;
        margin-left: 0;
        margin-right: auto;
    }

    .header.-type-1 .header__left > .header__search-toggle.-mobile {
        display: inline-flex;
        order: 2;
        margin-left: 0;
        margin-right: 20px;
    }

    .header.-type-1 .header__left > .header__menuBtn {
        order: 3;
        margin-left: 0;
    }
}

.header__search {
    display: none;
    align-items: center;
    gap: 8px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 14px 24px;
    background: var(--color-dark-1, #181D24);
    z-index: 50;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}

.header__search.is-open {
    display: flex;
}

/* Desktop: render the form inline in the normal flow of .header__container,
   between header__left (logo) and header__right (phone, socials, ...).
   Transparent so it blends with the header — the input keeps its own border. */
@media (min-width: 768px) {
    .header__search {
        display: flex;
        position: static;
        padding: 0;
        margin: 0 24px;
        background: transparent;
        box-shadow: none;
        flex: 0 1 320px;
        max-width: 320px;
    }
}

.header__search__input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 1px solid #ffffff80;
    border-radius: 2px;
    padding: 10px 12px;
    font-size: 15px;
    line-height: 1.2;
    color: #fff;
    outline: none;
    transition: border-color 0.2s ease;
}

.header__search__input::placeholder {
    color: #ffffffaa;
}

.header__search__input:focus {
    border-color: var(--color-accent-1);
}

.header__search__button {
    background: var(--color-accent-1);
    border: 1px solid var(--color-accent-1);
    border-radius: 2px;
    cursor: pointer;
    padding: 9px 9px;
    color: #fff;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.header__search__button:hover {
    background: #8a0d1a;
}

.header__search__button > i {
    line-height: 1;
    font-size: 14px;
}

/* Desktop submit button: override the base (red filled) treatment so the
   button reads as a ghost CTA — square 9×9 padding, transparent background,
   white border + white glyph; flips to solid red on hover. Must come AFTER
   the base .header__search__button rules so it wins on equal specificity. */
@media (min-width: 768px) {
    .header__search__button {
        background: transparent;
        border: 1px solid #fff;
        padding: 9px 9px;
        color: #fff;
        transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    .header__search__button > i {
        color: #fff;
    }

    .header__search__button:hover {
        background: var(--color-accent-1);
        border-color: var(--color-accent-1);
        color: #fff;
    }
}

/* When the burger menu opens, the theme adds .-dark to .js-header which
   force-paints the header background white and the foreground black. Our
   inline search form (and its drawer at narrower widths) used white text
   and a white border, which becomes invisible on the now-white header.
   Under .header.-dark, swap to a dark-on-white treatment. Higher specificity
   (parent class chained) beats the base rules without needing !important. */
.header.-dark .header__search {
    background: transparent;
}

.header.-dark .header__search__input {
    color: var(--color-dark-1, #181D24);
    border-color: rgba(0, 0, 0, 0.35);
}

.header.-dark .header__search__input::placeholder {
    color: rgba(0, 0, 0, 0.55);
}

.header.-dark .header__search__input:focus {
    border-color: var(--color-accent-1);
}

.header.-dark .header__search__button {
    background: transparent;
    border-color: var(--color-dark-1, #181D24);
    color: var(--color-dark-1, #181D24);
}

.header.-dark .header__search__button > i {
    color: var(--color-dark-1, #181D24);
}

.header.-dark .header__search__button:hover {
    background: var(--color-accent-1);
    border-color: var(--color-accent-1);
    color: #fff;
}

.header.-dark .header__search__button:hover > i {
    color: #fff;
}
