/* One country and language control for the main shop and the country storefronts. */
.hwk-market-locale {
    display: flex;
    flex: none;
    align-items: center;
    gap: 4px;
}
.hwk-market-locale .hwk-language-switcher { flex: none; }
.hwk-header-tools .hwk-market-locale .hwk-language-switcher { margin: 0; }
.hwk-market-selector {
    --hwk-market-symbol-size: 20px;
    position: relative;
    flex: none;
    font-size: var(--hwk-type-caption);
    color: inherit;
}
.hwk-header .hwk-market-selector { position: static; }
.hwk-market-selector summary {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: var(--hwk-target);
    padding: 7px 10px;
    border-radius: var(--hwk-control-radius);
    list-style: none;
    white-space: nowrap;
    font-weight: var(--hwk-weight-medium);
    cursor: pointer;
}
.hwk-market-selector summary::-webkit-details-marker { display: none; }
.hwk-market-selector:is(:hover, [open]) > summary { background: #ffffff1c; }
.hwk-market-selector summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.hwk-market-selector summary > .hwk-market-chevron { width: 13px; height: 13px; }
.hwk-market-selector[open] summary > .hwk-market-chevron { transform: rotate(180deg); }
.hwk-market-locale .hwk-market-selector summary {
    justify-content: center;
    padding-inline: 6px;
}
/* Beside DE / EN, the globe alone opens the main shop's country list. */
.hwk-header .hwk-market-locale summary > .hwk-market-selector-detail { display: none; }
.hwk-market-flags { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
details.hwk-market-selector :is(.hwk-market-flag, .hwk-market-world) {
    display: block;
    flex: 0 0 var(--hwk-market-symbol-size);
    width: var(--hwk-market-symbol-size);
    height: var(--hwk-market-symbol-size);
}
.hwk-market-flag {
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px #0002;
}
.hwk-market-flag.is-at { background: linear-gradient(#ed2939 33.33%, #fff 33.33% 66.67%, #ed2939 66.67%); }
.hwk-market-flag.is-de { background: linear-gradient(#171717 33.33%, #d00 33.33% 66.67%, #ffce00 66.67%); }
.hwk-market-flag.is-ch {
    background:
        linear-gradient(#fff 0 0) center / 64% 20% no-repeat,
        linear-gradient(#fff 0 0) center / 20% 64% no-repeat,
        #d52b1e;
}
.hwk-market-flag.is-no {
    background:
        linear-gradient(#00205b 0 0) 35% center / 10% 100% no-repeat,
        linear-gradient(#00205b 0 0) center / 100% 13% no-repeat,
        linear-gradient(#fff 0 0) 33% center / 18% 100% no-repeat,
        linear-gradient(#fff 0 0) center / 100% 25% no-repeat,
        #ba0c2f;
}
.hwk-market-selector-panel {
    position: absolute;
    z-index: 10;
    inset: 100% 0 auto auto;
    display: grid;
    gap: 4px;
    width: min(440px, calc(100vw - 2 * var(--hwk-gutter)));
    padding: 8px;
    background: var(--hwk-menu-surface, #efefed);
    color: #171717;
    border-radius: var(--hwk-control-radius);
    box-shadow: var(--hwk-shadow-panel);
}
.hwk-market-selector:not([open]) .hwk-market-selector-panel { display: none; }
.hwk-header .hwk-market-selector-panel {
    inset-inline-end: var(--hwk-header-inset-right);
    margin-block-start: var(--hwk-header-edge, 0px);
    background: #efefed;
}
.hwk-footer .hwk-market-locale { position: relative; }
.hwk-footer .hwk-market-locale .hwk-market-selector { position: static; }
.hwk-footer .hwk-market-selector-panel { inset: auto auto 100% 0; background: #efefed; }
.hwk-market-selector-region {
    display: grid;
    grid-template-columns: calc(2 * var(--hwk-market-symbol-size) + 4px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: var(--hwk-target);
    padding: 5px 8px;
    border-radius: var(--hwk-control-radius);
    text-decoration: none;
}
.hwk-market-selector-symbol { display: flex; align-items: center; }
.hwk-market-selector-detail { white-space: nowrap; }
.hwk-market-selector-region .hwk-market-selector-detail { color: #484846; }
.hwk-market-selector-panel a { color: #171717; text-decoration: none; }
.hwk-market-selector-panel a:is(:hover, :focus-visible, [aria-current]) { background: #dededb; }
.hwk-market-selector-panel a:focus-visible { outline: 2px solid #333; outline-offset: -2px; }
@media (max-width: 1023px) {
    .hwk-header-tools .hwk-market-locale { gap: 2px; }
    .hwk-header-tools .hwk-market-locale .hwk-language-switcher { inline-size: auto; }
    .hwk-header-tools .hwk-market-locale .hwk-market-selector summary {
        min-width: var(--hwk-mobile-tool-width, 30px);
        padding-inline: 2px;
    }
    .hwk-header .hwk-market-selector summary { gap: 4px; padding-inline: 4px; font-size: 12px; }
    .hwk-header .hwk-market-selector summary > .hwk-market-chevron { width: 10px; height: 10px; }
}
@media (max-width: 359px) {
    .hwk-header .hwk-market-selector summary { padding-inline: 0; }
    .hwk-header .hwk-market-selector summary > .hwk-market-chevron { display: none; }
}
@media (max-width: 389px) {
    .hwk-header > .hwk-header-shell:has(.hwk-market-selector) {
        grid-template-columns: minmax(60px, 1fr) auto minmax(44px, 1fr);
        column-gap: 2px;
    }
}
@media (max-width: 359px) {
    .market-site-header > .hwk-header-shell:has(.hwk-market-selector) {
        grid-template-columns: minmax(0,1fr) auto 44px;
        column-gap: 3px;
    }
    .market-site-header .hwk-header-tools { --hwk-mobile-tool-width: 26px; }
}
@media (min-width: 1024px) and (max-width: 1139px) {
    .hwk-header > .hwk-header-shell:has(.hwk-market-selector) { gap: 8px; }
    .hwk-header-shell:has(.hwk-market-selector) .hwk-nav-root > li > :is(a, .hwk-nav-trigger) { padding-inline: 4px; }
}
@media (min-width: 1280px) {
    .hwk-header > .hwk-header-shell:has(.hwk-market-selector) {
        grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
    }
}
