/* HWC-3485 follow-up: Country widget custom dropdown (flag + name/code), progressively enhanced
   from the server-rendered native <select> by js/site/countryWidgetFlagSelect.js. Scoped under
   .country-widget-select so it never leaks into other selects on the page. */
.country-widget-select {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}
.country-widget-select select.country-widget-native {
    display: none;
}
.country-widget-select .country-widget-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    max-width: 100%;
    padding: 6px 30px 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
    position: relative;
}
.country-widget-select .country-widget-toggle:after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #555;
    transform: translateY(-50%);
}
.country-widget-select .country-widget-toggle[aria-expanded="true"]:after {
    border-top: none;
    border-bottom: 5px solid #555;
}
.country-widget-select .country-widget-toggle-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.country-widget-select .country-widget-panel {
    position: absolute;
    z-index: 5;
    top: 100%;
    left: 0;
    min-width: 100%;
    margin: 2px 0 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.country-widget-select .country-widget-search-wrap {
    padding: 6px;
    border-bottom: 1px solid #eee;
}
.country-widget-select .country-widget-search {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
}
.country-widget-select .country-widget-options {
    margin: 0;
    padding: 4px 0;
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
}
.country-widget-select .country-widget-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    white-space: nowrap;
}
.country-widget-select .country-widget-option:hover,
.country-widget-select .country-widget-option:focus,
.country-widget-select .country-widget-option.selected {
    background-color: rgba(0, 0, 0, 0.05);
    outline: none;
}
.country-widget-select .country-widget-toggle .flag-icon,
.country-widget-select .country-widget-option .flag-icon {
    flex: 0 0 auto;
}
