/* Centralized fixes for intl-tel-input + shared form fields across main site, lp and lp2 */

/* Phone field: wrapper must fill its column like the other fields */
.contact-form .iti {
    display: block;
    width: 100%;
    margin-bottom: 0px;
}
.contact-form .iti input.contact-phone {
    width: 100%;
}
.contact-form .field-inner.iti-group {
    margin: 0;
    padding: 0;
}

/* Placeholder follows the input's own text color on every theme */
.contact-form .contact-phone::placeholder {
    color: inherit;
    opacity: 0.65;
}

/* Message textarea (lp2): text must start top-left, not vertically centered */
.contact-form textarea.contact-message {
    resize: vertical;
    height: auto;
    line-height: normal;
    text-align: left;
}

/* Selected country button: inherit the form's own text color
   (fixes black dial code on dark lp2 banner / invisible on popups) */
.contact-form .iti__selected-country {
    color: inherit;
}

/* Site CSS has `.contact-form .form-group button { display: inline-block }`
   which breaks the iti button layout — outrank it (higher specificity) and
   force flex + nowrap so flag, dial code and arrow stay on one line */
.contact-form .form-group button.iti__selected-country {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    width: auto;
    float: none;
    height: 100%;
}
.contact-form .form-group button.iti__selected-country > * {
    flex: 0 0 auto;
    float: none;
}
.contact-form .form-group .iti__selected-country-primary {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.contact-form .iti__selected-dial-code {
    color: inherit;
    margin-left: 4px;
    white-space: nowrap;
}
.contact-form .iti__arrow {
    border-top-color: currentColor;
    margin-left: 4px;
}

/* Body-mounted country dropdown must sit above the lead popup (z-index: 1080) */
.iti--container {
    z-index: 1100;
}

/* Country dropdown: always light + readable regardless of page theme */
.iti__dropdown-content,
.iti__country-list {
    background: #ffffff;
    color: #212529;
}
.iti__country {
    color: #212529;
}
.iti__country .iti__country-name {
    color: #212529;
}
.iti__country .iti__dial-code {
    color: #6c757d;
    margin-left: 6px;
}
.iti__country.iti__highlight {
    background-color: #f1f1f1;
}

/* Dropdown search box: site input styles break it, reset it */
.iti__search-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: auto;
    margin: 0;
    padding: 8px 10px;
    background: #ffffff;
    color: #212529;
    border: 0;
    border-bottom: 1px solid #dddddd;
    font: inherit;
    line-height: normal;
    text-align: left;
    box-shadow: none;
    border-radius: 0;
}
.iti__search-input::placeholder {
    color: #999999;
    opacity: 1;
}
/* Site CSS breaks the inline icon glyph; hide it and keep clean padding */
.iti__search-icon {
    display: none;
}
.iti__search-input + .iti__country-list {
    border-top: 0;
}

/* lp banner forms: submit button must be visible */
.home-banner .contact-submit-btn,
.lp-banner .contact-submit-btn,
.main-banner .contact-submit-btn,
.bannerForm .contact-submit-btn,
.banner-form .contact-submit-btn,
.top-form-v2 .contact-submit-btn {
    background-color: #000000;
    color: #ffffff !important;
}
.home-banner .contact-submit-btn:hover,
.lp-banner .contact-submit-btn:hover,
.main-banner .contact-submit-btn:hover,
.bannerForm .contact-submit-btn:hover,
.banner-form .contact-submit-btn:hover,
.top-form-v2 .contact-submit-btn:hover {
    background-color: #333333;
    color: #ffffff !important;
}
