/* ====================================== */
/* SHARED INTL-TEL-INPUT OVERRIDES */
/* ====================================== */

.iti {
    width: 100%;
    position: relative; /* important for dropdown positioning */
    --iti-path-flags-1x: url('/assets/intl-tel-input/img/flags.webp');
    --iti-path-flags-2x: url('/assets/intl-tel-input/img/flags@2x.webp');
}

/* Selected country button */
.iti .iti__selected-country {
    border-radius: 8px 0 0 8px;
}

/* Dropdown container */
.iti .iti__country-list {
    max-height: 260px;
    overflow-y: auto; /* FIX: prevents empty space when few results */
    z-index: 2100;
}

.iti .iti--inline-dropdown .iti__dropdown-content{
    border: unset;
}


.iti .iti__search-input-wrapper {
    border-bottom: unset;
}

#iti-0__dropdown-content{
    height: auto !important;
}

/* SEARCH WRAPPER FIX */
.iti .iti__search-container {
    position: relative;
    padding: 8px;
}

/* SEARCH INPUT FIX */
.iti .iti__search-input {
    width: 100%;
    min-height: 40px;

    padding: 10px 12px 10px 36px; /* space for icon */

    border: 1px solid #e0e0e0;
    border-radius: 8px;

    font-size: 14px;
    font-family: inherit;
    line-height: 1.2;

    box-sizing: border-box; /* FIX: prevents overflow */
}

/* FIX: icon overlapping text */
.iti .iti__search-input::placeholder {
    color: #999;
}

/* Search icon positioning */
.iti .iti__search-container::before {
    content: "🔍";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
    opacity: 0.6;
}

/* Focus state */
.iti .iti__search-input:focus {
    outline: none;
    border-color: #069645;
    box-shadow: 0 0 0 3px rgba(6, 150, 69, 0.1);
}

/* Country items */
.iti .iti__country {
    padding: 9px 10px;
}

/* Hover / highlight */
.iti .iti__country.iti__highlight {
    background-color: #e8f5ee;
}

/* OPTIONAL: remove weird spacing between search and list */
.iti .iti__divider {
    margin: 6px 0;
}

/* Mobile fix */
@media (max-width: 768px) {
    .iti .iti__search-input {
        font-size: 16px;
    }
}