/**
 * Locale Preferences: country / currency / language
 *
 * - .qs-locale-pill     desktop header locale button: flag · country · currency (1024px+)
 * - .qs-locale-quick    its quick menu: shopping from (Change) and language
 * - .qs-locale-bar      phone "Deliver to {Country} ˅ · Change Location" bar (<1024px)
 * - .drawer-country-row mobile drawer "Deliver to" row
 * - .qs-locale          "Where are you shopping from?" popup: a card, a bottom sheet on phones
 *
 * Replaces the delivery pill, the separate currency and language selectors and
 * the landing page's "Choose Your Delivery Option" modal.
 * Design: Qtrshoe — Locale Preferences (ARKAN-198).
 */

/* ===========================================
   FLAG CIRCLE (shared)
   =========================================== */
.qs-locale-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(26, 26, 26, 0.1);
    box-sizing: border-box;
    flex-shrink: 0;
}

.qs-locale-flag svg.flag-svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: none;
}

/* Locale button, quick menu and popup: a 1px ring outside the flag (design) */
.qs-locale-pill .qs-locale-flag,
.qs-locale-quick .qs-locale-flag,
.qs-locale .qs-locale-flag {
    border: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* ===========================================
   DESKTOP HEADER LOCALE BUTTON
   Design: height 40, radius 999, flag 20, text 13/500, gap 8, transition 150 ms
   =========================================== */
.qs-locale-pill-wrap {
    display: none; /* phones use the Deliver-to bar */
    position: relative;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .qs-locale-pill-wrap {
        display: flex;
    }
}

.qs-locale-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0;
    padding-inline: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: #fff;
    font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.qs-locale-pill:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
}

.qs-locale-pill:focus {
    outline: none;
}

.qs-locale-pill:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.qs-locale-pill .qs-locale-pill__flag {
    width: 20px;
    height: 20px;
    min-width: 20px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.qs-locale-pill__dot {
    opacity: 0.6;
}

.qs-locale-pill__currency {
    font-weight: 600;
}

.qs-locale-pill__chevron {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

/* Narrow desktops: a long country name would reach the centred logo, so the
   button keeps flag · currency (the quick menu still names the country) */
@media (max-width: 1279px) {
    .qs-locale-pill__country,
    .qs-locale-pill__dot {
        display: none;
    }
}

/* Open: inverted fill, chevron flips */
.qs-locale-pill-wrap.is-open .qs-locale-pill {
    background: #fff;
    border-color: #fff;
    color: #0F0F0F;
}

.qs-locale-pill-wrap.is-open .qs-locale-pill__flag {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.qs-locale-pill-wrap.is-open .qs-locale-pill__dot {
    opacity: 0.5;
}

.qs-locale-pill-wrap.is-open .qs-locale-pill__chevron {
    transform: rotate(180deg);
}

/* Light header pages (product, cart, checkout …): on white */
.light-header .qs-locale-pill {
    color: #0F0F0F;
    border-color: #E4E4E2;
    background: #fff;
}

.light-header .qs-locale-pill:hover {
    background: #F4F4F3;
    border-color: #C9C9C6;
}

.light-header .qs-locale-pill:focus-visible {
    outline-color: #0F0F0F;
}

.light-header .qs-locale-pill .qs-locale-pill__flag {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.light-header .qs-locale-pill__dot {
    color: #8A8A88;
    opacity: 1;
}

.light-header .qs-locale-pill-wrap.is-open .qs-locale-pill {
    background: #0F0F0F;
    border-color: #0F0F0F;
    color: #fff;
}

.light-header .qs-locale-pill-wrap.is-open .qs-locale-pill__flag {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.light-header .qs-locale-pill-wrap.is-open .qs-locale-pill__dot {
    color: inherit;
    opacity: 0.6;
}

/* ===========================================
   QUICK MENU (under the locale button)
   Design: 340 wide, 52 below the button top (12 px gap), radius 14, padding 20, gap 16
   =========================================== */
.qs-locale-quick {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 12px; /* keeps the hover on while the pointer moves down */
    z-index: var(--z-dropdown, 1000);
}

.qs-locale-quick[hidden] {
    display: none;
}

.qs-locale-quick__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 340px;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 14px;
    background: #fff;
    color: #0F0F0F;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
    text-align: start;
    white-space: normal;
    animation: qsLocalePop 0.22s ease-out;
}

.qs-locale-quick__arrow {
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%) rotate(45deg);
}

.qs-locale-quick__set {
    margin: 0 0 -6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.qs-locale-quick__set[hidden] {
    display: none;
}

.qs-locale-quick__label {
    font-size: 11px;
    font-weight: 600;
    line-height: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5F5F5F;
}

.qs-locale-quick__change {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -4px -8px 0;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: #F4F4F3;
    color: #0F0F0F;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
    transition: background 0.12s ease;
}

.qs-locale-quick__change:hover {
    background: #EBEBE9;
}

.qs-locale-quick__change:focus-visible {
    outline: 2px solid #0F0F0F;
    outline-offset: 2px;
}

.qs-locale-quick__change .qs-locale-quick__flag {
    width: 28px;
    height: 28px;
    min-width: 28px;
}

.qs-locale-quick__where {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.qs-locale-quick__country {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.qs-locale-quick__prices {
    font-size: 12px;
    line-height: 1.3;
    color: #5F5F5F;
}

.qs-locale-quick__change-text {
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.qs-locale-quick__rule {
    display: block;
    height: 1px;
    background: #E4E4E2;
}

.qs-locale-quick__lang {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* "You're all set": a 5 s bar along the bottom */
.qs-locale-quick__timer {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    background: #EFEFED;
    overflow: hidden;
}

.qs-locale-quick__timer[hidden] {
    display: none;
}

.qs-locale-quick__timer span {
    display: block;
    height: 100%;
    background: #0F0F0F;
    transform-origin: left center;
}

[dir="rtl"] .qs-locale-quick__timer span {
    transform-origin: right center;
}

.qs-locale-quick__timer.is-running span {
    animation: qsLocaleDrain 5s linear forwards;
}

@keyframes qsLocaleDrain {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@keyframes qsLocalePop {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

/* ===========================================
   LANGUAGE SWITCH (popup and quick menu)
   Design: two halves in a #F4F4F3 track, the chosen one black
   =========================================== */
.qs-locale-seg {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #F4F4F3;
}

.qs-locale-seg__btn {
    height: 48px;
    padding: 0 8px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #0F0F0F;
    font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.12s ease;
}

.qs-locale-seg__btn[lang="ar"] {
    font-family: 'IBM Plex Sans Arabic', 'Inter', sans-serif;
    font-size: 16px;
}

.qs-locale-seg__btn:hover {
    opacity: 0.85;
}

.qs-locale-seg__btn[aria-checked="true"] {
    background: #0F0F0F;
    color: #fff;
    opacity: 1;
}

.qs-locale-seg__btn:focus-visible {
    outline: 2px solid #0F0F0F;
    outline-offset: 2px;
}

.qs-locale-seg--small .qs-locale-seg__btn {
    height: 40px;
    font-size: 14px;
}

.qs-locale-seg--small .qs-locale-seg__btn[lang="ar"] {
    font-size: 15px;
}

/* ===========================================
   PHONE "DELIVER TO" BAR
   Figma: 358×36 inside a 16px gutter, radius 900, 1px white border, 12px text
   =========================================== */
.qs-locale-bar {
    padding: 0 16px 8px;
    box-sizing: border-box;
}

.qs-locale-bar--hero {
    position: absolute;
    top: 52px; /* below .mobile-top-header */
    left: 0;
    right: 0;
    z-index: 100;
    padding-bottom: 0;
}

/* The phone hero header starts below the announcement bar; so does this bar */
.qs-announcement--hero-mobile:not([hidden]) ~ .qs-locale-bar--hero {
    top: calc(52px + var(--qs-announcement-height, 0px));
}

@media (min-width: 1024px) {
    .qs-locale-bar {
        display: none;
    }
}

.qs-locale-bar__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    height: 36px;
    padding: 4px 12px;
    border-radius: 900px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(17.25px);
    -webkit-backdrop-filter: blur(17.25px);
    color: #fff;
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 12px;
    line-height: 15px;
    cursor: pointer;
    box-sizing: border-box;
    text-align: start;
}

.qs-locale-bar__country {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.qs-locale-bar__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qs-locale-bar__text strong {
    font-weight: 600;
}

.qs-locale-bar__chevron {
    flex-shrink: 0;
}

.qs-locale-bar__change {
    flex-shrink: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

/* Light header pages: dark on white */
.light-header .qs-locale-bar--header .qs-locale-bar__btn {
    color: #1A1A1A;
    border-color: rgba(26, 26, 26, 0.2);
    background: #fff;
}

/* ===========================================
   MOBILE DRAWER ROW
   =========================================== */
.drawer-country-row {
    width: 100%;
    text-align: start;
}

.drawer-country-row .qs-locale-flag svg.flag-svg {
    width: 100%;
    height: 100%;
    stroke: none;
}

.drawer-country-row__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.drawer-country-row__label {
    font-size: 12px;
    color: var(--drawer-text-muted, #666);
}

.drawer-country-row__text strong {
    font-size: 15px;
    font-weight: 600;
}

.drawer-country-row svg.drawer-country-row__chevron {
    width: 16px;
    height: 16px;
    margin-inline-start: auto;
}

[dir="rtl"] .drawer-country-row__chevron {
    transform: scaleX(-1);
}

/* ===========================================
   "WHERE ARE YOU SHOPPING FROM?" POPUP
   Design: 520 wide card, radius 20, padding 40 40 32, gap 28, on the page
   dimmed (50% black) and blurred (14px). Lists open over the card.
   =========================================== */
.qs-locale {
    position: fixed;
    inset: 0;
    z-index: 100001; /* above drawers (9999) and the cart warning (99999) */
    display: flex;
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto; /* a short window scrolls the card */
    font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
    color: #0F0F0F;
}

[dir="rtl"] .qs-locale {
    font-family: 'IBM Plex Sans Arabic', 'Inter', sans-serif;
}

.qs-locale[hidden] {
    display: none;
}

/* The landing page's choice (/): required, so no way out but "Start shopping" */
.qs-locale[data-qs-locale-required] .qs-locale__close,
.qs-locale[data-qs-locale-required] .qs-locale__handle {
    display: none;
}

/* The page itself, dimmed and blurred behind the popup */
.qs-locale__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    animation: qsLocaleFade 0.2s ease-out;
}

.qs-locale__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 520px;
    max-width: 100%;
    margin: auto;
    padding: 40px 40px 32px;
    border-radius: 20px;
    background: #fff;
    color: #0F0F0F;
    box-sizing: border-box;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    animation: qsLocalePop 0.22s ease-out;
    outline: none;
}

@keyframes qsLocaleFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Bottom sheet's grab handle (phones) */
.qs-locale__handle {
    display: none;
}

.qs-locale__close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #0F0F0F;
    cursor: pointer;
    transition: background 0.12s ease;
}

.qs-locale__close:hover {
    background: #F4F4F3;
}

.qs-locale__close:focus-visible {
    outline: 2px solid #0F0F0F;
    outline-offset: 2px;
}

.qs-locale__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.qs-locale__logo {
    display: block;
    height: 26px;
    width: auto;
}

.qs-locale__title {
    margin: 0;
    font-family: inherit;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-transform: none;
    color: #0F0F0F;
}

.qs-locale__intro {
    max-width: 380px;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5F5F5F;
}

.qs-locale__intro-short,
.qs-locale__note-short {
    display: none;
}

/* ---- Fields ---- */
.qs-locale__fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qs-locale__field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* An open list lies over the fields below it */
.qs-locale__field[data-qs-locale-field="country"] {
    z-index: 3;
}

.qs-locale__field[data-qs-locale-field="currency"] {
    z-index: 2;
}

.qs-locale__label {
    font-size: 12px;
    font-weight: 600;
    line-height: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5F5F5F;
}

.qs-locale__select {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 56px;
    padding: 0 16px;
    border: 1px solid #D6D6D3;
    border-radius: 12px;
    background: #fff;
    color: #0F0F0F;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: start;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.12s ease;
}

.qs-locale__select:hover {
    border-color: #8A8A88;
}

.qs-locale__select[aria-expanded="true"] {
    border-color: #0F0F0F;
    box-shadow: inset 0 0 0 1px #0F0F0F; /* 2px, without moving the content */
}

.qs-locale__select:focus-visible {
    outline: 2px solid #0F0F0F;
    outline-offset: 2px;
}

.qs-locale__value {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.qs-locale__value .qs-locale-flag {
    width: 24px;
    height: 24px;
    min-width: 24px;
}

.qs-locale__value-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qs-locale__chevron {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.qs-locale__select[aria-expanded="true"] .qs-locale__chevron {
    transform: rotate(180deg);
}

/* Currency: code, then its name */
.qs-locale__code {
    min-width: 44px;
    font-weight: 600;
}

.qs-locale__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
    color: #5F5F5F;
}

.qs-locale__hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #5F5F5F;
}

/* Under its own open list */
.qs-locale__select[aria-expanded="true"] ~ .qs-locale__hint {
    visibility: hidden;
}

/* ---- Lists ---- */
.qs-locale__dropdown {
    position: absolute;
    top: 92px; /* label 15 + gap 8 + field 56 + 13 */
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #E4E4E2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    animation: qsLocalePop 0.22s ease-out;
}

.qs-locale__dropdown[hidden] {
    display: none;
}

.qs-locale__search-wrap {
    padding: 10px;
    border-bottom: 1px solid #E4E4E2;
}

.qs-locale__search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    background: #F4F4F3;
    color: #5F5F5F;
    box-sizing: border-box;
    cursor: text;
}

.qs-locale__search svg {
    flex-shrink: 0;
}

.qs-locale__search input {
    flex: 1;
    min-width: 0;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    box-shadow: none;
    background: transparent;
    color: #0F0F0F;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
}

.qs-locale__search input::placeholder {
    color: #5F5F5F;
    opacity: 1;
}

.qs-locale__options {
    max-height: 320px;
    margin: 0;
    padding: 6px 6px 8px;
    overflow-y: auto;
    list-style: none;
}

[data-qs-locale-field="currency"] .qs-locale__options {
    max-height: 280px;
}

.qs-locale__group {
    padding: 10px 12px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5F5F5F;
}

.qs-locale__option + .qs-locale__group {
    padding-top: 14px;
}

.qs-locale__group[hidden],
.qs-locale__option[hidden] {
    display: none;
}

.qs-locale__option {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 12px;
    border-radius: 10px;
    color: #0F0F0F;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s ease;
}

.qs-locale__option:hover,
.qs-locale__option.is-selected {
    background: #F4F4F3;
}

.qs-locale__option.is-selected {
    font-weight: 600;
}

.qs-locale__option:focus-visible {
    outline: 2px solid #0F0F0F;
    outline-offset: -2px;
}

.qs-locale__option-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.qs-locale__option .qs-locale-flag {
    width: 22px;
    height: 22px;
    min-width: 22px;
}

.qs-locale__option .qs-locale__name {
    font-size: 14px;
}

.qs-locale__option-meta {
    font-size: 13px;
    font-weight: 500;
    color: #5F5F5F;
}

.qs-locale__check-slot {
    display: flex;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.qs-locale__check {
    display: none;
}

.qs-locale__option.is-selected .qs-locale__check {
    display: block;
}

.qs-locale__empty {
    margin: 0;
    padding: 28px 12px;
    font-size: 14px;
    text-align: center;
    color: #5F5F5F;
}

/* ---- Start shopping ---- */
.qs-locale__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.qs-locale__confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: #0F0F0F;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.12s ease;
}

.qs-locale__confirm:hover {
    background: #2B2B2B;
}

.qs-locale__confirm:focus-visible {
    outline: 2px solid #0F0F0F;
    outline-offset: 3px;
}

[dir="rtl"] .qs-locale__arrow {
    transform: scaleX(-1);
}

.qs-locale__note {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    color: #5F5F5F;
}

/* ===========================================
   PHONES: BOTTOM SHEET
   Design: radius 24 24 0 0, padding 10 20 28, gap 20; title 21px,
   fields 16px, the page dimmed without blur
   =========================================== */
@media (max-width: 767px) {
    .qs-locale {
        padding: 0;
        overflow: hidden;
    }

    .qs-locale__backdrop {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .qs-locale__panel {
        gap: 20px;
        width: 100%;
        max-height: 92vh;
        max-height: 92dvh;
        margin: auto 0 0;
        padding: 10px 20px calc(28px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25);
        animation: qsLocaleSheet 0.25s ease-out;
    }

    @keyframes qsLocaleSheet {
        from { transform: translateY(100%); }
        to { transform: none; }
    }

    .qs-locale__handle {
        display: block;
        align-self: center;
        width: 40px;
        height: 4px;
        border-radius: 4px;
        background: #D6D6D3;
    }

    .qs-locale__close {
        top: 20px;
        inset-inline-end: 10px;
    }

    .qs-locale__head {
        align-items: flex-start;
        gap: 6px;
        padding-inline-end: 44px;
        text-align: start;
    }

    .qs-locale__logo {
        display: none;
    }

    .qs-locale__title {
        font-size: 21px;
    }

    .qs-locale__intro {
        max-width: none;
        line-height: 1.45;
    }

    .qs-locale__intro-long,
    .qs-locale__note-long {
        display: none;
    }

    .qs-locale__intro-short,
    .qs-locale__note-short {
        display: inline;
    }

    .qs-locale__select {
        font-size: 16px;
    }

    /* A row that opens its list: chevron points to the side */
    .qs-locale__chevron {
        transform: rotate(-90deg);
    }

    [dir="rtl"] .qs-locale__chevron {
        transform: rotate(90deg);
    }

    .qs-locale__select[aria-expanded="true"] .qs-locale__chevron {
        transform: rotate(180deg);
    }

    /* Lists open in place; the sheet scrolls */
    .qs-locale__dropdown {
        position: static;
        box-shadow: none;
    }

    .qs-locale__footer {
        gap: 10px;
        padding-top: 4px;
    }
}

/* Lock the page behind the open popup */
body.qs-locale-open {
    overflow: hidden;
}
