.phone-input,
.phone-input__dropdown {
    --iti-flag-width: 20px;
    --iti-hover-color: var(--Gray-1, #FAFAFA);
    --iti-border-color: var(--Gray-3, #E5E5E6);
    --iti-icon-color: var(--Gray-7, #7A7A85);
    --iti-spacer-horizontal: 12px;
    --iti-clear-icon-size: 16px;
    --iti-globe-icon-size: 18px;
}

.phone-input {
    display: block;
    width: 100%;

    &:focus-within .phone-input__field {
        border-color: var(--Gray-7, #7A7A85);
    }
}

.phone-input__button {
    cursor: pointer;

    &:focus-visible {
        outline: none;

        .phone-input__selected {
            background-color: var(--Gray-2, #F2F2F2);
        }
    }
}

.phone-input__selected {
    padding: 0 4px 0 12px;
    border-radius: 7px 0 0 7px;
    transition: background-color .3s ease;
}

.phone-input__flag {
    margin-top: 1px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.phone-input__arrow {
    width: 20px;
    height: 20px;
    margin: 0 0 0 4px;
    border: 0;
    transform: none;
    background: url('../../icons/arrow-select.svg') center / 20px 20px no-repeat;
    transition: transform .3s ease;

    &.iti__arrow--up {
        margin-top: 0;
        transform: rotate(180deg);
    }
}

.phone-input__code {
    align-self: center;
    margin-left: 0;
    padding: 0 0 0 12px;
    border-left: 1px solid var(--Gray-3, #E5E5E6);
    color: var(--Base-Dark, #171717);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0.16px;
}

.iti .phone-input__dropdown {
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 8px 16px;
    border: 0;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 2px 4px 18.3px 0 rgba(0, 0, 0, 0.04), 0 0 0 1px var(--Gray-3, #E5E5E6);
    cursor: default;
}

.iti.phone-input .phone-input__dropdown {
    z-index: 5;
}

.phone-input__search {
    margin-bottom: 8px;
    border-bottom: 0;
}

.phone-input__search-icon {
    left: 12px;
}

.phone-input__search-input {
    width: 100%;
    height: 44px !important;
    min-height: 44px !important;
    padding: 6px 40px 6px 42px !important;
    border: 1px solid var(--Gray-4, #D1D1D2) !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    color: var(--Base-Dark, #171717);
    font-family: inherit;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    letter-spacing: 0.16px;
    transition: border-color .3s ease;

    &:hover {
        border-color: var(--Gray-5, #BDBDC2) !important;
    }

    &:focus {
        border-color: var(--Gray-7, #7A7A85) !important;
    }

    &::placeholder {
        color: var(--Gray-6, #9A9AA2);
    }
}

.phone-input__search-clear {
    right: 6px;
    border-radius: 4px;
}

.iti .phone-input__items {
    max-height: 234px;
    overflow-y: auto;
    cursor: default;
}

.phone-input__item {
    min-height: 36px;
    padding: 6px 12px;
    column-gap: 12px;
    border-radius: 4px;
    color: var(--Base-Dark, #171717);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    letter-spacing: 0.16px;
    cursor: pointer;

    &.iti__highlight {
        background-color: var(--Gray-1, #FAFAFA);
    }

    &[aria-selected="true"] {
        background-color: var(--Gray-2, #F2F2F2);
    }
}

.iti__country-list .phone-input__item-flag {
    margin-top: 1px;
    margin-right: 0;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.phone-input__item-code {
    color: var(--Gray-7, #7A7A85);
    white-space: nowrap;
}

.phone-input__item-check {
    display: none;
}

.phone-input__no-results {
    min-height: 36px;
    padding: 6px 12px;
    color: var(--Gray-7, #7A7A85);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    letter-spacing: 0.16px;
    text-align: left;
}
