/* ---------------------------------------------------------------------------
 * nav.css
 *
 * NOT part of the gulp build. This file is served as-is via <link> from
 * templates/includes/header.html (the topbar country/language switcher — every page)
 * and is NOT concatenated into spinneys/css/main.css by `gulp sass-web`.
 * Editing the SCSS tree will therefore never affect these rules.
 *
 * Values below are literal, not Sass variables, because this file is never compiled.
 * Keep anything new inside these sets.
 *
 * COLOUR (from tokens.json):
 *   #154734 dark-green-500   #313131 black-500     #6C757D neutral-600
 *   #ADB5BD neutral-500      #DEE2E6 neutral-300   #E9ECEF neutral-200
 *
 * TYPE:
 *   "Gill Sans Nova for JL", sans-serif   display/UI - the storefront face
 *   "FreightText Pro", serif              editorial serif (a documented exception;
 *                                         the Waitrose system has no serif)
 *   Every stack MUST end in a generic keyword. This site serves Arabic and no webfont
 *   here covers it, so the generic terminal is what picks up the system Arabic face.
 *
 * NOT covered by the reskin and still original: #D9D9D9, #EEE, #FFF, and the
 * border-radius / box-shadow / outline / transition values.
 * --------------------------------------------------------------------------- */

.top-bar .flex-bx .country-change {
    position: relative;
}

.top-bar .flex-bx .country-change .changebtn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    height: 38px;
    min-height: 34px;
    border-radius: 12px;
    /* T3 secondary */
    border: 1px solid rgba(49, 49, 49, 0.3);
    padding: 0 14px;
    margin-left: 20px;
}

.top-bar .flex-bx .country-change .changebtn img {
    width: 18px;
    height: 18px;
}

.top-bar .flex-bx .country-change .user-lang-loc-update {
    position: absolute;
    background-color: #fff;
    z-index: 0;
    padding: 10px 16px;
    border: 1px solid #DEE2E6;
    border-radius: 16px;
    width: 230px;
    top: 42px;
    left: -50%;
    pointer-events: none;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.top-bar .flex-bx .country-change .user-lang-loc-update.open {
    pointer-events: all;
    opacity: 1;
    z-index: 10;
}

.top-bar .flex-bx .country-change .user-lang-loc-update .language_selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #D9D9D9;
}

.top-bar .flex-bx .country-change .user-lang-loc-update .country_select {
    padding: 10px 0 0;
}

.top-bar .flex-bx .country-change .user-lang-loc-update .language_selector .left span {
    font-family: "Gill Sans Nova for JL", sans-serif;
    font-size: 12px;
    line-height: 1;
    color: #6C757D;
}

.top-bar .flex-bx .country-change .user-lang-loc-update .language_selector .right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    font-family: "Gill Sans Nova for JL", sans-serif;
    font-size: 12px;
    line-height: 1;
    color: #313131;
}

.toggle {
    cursor: pointer;
    display: inline-block;
    margin: 0;
}

input[type=checkbox],
input[type=radio] {
    box-sizing: border-box;
    padding: 0;
}

.toggle-checkbox {
    position: absolute;
    visibility: hidden;
}

.toggle-checkbox:checked
+ .toggle-switch {
    background: #154734;
}

.toggle-switch {
    display: inline-block;
    background: #154734;
    border-radius: 16px;
    width: 36px;
    height: 20px;
    position: relative;
    vertical-align: middle;
    transition: background 0.25s;
}

.toggle-switch:before {
    display: block;
    background: linear-gradient(to bottom, #fff 0%, #eee 100%);
    border-radius: 50%;
    width: 12px;
    height: 12px;
    position: absolute;
    top: 4px;
    left: 4px;
    transition: left 0.25s;
}

.toggle-switch:before,
.toggle-switch:after {
    content: "";
}

.toggle-checkbox:checked
+ .toggle-switch:before {
    left: 20px;
}

.top-bar .flex-bx .country-change .user-lang-loc-update .country_select {
    padding: 10px 0 0;
}

.top-bar .flex-bx .country-change .user-lang-loc-update .country_select p {
    font-family: "Gill Sans Nova for JL", sans-serif;
    font-size: 12px;
    line-height: 1;
    color: #6C757D;
}

.top-bar .flex-bx .country-change .user-lang-loc-update .country_select .country {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-family: "Gill Sans Nova for JL", sans-serif;
    font-size: 14px;
    line-height: 1;
    min-height: inherit;
}

.top-bar .flex-bx .country-change .user-lang-loc-update .country_select .country .left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.top-bar .flex-bx .country-change .user-lang-loc-update .country_select .country .left img {
    width: 15px;
    height: 15px;
}

img {
    vertical-align: middle;
    border-style: none;
}

.top-bar .flex-bx .country-change .user-lang-loc-update .country_select .country.active span,
.top-bar .flex-bx .country-change .user-lang-loc-update .country_select .country:hover span {
    color: #154734;
}

.top-bar .flex-bx .country-change .user-lang-loc-update .country_select .country span {
    font: inherit;
    color: #6C757D;
}

svg {
    width: 16;
    height: 16;
}

/* .top-bar .flex-bx .country-change .user-lang-loc-update .country_select .country.active svg .circle {
    fill: #154734;
} */

@media screen and (max-width: 1200px) {
    .country-change .changebtn {
        margin-left: unset !important;
        padding: 0 10px !important;
        gap: 6px !important;
        min-height: 30px !important;
        height: 30px !important;
    }
        .country-change .changebtn img {
        width: 14px !important;
        height: 14px !important;
    }

    .country-change .changebtn span {
        font-size: 12px !important;
    }

    .top-bar .flex-bx .country-change .user-lang-loc-update {
        /* left: -100% !important; */
        width: 200px !important;
        left: unset;
        right: 0;
        top: 36px;
    }
}

@media screen and (max-width: 600px) {
    .top-bar.tab .flex-bx {
        padding: 0 10px !important;
    }

    .top-bar.tab .flex-bx .cart {
        padding: 0 8px 0 8px !important;
    }

    .top-bar.tab .flex-bx .cart .cart-icon {
        padding: 0 12px !important;
        height: 30px !important;
    }

    .top-bar.tab .flex-bx .cart .products-in-cart {
        font-size: 12px !important;
        margin-left: 6px !important;
    }
}
