/* TAB Phone Input & Searchable Country Code Combobox (Step 3 & Modals) */
.tab-phone-section {
    margin-bottom: 1rem;
}
.tab-phone-row-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    width: 100%;
}
.tab-phone-country-col {
    flex: 0 0 135px;
    width: 135px;
    min-width: 135px;
}
.tab-phone-number-col {
    flex: 1;
    min-width: 0;
}
.tab-phone-country-col label,
.tab-phone-number-col label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.tab-country-picker {
    position: static;
    width: 100%;
}
.tab-country-btn.form-control,
.tab-country-btn {
    width: 100%;
    height: calc(1.5em + .75rem + 2px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    background: #ffffff;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.tab-country-btn:hover {
    border-color: #94a3b8;
}
.tab-country-btn:focus,
.tab-country-btn.is-active {
    border-color: #f89828;
    box-shadow: 0 0 0 3px rgba(248, 152, 40, 0.2);
}
.tab-country-btn .tab-country-flag {
    margin-right: 6px;
    flex-shrink: 0;
}
.tab-country-btn .tab-country-label {
    flex: 1;
    text-align: left;
    font-size: 14.5px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tab-country-btn .tab-country-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #64748b;
    margin-left: 6px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.tab-country-btn.is-active .tab-country-arrow {
    transform: rotate(180deg);
}

/* Dropdown Spans Country Code + Phone Number Total Width */
.tab-country-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    z-index: 1060;
    overflow: hidden;
}
.tab-country-search-box {
    position: sticky;
    top: 0;
    background: #ffffff;
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    z-index: 10;
}
.tab-country-search-input {
    width: 100% !important;
    height: 42px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 6px !important;
    outline: none !important;
    box-sizing: border-box !important;
    background: #f8fafc !important;
    color: #1e293b !important;
}
.tab-country-search-input:focus {
    background: #ffffff !important;
    border-color: #f89828 !important;
    box-shadow: 0 0 0 3px rgba(248, 152, 40, 0.2) !important;
}
.tab-country-list {
    max-height: 270px;
    overflow-y: auto;
    list-style: none;
    padding: 4px 0;
    margin: 0;
    -webkit-overflow-scrolling: touch;
}
.tab-country-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    box-sizing: border-box;
    transition: background-color 0.15s;
}
.tab-country-item.is-hidden {
    display: none !important;
}
.tab-country-item:hover,
.tab-country-item.is-highlighted {
    background-color: #fff7ed !important;
}
.tab-country-item.is-selected {
    background-color: #f1f5f9 !important;
    font-weight: 600;
}
.tab-country-item .iti__flag {
    margin-right: 10px;
    flex-shrink: 0;
}
.tab-country-item .tab-country-name {
    flex: 1;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tab-country-item .tab-country-dial {
    color: #64748b;
    font-weight: 600;
    margin-left: 8px;
    font-size: 13.5px;
}
.tab-country-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
    list-style: none;
}
.tab-country-no-results {
    padding: 16px 14px;
    text-align: center;
    color: #94a3b8;
    font-size: 13.5px;
    list-style: none;
}

/* Quote Modal Phone Group */
.tab-quote-phone-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    position: relative;
}
.tab-quote-phone-wrap .tab-country-picker {
    width: 110px;
    min-width: 110px;
    flex-shrink: 0;
}
.tab-quote-phone-wrap .tab-country-btn {
    height: 54px !important;
    border-radius: .50rem !important;
    border: 1px solid #000 !important;
}
.tab-quote-phone-wrap .form-control-email-quote {
    flex: 1;
    width: 100%;
}
.tab-quote-phone-wrap .tab-country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .tab-phone-row-wrapper {
        gap: 6px;
    }
    .tab-phone-country-col {
        flex: 0 0 108px;
        width: 108px;
        min-width: 108px;
    }
    .tab-country-btn {
        height: calc(1.5em + .75rem + 2px) !important;
        padding: .375rem .5rem;
    }
    .tab-country-btn .tab-country-label {
        font-size: 13.5px;
    }
    .tab-country-dropdown {
        max-height: 320px;
    }
    .tab-country-search-input {
        height: 44px !important;
        font-size: 16px !important;
    }
    .tab-country-item {
        padding: 12px 14px !important;
        min-height: 46px !important;
        font-size: 14.5px !important;
    }
    .tab-country-item.is-hidden {
        display: none !important;
    }
}
