/**
 * Searchable country dropdown — see country-select.js.
 *
 * Scoped entirely under .country-select so it cannot reach the other forms the
 * partial is dropped into (checkout, classifieds, directory, admin).
 */

.country-select {
    position: relative;
}

/* The real <select>. Still submitted, just not shown. Kept in the layout with
   absolute positioning rather than display:none so that a browser jumping to
   an invalid required field still scrolls to the right place. */
.country-select__native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.country-select__input {
    /* Room for the chevron. */
    padding-right: 32px;
    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 fill='%23777' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.country-select__list {
    position: absolute;
    z-index: 30;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 280px;
    margin: 2px 0 0;
    padding: 4px 0;
    overflow-y: auto;
    list-style: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.country-select__group {
    padding: 8px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #999;
}

.country-select__option {
    padding: 7px 14px;
    font-size: 14px;
    color: #222;
    cursor: pointer;
}

.country-select__option:hover,
.country-select__option.is-active {
    background: #e93314;
    color: #fff;
}

.country-select__empty {
    padding: 10px 14px;
    font-size: 14px;
    color: #777;
}

/* Visible only to screen readers: the result count, announced as you type. */
.country-select__status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* iOS zooms the page in when a focused input is under 16px. */
@media (max-width: 767px) {
    .country-select__input {
        font-size: 16px;
    }

    .country-select__list {
        max-height: 220px;
    }
}
