/**
 * Contact Us Page CSS
 * Styles for Phone / WhatsApp input group and Choices.js integration
 */

/* Phone / WhatsApp custom input group */
.phone-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.phone-input-group .country-code-col {
    width: 50%;
    flex: 0 0 50%;
}

.phone-input-group .phone-number-col {
    flex: 1 1 auto;
    min-width: 0;
}

.phone-input-group .phone-number-col .form-control {
    border-left: 0;
    height: 44px;
    border-radius: 0;
}

.phone-input-group .phone-number-col .form-control:focus {
    border-left: 1px solid #ffb600;
    position: relative;
    z-index: 2;
}

.phone-input-group .phone-number-col .form-control.is-invalid {
    border-left: 1px solid #dc3545;
    position: relative;
    z-index: 2;
}

/* Choices.js styling to match theme */
.choices {
    margin-bottom: 0;
    font-size: 14px;
}

.choices__inner {
    min-height: 44px;
    height: 44px;
    padding: 5px 12px;
    background-color: #fff;
    border: 1px solid #dadada;
    border-radius: 0;
    color: #333;
    display: flex;
    align-items: center;
}

.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
    border-color: #ffb600;
}

.choices[data-type*="select-one"] .choices__inner {
    padding-bottom: 5px;
}

.choices__list--single {
    padding: 0 16px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.choices__list--single .choices__item {
    color: #333;
    font-size: 14px;
}

.choices[data-type*="select-one"]:after {
    height: 0;
    width: 0;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
    border-width: 5px 4px 0 4px;
    right: 12px;
    top: 50%;
    margin-top: -2.5px;
    pointer-events: none;
}

.choices[data-type*="select-one"].is-open:after {
    border-color: transparent transparent #555 transparent;
    border-width: 0 4px 5px 4px;
    margin-top: -2.5px;
}

.choices__list--dropdown {
    z-index: 1050;
    border: 1px solid #dadada;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    border-radius: 0;
    background-color: #fff;
    word-break: normal;
}

.country-code-col .choices__list--dropdown {
    min-width: 280px;
}

.choices__list--dropdown .choices__input {
    font-size: 13px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dadada;
    border-radius: 0;
    margin-bottom: 4px;
    color: #333;
}

.choices__list--dropdown .choices__input:focus {
    border-color: #ffb600;
    outline: none;
}

.choices__list--dropdown .choices__item--selectable {
    padding: 7px 12px;
    font-size: 13px;
    color: #333;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: #ffb600;
    color: #111;
}

.choices__list--dropdown .choices__group .choices__heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    padding: 6px 12px;
    border-bottom: 1px solid #eee;
    background: #fbfbfb;
}

@media (max-width: 575.98px) {
    .country-code-col .choices__list--dropdown {
        min-width: 250px;
    }
}

/* Invalid state for Choices.js dropdowns */
.choices.is-invalid .choices__inner {
    border-color: #dc3545 !important;
}

/* OTP input group styling */
.otp-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.otp-input-group .otp-input-col {
    flex: 1 1 auto;
    min-width: 0;
}

.otp-input-group .otp-input-col .form-control {
    height: 44px;
    font-size: 16px;
    letter-spacing: 3px;
    font-weight: 700;
    border-radius: 0;
}

.otp-input-group .otp-btn-col {
    flex: 0 0 auto;
}

.otp-input-group .otp-btn-col .btn {
    height: 44px;
    border-radius: 0;
    padding: 0 20px;
    font-size: 14px;
    white-space: nowrap;
    border-left: 0;
}

.otp-input-group .otp-btn-col .btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

@media (max-width: 575.98px) {
    .otp-input-group {
        flex-direction: column;
    }
    .otp-input-group .otp-btn-col {
        margin-top: 8px;
        width: 100%;
    }
    .otp-input-group .otp-btn-col .btn {
        width: 100%;
        border-left: 1px solid #ffb600;
    }
}
