.phone-input-field {
    --phone-input-height: 58px;
    --phone-input-radius: 14px;
    --phone-input-border: #e4e6eb;
    --phone-input-background: #f5f5f7;
    width: 100%;
    min-width: 0;
    font-family: 'ping2', Arial, sans-serif;
}

.phone-input-field--compact {
    --phone-input-height: 52px;
}

.phone-input-field__control,
.phone-input-field .iti {
    width: 100%;
    min-width: 0;
}

.phone-input-field .iti {
    display: block;
    direction: ltr;
}

.phone-input-field .iti__tel-input,
.phone-input-field .iti__tel-input[type='tel'] {
    width: 100%;
    height: var(--phone-input-height);
    border: 1px solid var(--phone-input-border);
    border-radius: var(--phone-input-radius);
    background: var(--phone-input-background);
    color: #202124;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    direction: ltr;
    text-align: left;
    padding-left: 122px !important;
    padding-right: 16px !important;
    box-shadow: none;
    outline: none;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.phone-input-field .iti__tel-input::placeholder {
    color: #8b949d;
    font-weight: 400;
    opacity: 1;
}

.phone-input-field .iti__country-container {
    padding: 1px;
}

.phone-input-field .iti__selected-country {
    min-width: 108px;
    justify-content: center;
    overflow: hidden;
    border: 0;
    border-right: 1px solid var(--phone-input-border);
    border-radius: calc(var(--phone-input-radius) - 1px) 0 0 calc(var(--phone-input-radius) - 1px);
    background: #fff;
    color: #25282b;
}

.phone-input-field .iti__selected-country-primary {
    padding: 0 7px 0 12px;
}

.phone-input-field .iti__selected-dial-code {
    min-width: 38px;
    margin: 0 9px 0 2px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    unicode-bidi: isolate;
}

.phone-input-field .iti__tel-input:focus {
    border-color: #111;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, .08);
}

.phone-input-field:focus-within .iti__selected-country {
    border-right-color: #111;
    background: #fbfbfc;
}

.phone-input-field.is-invalid .iti__tel-input {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .08);
}

.phone-input-field.is-invalid .iti__selected-country {
    border-right-color: #dc3545;
}

.phone-input-field .invalid-feedback {
    margin-top: 6px;
    text-align: right;
    font-family: inherit;
    font-size: 13px;
}

.phone-input-iti .iti__country-selector {
    overflow: hidden;
    border: 1px solid #e2e5e9;
    border-radius: 14px;
    background: #fff;
    color: #202124;
    direction: rtl;
    text-align: right;
    font-family: 'ping2', Arial, sans-serif;
    box-shadow: 0 16px 42px rgba(0, 0, 0, .16);
}

.phone-input-iti.iti--inline-country-selector:not(.iti--detached-country-selector) .iti__country-selector {
    position: absolute;
    z-index: 20;
    left: 0;
}

.phone-input-iti.iti--inline-country-selector .iti__country-list {
    max-height: 230px;
}

.phone-input-iti .iti__search-input {
    min-height: 48px;
    border: 0;
    background: #f7f8fa;
    color: #202124;
    direction: rtl;
    text-align: right;
    font-family: inherit;
    outline: none;
}

.phone-input-iti .iti__country {
    min-height: 44px;
    gap: 3px;
}

.phone-input-iti .iti__country-name {
    font-size: 14px;
}

.phone-input-iti .iti__dial-code {
    color: #6c757d;
    direction: ltr;
    font-family: Arial, sans-serif;
    unicode-bidi: isolate;
}

.iti--detached-country-selector.phone-input-iti {
    z-index: 2147483647;
}

.iti--fullscreen-popup.phone-input-iti.iti--detached-country-selector {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 16px;
    background: rgba(0, 0, 0, .5);
}

.iti--fullscreen-popup.phone-input-iti .iti__country-selector {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

@media (max-width: 575.98px) {
    .phone-input-field,
    .phone-input-field--compact {
        --phone-input-height: 54px;
    }

    .phone-input-field .iti__selected-country {
        min-width: 96px;
    }

    .phone-input-field .iti__tel-input,
    .phone-input-field .iti__tel-input[type='tel'] {
        padding-left: 108px !important;
    }

    .phone-input-field .iti__selected-country-primary {
        padding-left: 9px;
    }

    .phone-input-field .iti__selected-dial-code {
        min-width: 33px;
        margin-right: 7px;
        font-size: 13px;
    }

    .phone-input-iti .iti__country-selector {
        width: min(340px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
    }

    .phone-input-iti .iti__country-list {
        max-height: min(380px, calc(100vh - 180px));
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .phone-input-iti .iti__search-input {
        font-size: 16px;
    }
}
