/* The site's ".form-group input" rule has higher specificity than
   the library's ".iti__search-input" and overrides its padding-left,
   covering the search icon. This selector wins that specificity fight
   without touching the library's minified file. */
.iti .iti__search-input {
    padding-left: calc(var(--iti-spacer-horizontal) + var(--iti-globe-icon-size) + var(--iti-spacer-horizontal));
}

/* The library-generated ".iti" wrapper is "display: inline-block" by
   default, so it doesn't take the ".form-group" width and the input
   ends up sized to its content instead of filling 100%. */
.form-group .iti {
    display: block;
    width: 100%;
}

/* ========== Country dropdown theme ==========
   Matches the site's custom selects (src/js/modules/forms/custom-select.js). Values mirror
   the SCSS tokens: $color-medium-gray, $color-gold-alpha, $color-dark-text, $color-gold,
   $color-gold-light, $color-navy, $color-text-gray, $radius-sm, $radius-md, $shadow-medium.
*/
.iti {
    --iti-border-color: rgba(187, 187, 187, 0.5);
    --iti-hover-color: rgba(184, 148, 77, 0.15);
    --iti-icon-color: #4a4a4a;
    --iti-spacer-horizontal: 12px;
    --iti-arrow-padding: 8px;
    --iti-country-selector-bg: #ffffff;
}

/* Selected-country button: rounded to sit inside the input's left corners */
.iti__selected-country-primary {
    border-radius: 10px 0 0 10px;
}

.iti__selected-country:focus-visible {
    outline: 2px solid #1f3a5f;
    outline-offset: -2px;
    border-radius: 10px 0 0 10px;
}

/* Dropdown panel */
.iti--inline-country-selector .iti__country-selector {
    margin-top: 4px;
    overflow: hidden;
    border: 1px solid rgba(201, 169, 110, 0.5);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.iti--fullscreen-popup .iti__country-selector {
    overflow: hidden;
    border-radius: 10px;
}

.iti--inline-country-selector .iti__country-list {
    max-height: 240px;
}

.iti__country-list {
    padding: 4px;
    font-family: 'Lato', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #4a4a4a;
}

/* Search box: no field-style focus ring inside the panel, the wrapper underline marks it */
.iti .iti__search-input {
    padding-top: 12px;
    padding-bottom: 12px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    font-size: 0.95rem;
    box-shadow: none;
}

.iti .iti__search-input:focus-visible {
    outline: none;
    box-shadow: none;
}

.iti__search-input-wrapper:focus-within {
    box-shadow: inset 0 -2px 0 #b8944d;
}

/* Options */
.iti__country {
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.iti__country.iti__highlight {
    background-color: rgba(184, 148, 77, 0.15);
}

.iti__country[aria-selected="true"] {
    font-weight: 600;
    color: #1f3a5f;
}

.iti__country[aria-selected="true"] .iti__country-check {
    color: #b8944d;
}

.iti__dial-code {
    margin-left: 6px;
    color: #555555;
}

.iti__no-results {
    padding: 12px;
    color: #555555;
}
