.site-search-controls {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    min-width: 0;
}

.search-country-open,
.search-open-button {
    display: inline-flex;
    align-items: center;
    color: #003366;
    background: #ffffff;
    border: 1px solid #9fb1c4;
    font: inherit;
    cursor: pointer;
}

.search-country-open {
    gap: 0.3rem;
    min-height: 2rem;
    padding: 0 0.5rem;
    color: #294766;
    background: #f7f9fb;
    border-color: #c7d3df;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.search-open-button {
    gap: 0.4rem;
    margin-right: 1rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
}

.search-country-open:hover,
.search-open-button:hover {
    color: #003366;
    background: #eef5fb;
    border-color: #8fa6bd;
}

.search-country-open:focus-visible,
.search-open-button:focus-visible,
.search-close:focus-visible,
.search-country-reset:focus-visible,
.search-country-done:focus-visible,
.search-country-option:focus-within {
    outline: 2px solid #1473b8;
    outline-offset: 2px;
}

.search-shortcut {
    color: #526579;
    font-size: 0.75rem;
}

.search-modal[hidden],
.search-country-modal[hidden] {
    display: none;
}

.search-modal,
.search-country-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: clamp(0.5rem, 3vh, 2rem) clamp(0.5rem, 2vw, 2rem);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.search-country-modal {
    z-index: 1010;
}

.search-modal::-webkit-scrollbar,
.search-country-modal::-webkit-scrollbar {
    display: none;
}

.search-backdrop {
    position: fixed;
    inset: 0;
    background: rgb(2 14 29 / 0.46);
    backdrop-filter: blur(2px);
}

.search-panel,
.search-country-dialog {
    position: relative;
    margin: 0 auto;
    color: #102033;
    background: #ffffff;
    border: 1px solid #c7d3df;
    border-radius: 16px;
    box-shadow: 0 30px 90px rgb(0 0 0 / 0.28);
}

.search-panel {
    width: min(100%, 780px);
}

.search-country-dialog {
    width: min(100%, 1320px);
}

.search-panel-header,
.search-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: #f7f9fb;
}

.search-panel-header {
    position: relative;
    z-index: 2;
    gap: 1rem;
    border-bottom: 1px solid #d8e1ea;
    border-radius: 15px 15px 0 0;
}

.search-panel-header h2 {
    margin: 0;
    color: #102033;
    font-size: 1.05rem;
}

.search-close {
    flex: 0 0 auto;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0;
    color: #003366;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.search-input-shell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #d8e1ea;
}

.search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 1.05rem;
}

.search-market-scope {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.6rem;
    padding: 0.65rem 1rem;
    background: linear-gradient(90deg, #f7fbfd 0%, #eefaf6 100%);
    border-bottom: 1px solid #c7d8df;
}

.search-market-scope__copy {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.search-market-scope__label {
    color: #526579;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.1;
    text-transform: uppercase;
}

.search-market-scope__copy strong {
    min-width: 0;
    overflow: hidden;
    color: #075f4a;
    font-size: 0.86rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-market-scope__button {
    flex: 0 0 auto;
    min-height: 2.25rem;
    padding: 0.4rem 0.75rem;
    color: #003366;
    background: #ffffff;
    border: 1px solid #8fa6bd;
    border-radius: 3px;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}

.search-market-scope__button:hover {
    color: #ffffff;
    background: #005a84;
    border-color: #005a84;
}

.search-market-scope__button:focus-visible {
    outline: 2px solid #1473b8;
    outline-offset: 2px;
}

.search-results {
    overflow: visible;
}

.search-result-list {
    display: grid;
}

.search-result {
    display: grid;
    grid-template-columns: minmax(110px, 160px) 1fr;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: #003366;
    text-decoration: none;
    border-bottom: 1px solid #eef2f6;
}

.search-result:hover,
.search-result:focus {
    background: #eef5fb;
    outline: 0;
}

.search-result span,
.search-result small {
    display: block;
}

.search-result small,
.search-footer,
.search-empty {
    color: #526579;
    font-size: 0.85rem;
}

.search-empty {
    margin: 0;
    padding: 1.5rem 1rem;
}

.search-footer {
    border-top: 1px solid #d8e1ea;
    border-radius: 0 0 15px 15px;
}

.search-country-dialog__eyebrow {
    display: block;
    margin-bottom: 0.18rem;
    color: #008f68;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.search-country-dialog__intro,
.search-country-dialog__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1rem;
}

.search-country-dialog__intro {
    background: #fbfcfd;
    border-bottom: 1px solid #d8e1ea;
}

.search-country-dialog__intro p,
.search-country-dialog__footer p {
    margin: 0;
}

.search-country-dialog__intro > div {
    display: grid;
    gap: 0.2rem;
}

#search-country-description,
.search-country-dialog__footer p {
    color: #526579;
    font-size: 0.8rem;
}

.search-country-dialog__current {
    color: #102033;
    font-size: 0.84rem;
}

.search-country-dialog__current strong {
    color: #075f4a;
}

.search-country-reset,
.search-country-done {
    flex: 0 0 auto;
    min-height: 2.25rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid #8fa6bd;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}

.search-country-reset {
    color: #003366;
    background: #ffffff;
}

.search-country-done {
    color: #ffffff;
    background: #003f6b;
    border-color: #003f6b;
}

.search-country-reset:hover {
    background: #eef5fb;
}

.search-country-done:hover {
    background: #002e50;
}

.search-country-options {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.45rem;
    margin: 0;
    padding: 0.85rem 1rem;
    border: 0;
}

.search-country-option {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 0.45rem;
    align-items: center;
    min-width: 0;
    min-height: 3.6rem;
    padding: 0.55rem;
    background: #ffffff;
    border: 1px solid #d8e1ea;
    cursor: pointer;
}

.search-country-option:hover {
    background: #f7fbfd;
    border-color: #9fb1c4;
}

.search-country-option:has(input:checked) {
    background: #eefaf6;
    border-color: #45ad91;
    box-shadow: inset 3px 0 #008f68;
}

.search-country-option input {
    grid-row: 1 / span 2;
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    accent-color: #008f68;
}

.search-country-option > span {
    grid-row: 1 / span 2;
    font-size: 1rem;
}

.search-country-option strong,
.search-country-option small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-country-option strong {
    color: #102033;
    font-size: 0.78rem;
}

.search-country-option small {
    color: #526579;
    font-size: 0.67rem;
}

.search-country-option--all {
    grid-column: 1 / -1;
    min-height: 3.2rem;
}

.search-country-dialog__footer {
    background: #f7f9fb;
    border-top: 1px solid #d8e1ea;
    border-radius: 0 0 15px 15px;
}

@media (max-width: 1180px) {
    .search-country-options {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .search-country-options {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-search-controls {
        width: 100%;
    }

    .search-country-open {
        flex: 0 0 auto;
        min-height: 3rem;
        border-radius: 8px;
    }

    .search-modal,
    .search-country-modal {
        padding: 0.5rem;
    }

    .search-panel,
    .search-country-dialog {
        width: 100%;
        border-radius: 12px;
    }

    .search-panel-header {
        border-radius: 11px 11px 0 0;
    }

    .search-panel-header,
    .search-footer,
    .search-input-shell,
    .search-market-scope,
    .search-country-dialog__intro,
    .search-country-dialog__footer {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .search-input-shell {
        gap: 0.5rem;
    }

    .search-country-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 0.65rem 0.75rem;
    }

    .search-shortcut,
    .search-footer {
        display: none;
    }

    .search-result {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        padding: 0.75rem;
    }
}

@media (max-width: 560px) {
    .search-market-scope {
        align-items: stretch;
        flex-direction: column;
        gap: 0.55rem;
    }

    .search-market-scope__button {
        width: 100%;
    }

    .search-country-dialog__intro,
    .search-country-dialog__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .search-country-reset,
    .search-country-done {
        width: 100%;
    }

    .search-country-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 360px) {
    .search-country-options {
        grid-template-columns: 1fr;
    }

    .search-country-option--all {
        grid-column: auto;
    }
}
