
.asd-phone-field {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    position: relative;
}

.asd-phone-field .asd-phone-country {
    position: relative;
    flex: 0 0 94px;
    min-width: 94px;
    z-index: 20;
}

.asd-phone-country-toggle {
    width: 100%;
    height: 100%;
    min-height: 40px;
    border: 1px solid #dcdcdc;
    border-right: 0;
    border-radius: 999px 0 0 999px;
    background: #f7f7f7;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 0 10px 0 12px;
    cursor: pointer;
    font: inherit;
    box-sizing: border-box;
}

.asd-phone-country-toggle:hover,
.asd-phone-country.is-open .asd-phone-country-toggle {
    background: #f1f1f1;
}

.asd-phone-country-current {
    font-size: 13px;
    white-space: nowrap;
}

.asd-phone-country-arrow {
    font-size: 10px;
    opacity: .55;
    transition: transform .15s ease;
}

.asd-phone-country.is-open .asd-phone-country-arrow {
    transform: rotate(180deg);
}

.asd-phone-country-dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    width: 320px;
    max-width: min(320px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
    overflow: hidden;
    z-index: 9999;
}

.asd-phone-country.is-open .asd-phone-country-dropdown {
    display: block;
}

.asd-phone-country-search-wrap {
    padding: 10px;
    border-bottom: 1px solid #ededed;
    background: #fff;
}

.asd-phone-country-search {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    border: 1px solid #dedede !important;
    border-radius: 8px !important;
    padding: 0 12px !important;
    background: #fff !important;
    color: #222 !important;
    font-size: 13px !important;
    box-shadow: none !important;
}

.asd-phone-country-search:focus {
    border-color: #ff9900 !important;
    outline: 2px solid rgba(255, 153, 0, .12) !important;
}

.asd-phone-country-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
}

.asd-phone-country-option {
    width: 100%;
    border: 0;
    background: transparent;
    color: #222;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 9px;
    cursor: pointer;
    text-align: left;
    font: inherit;
    font-size: 13px;
}

.asd-phone-country-option:hover {
    background: #f5f5f5;
}

.asd-phone-country[data-iso2] .asd-phone-country-option[aria-selected="true"] {
    background: #fff7eb;
}

.asd-phone-country-flag {
    font-size: 17px;
    line-height: 1;
}

.asd-phone-country-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asd-phone-country-code {
    font-weight: 600;
    opacity: .72;
}

.asd-phone-country-empty {
    padding: 18px 12px;
    text-align: center;
    font-size: 13px;
    color: #777;
}

.asd-phone-field > input[type="tel"] {
    flex: 1 1 auto;
    min-width: 0;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.asd-phone-field:focus-within .asd-phone-country-toggle {
    border-color: #ff9900;
}

@media (max-width: 480px) {
    .asd-phone-field .asd-phone-country {
        flex-basis: 88px;
        min-width: 88px;
    }

    .asd-phone-country-toggle {
        padding-left: 9px;
        padding-right: 8px;
    }

    .asd-phone-country-current {
        font-size: 12px;
    }

    .asd-phone-country-dropdown {
        width: min(300px, calc(100vw - 28px));
    }
}
