/* Country drop-down with flags: web/public/js/country-select.js */

.countrySelect {
    position: relative;
}

/* div/input in the selector: outranks the site's ".basicForm input[type=text]", which resets the background. */
div.countrySelect input.countrySelect-input {
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23000122' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    text-overflow: ellipsis;
}

div.countrySelect.-hasFlag input.countrySelect-input {
    padding-left: 36px;
}

.countrySelect-flag {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 15px;
    box-shadow: 0 0 0 1px rgba(0, 1, 34, .12);
    pointer-events: none;
}

.countrySelect-list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 280px;
    overflow-y: auto;
    margin: 2px 0 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #000122;
    box-shadow: 0 8px 20px rgba(0, 1, 34, .15);
}

/* The site's own styles give img (and select) an explicit display, which overrides the hidden attribute. */
.countrySelect-flag[hidden],
select.js-countrySelect[hidden],
.countrySelect-list[hidden],
.countrySelect-list li[hidden] {
    display: none;
}

.countrySelect-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 7px 10px;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
}

.countrySelect-list li::before {
    content: none;
}

.countrySelect-list li img {
    flex: none;
    width: 20px;
    height: 15px;
    box-shadow: 0 0 0 1px rgba(0, 1, 34, .12);
}

.countrySelect-list li:hover,
.countrySelect-list li.-active {
    background: #edf0ff;
}

.countrySelect-list li[aria-selected="true"] {
    font-weight: 600;
}

.countrySelect-list li.countrySelect-empty {
    color: #5a5c70;
    cursor: default;
    background: none;
}
