/* Phone input with country picker (intl-tel-input), see resources/views/components/phone-input.blade.php */

/* Matches the site inputs (style.css): #141414 pill, #373737 border, Roboto 14px bold */
.phone-field .iti {
    display: block;
    width: 100%;
    /* .modal form sets font-size: 0 (style.css), which hides the dial code and country names */
    font-size: 14px;
    font-family: "Roboto", sans-serif;
}

.phone-field.has-error input[type="tel"] {
    border: 1px solid #ea0f0f;
}

/* style.css only styles "form label input ~ .error-message"; the input is nested here */
form label .phone-field ~ .error-message {
    padding: 8px 0 0 0;
    display: flex;
    color: #d01313;
    font-size: 13px;
    font-family: "Roboto", sans-serif;
    justify-content: left;
}

/* --- Selected country: flag + dial code + arrow, as a segment inside the pill --- */
.phone-field .iti__country-container {
    padding: 1px;
}

.phone-field .iti__selected-country {
    border-radius: 26px 0 0 26px;
    background: transparent;
    color: #fff;
}

.phone-field .iti__selected-country-primary {
    padding: 0 4px 0 20px;
    border-radius: 26px 0 0 26px;
    transition: background-color 0.2s;
}

.phone-field .iti:not(.iti--disabled) .iti__selected-country-primary:hover,
.phone-field .iti:not(.iti--disabled) .iti__selected-country:has(+ .iti__dropdown-content:hover) .iti__selected-country-primary {
    background-color: rgba(255, 255, 255, 0.06);
}

.phone-field .iti__flag {
    border-radius: 2px;
    box-shadow: none;
}

.phone-field .iti__arrow {
    margin-left: 8px;
    border-top-color: #8a8a8a;
}

.phone-field .iti__arrow--up {
    border-top-color: transparent;
    border-bottom-color: #8a8a8a;
}

.phone-field .iti__selected-dial-code {
    margin-left: 0;
    padding-right: 12px;
    border-right: 1px solid #373737;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    color: #fff;
}

/* No country chosen yet: globe icon on a dark background */
.phone-field .iti__globe {
    filter: invert(1);
    opacity: 0.6;
}

/* --- Country dropdown --- */
.iti__dropdown-content {
    font-size: 14px;
    font-family: "Roboto", sans-serif;
    margin-top: 6px;
    background-color: #141414;
    border: 1px solid #373737;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    color: #fff;
}

.iti__country-list {
    background-color: #141414;
    scrollbar-width: thin;
    scrollbar-color: #373737 transparent;
}

.iti__country {
    padding: 8px 14px;
    color: #fff;
}

.iti__country-name {
    color: #fff;
}

.iti__country .iti__dial-code {
    color: #8a8a8a;
}

.iti__country.iti__highlight {
    background-color: #232323;
}

/* the global "input" rule in style.css turns this into a pill; make it a plain search row */
.iti__search-input,
.iti__search-input:focus {
    background-color: #141414;
    color: #fff;
    border: none;
    border-bottom: 1px solid #373737;
    border-radius: 0;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.iti__search-input::placeholder {
    color: #8a8a8a;
}

.iti--fullscreen-popup.iti--container {
    background-color: rgba(0, 0, 0, 0.7);
}

.iti--fullscreen-popup .iti__dropdown-content {
    margin-top: 0;
}
