/**
 * Searchable Country Select Dropdown Styles with Country Flags
 * Warm Luxury Theme Styling (Matches Chauffeur / Executive Theme)
 */

.uts-country-select-container {
    position: relative;
    width: 100%;
    user-select: none;
}

.uts-country-trigger {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-height: 40px !important;
    padding: 8px 0 !important;
    cursor: pointer !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-bottom: 1.5px solid #EAE2D7 !important;
    box-shadow: none !important;
    transition: all 0.25s ease !important;
    outline: none !important;
}

.uts-country-trigger:focus,
.uts-country-select-container.is-open .uts-country-trigger {
    border-bottom-color: #C88A35 !important;
    box-shadow: 0 1px 0 0 #C88A35 !important;
}

.uts-country-trigger::before,
.uts-country-trigger::after {
    display: none !important;
    content: none !important;
}

.uts-trigger-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.uts-flag-preview {
    font-size: 20px;
    line-height: 1;
    display: none;
}

.uts-code-preview {
    font-size: 15px;
    color: #9E9488;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uts-code-preview.has-value {
    color: #1A1715;
    font-weight: 500;
}

.uts-country-caret {
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-right: 2px solid #7A6F64 !important;
    border-bottom: 2px solid #7A6F64 !important;
    border-top: none !important;
    border-left: none !important;
    background: transparent !important;
    background-image: none !important;
    transform: rotate(45deg) !important;
    margin-right: 4px !important;
    transition: transform 0.25s ease, border-color 0.2s ease !important;
    flex-shrink: 0 !important;
}

.uts-country-trigger:hover .uts-country-caret,
.uts-country-select-container.is-open .uts-country-caret {
    border-right-color: #C88A35 !important;
    border-bottom-color: #C88A35 !important;
}

.uts-country-select-container.is-open .uts-country-caret {
    transform: rotate(-135deg) !important;
}

/* Country Dropdown Panel */
.uts-country-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 320px;
    max-width: 92vw;
    background: #ffffff;
    border: 1px solid #EAE2D7;
    border-radius: 16px;
    box-shadow: 0 16px 40px -8px rgba(35, 25, 15, 0.16), 0 4px 12px rgba(35, 25, 15, 0.05);
    z-index: 99999;
    flex-direction: column;
    overflow: hidden;
    animation: utsSlideDown 0.2s ease-out;
}

@keyframes utsSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search input box */
.uts-country-search-box {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #EFE8DD;
    background: #FAF7F2;
    gap: 8px;
}

.uts-search-icon {
    color: #7A6F64;
    flex-shrink: 0;
}

.uts-country-search-input {
    width: 100% !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 14px !important;
    color: #1A1715 !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    font-family: inherit !important;
}

.uts-country-search-input::placeholder {
    color: #9E9488;
}

/* Country List */
.uts-country-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Scrollbar for Country List */
.uts-country-list::-webkit-scrollbar {
    width: 6px;
}
.uts-country-list::-webkit-scrollbar-track {
    background: #FAF7F2;
}
.uts-country-list::-webkit-scrollbar-thumb {
    background: #D8CEBE;
    border-radius: 4px;
}
.uts-country-list::-webkit-scrollbar-thumb:hover {
    background: #C88A35;
}

/* Country List Item */
.uts-country-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    gap: 12px;
    font-size: 14px;
    color: #1A1715;
}

.uts-country-item:hover,
.uts-country-item.is-highlighted {
    background: #FAF5ED;
}

.uts-country-item.is-selected {
    background: #F5EBE0;
    color: #1A1715;
    font-weight: 600;
}

.uts-country-flag {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.uts-country-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uts-country-dial {
    color: #7A6F64;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.uts-country-item.is-selected .uts-country-dial {
    color: #C88A35;
}

.uts-country-empty {
    padding: 20px 16px;
    text-align: center;
    color: #9E9488;
    font-size: 13px;
    cursor: default;
}
