/* Shared storefront/auth language picker. No native OS selection colors. */
.fm-locale {
    position: relative;
    flex: 0 0 auto;
    width: max-content;
    margin: 0;
    color: #203d29;
    font-family: var(--fm-font, 'K2 Sans', sans-serif);
    font-size: 15px;
    line-height: 1.4;
    text-align: start;
    letter-spacing: normal;
    text-transform: none;
}
.fm-locale, .fm-locale * { box-sizing: border-box; }
.fm-locale .fm-locale-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 158px;
    min-height: 48px;
    padding: 10px 13px;
    margin: 0;
    border: 1px solid #ced9c3;
    border-radius: 9px;
    background: #f6f8ef;
    color: #203d29;
    cursor: pointer;
    list-style: none;
    font: inherit;
    font-weight: 600;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.fm-locale-trigger::-webkit-details-marker { display: none; }
.fm-locale-trigger::marker { content: ''; }
.fm-locale .fm-locale-name { flex: 1; white-space: nowrap; }
.fm-locale .fm-locale-flag {
    display: block;
    flex: 0 0 30px;
    width: 30px;
    height: 20px;
    max-width: none;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgb(16 40 20 / 10%);
}
.fm-locale .fm-locale-chevron {
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    opacity: .8;
    transition: transform .16s ease;
}
.fm-locale[open] > .fm-locale-trigger .fm-locale-chevron { transform: rotate(180deg); }
.fm-locale .fm-locale-trigger:hover { background: #edf3df; border-color: #91a774; }
.fm-locale[open] > .fm-locale-trigger { border-color: #6b8945; box-shadow: 0 0 0 3px rgb(107 137 69 / 14%); }
.fm-locale--dark .fm-locale-trigger { background: #223426; border-color: #53654b; color: #f5f8ec; }
.fm-locale--dark .fm-locale-trigger:hover { background: #304631; border-color: #a2ba71; }
.fm-locale--dark[open] > .fm-locale-trigger { border-color: #d4ed45; box-shadow: 0 0 0 3px rgb(212 237 69 / 14%); }
.fm-locale .fm-locale-panel {
    position: absolute;
    z-index: 1040;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    width: 248px;
    max-width: calc(100vw - 24px);
    padding: 9px;
    border: 1px solid #d8e2ce;
    border-radius: 13px;
    background: #fff;
    color: #203d29;
    box-shadow: 0 18px 48px rgb(20 42 23 / 18%), 0 3px 8px rgb(20 42 23 / 5%);
}
.fm-locale:not([open]) > .fm-locale-panel { display: none; }
.fm-locale .fm-locale-heading {
    display: block;
    margin: 0;
    padding: 7px 11px 11px;
    color: #667957;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.fm-locale .fm-locale-form { display: block; margin: 0; padding: 0; border: 0; }
.fm-locale .fm-locale-options { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.fm-locale .fm-locale-options > li { display: block; margin: 0; padding: 0; }
.fm-locale .fm-locale-option {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    min-height: 56px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    color: #203d29;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    text-align: start;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .16s ease, border-color .16s ease;
}
.fm-locale .fm-locale-option > span { display: block; flex: 1; color: inherit; }
.fm-locale .fm-locale-check { display: block; flex: 0 0 18px; width: 18px; height: 18px; visibility: hidden; color: #486c2e; }
.fm-locale .fm-locale-option[aria-current="true"] { background: #eef4dc; color: #29471d; font-weight: 700; }
.fm-locale .fm-locale-option[aria-current="true"] .fm-locale-check { visibility: visible; }
.fm-locale .fm-locale-option:hover { background: #e3eecd; border-color: #c4d8a5; }
.fm-locale .fm-locale-option:active { background: #d6e5b8; }
.fm-locale .fm-locale-trigger:focus-visible,
.fm-locale .fm-locale-option:focus-visible { outline: 2px solid #668637; outline-offset: 3px; }
.fm-locale--dark .fm-locale-trigger:focus-visible { outline-color: #d4ed45; }
.fm-locale ::selection { background: #d9ebad; color: #213b21; }

/* Raise only an open picker above the adjoining store header. */
.fm-store .fm-announcement:has(.fm-locale[open]) { position: relative; z-index: 1041; overflow: visible; }
.fm-auth-header:has(.fm-locale[open]) { position: relative; z-index: 1040; overflow: visible; }
.fm-announcement .fm-announcement-tools { display: flex; align-items: center; gap: 14px; }
.fm-auth-header .fm-locale { padding-inline-start: 16px; border-inline-start: 1px solid #dce3d2; }
.fm-auth .fm-auth-brand small { color: #607449; }

/* Keep legacy informational accents and form focus states in the green palette. */
.fm-store, .fm-auth { --blue: #3e714b; --cyan: #547e55; --info: #4c7643; --soft-info: rgba(76, 118, 67, .12); accent-color: #537537; }
.fm-store .text-info, .fm-auth .text-info,
.fm-store .text-blue, .fm-auth .text-blue { color: #426b3a !important; }
.fm-store .bg-info, .fm-auth .bg-info,
.fm-store .bg-blue, .fm-auth .bg-blue,
.fm-store .badge-info, .fm-auth .badge-info,
.fm-store .btn-info, .fm-auth .btn-info { background-color: #426b3a !important; color: #fff !important; }
.fm-store .btn-info, .fm-auth .btn-info,
.fm-store .border-info, .fm-auth .border-info { border-color: #426b3a !important; }
.fm-store .btn-info:hover, .fm-auth .btn-info:hover { background-color: #305329 !important; border-color: #305329 !important; }
.fm-store .bg-soft-info, .fm-auth .bg-soft-info,
.fm-store .badge-soft-info, .fm-auth .badge-soft-info,
.fm-store .alert-info, .fm-auth .alert-info { background-color: #edf3e4 !important; border-color: #cbdab9 !important; color: #37592d !important; }
.fm-store .form-control:focus, .fm-auth .form-control:focus { border-color: #829c5b; box-shadow: 0 0 0 3px rgb(107 137 69 / 14%); }
.fm-store .custom-control-input:checked ~ .custom-control-label::before,
.fm-auth .custom-control-input:checked ~ .custom-control-label::before { background-color: #537537; border-color: #537537; }

@media (max-width: 575.98px) {
    .fm-locale .fm-locale-trigger { min-width: 145px; min-height: 48px; padding: 10px; gap: 8px; font-size: 14px; }
    .fm-locale .fm-locale-panel { width: 256px; }
    .fm-locale .fm-locale-option { min-height: 60px; }
    .fm-announcement .fm-announcement-tools { gap: 8px; }
    .fm-auth-header .fm-locale { padding-inline-start: 0; border-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .fm-locale .fm-locale-trigger, .fm-locale .fm-locale-option, .fm-locale .fm-locale-chevron { transition: none; }
}

/* Keep the compact storefront trigger clear of the announcement bar edges. */
.fm-store .fm-announcement > .fm-container { min-height: 52px; padding-block: 8px; }
.fm-store .fm-announcement .fm-locale .fm-locale-trigger {
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
}
@media (pointer: coarse), (max-width: 767.98px) {
    .fm-store .fm-announcement > .fm-container { min-height: 60px; }
    .fm-store .fm-announcement .fm-locale .fm-locale-trigger { min-height: 44px; padding-block: 10px; }
}

/* Localized replacements for captions generated by the original auth stylesheet. */
.fm-auth [data-fm-auth-copy-before]::before { content: attr(data-fm-auth-copy-before) !important; }
.fm-auth [data-fm-auth-copy-after]::after { content: attr(data-fm-auth-copy-after) !important; }
.fm-auth .form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #f3f7e9 inset !important;
    -webkit-text-fill-color: #203d29 !important;
    caret-color: #203d29;
}
