/* Clean Dropdown Select Component Styles */

.searchable-select-wrapper {
    position: relative;
    display: block;
}

.searchable-select-display {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    box-sizing: border-box;
}

.searchable-select-display:hover {
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.searchable-select-display:focus {
    outline: none;
    border-color: #1b75bb;
    box-shadow: 0 0 0 3px rgba(27, 117, 187, 0.1);
}

.searchable-select-display .selected-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #374151;
    font-weight: 500;
    text-align: left;
}

.searchable-select-display .selected-text:empty::before,
.searchable-select-display .selected-text[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    font-weight: 400;
}

.searchable-select-display .selected-text.has-value {
    color: #374151;
}

/* Select Arrow */
.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.select-arrow .select-icon {
    color: #9ca3af;
    transition: transform 0.15s ease;
    width: 16px;
    height: 16px;
}

/* Dropdown Menu */
.searchable-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow: hidden;
    z-index: 9999;
    display: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    margin-top: -1px;
}

.searchable-select-wrapper.open .searchable-select-dropdown {
    display: block;
}

.searchable-select-wrapper.open .searchable-select-display {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #1b75bb;
    box-shadow: 0 0 0 3px rgba(27, 117, 187, 0.1);
}

.searchable-select-wrapper.open .select-arrow .select-icon {
    transform: rotate(180deg);
    color: #1b75bb;
}

/* Search Input */
.search-input-wrapper {
    position: relative;
    padding: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.search-input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: #f9fafb;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.search-input:focus {
    outline: none;
    border-color: #1b75bb;
    background: #fff;
}

.search-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    width: 14px;
    height: 14px;
}

/* Options List */
.options-list {
    max-height: 200px;
    overflow-y: auto;
}

.no-results-message {
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-style: italic;
    font-size: 14px;
    border-bottom: none;
}

.option-item mark {
    background: #fef08a;
    color: #365314;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

.option-item {
    padding: 11px 16px;
    cursor: pointer;
    transition: background-color 0.12s ease;
    font-size: 14px;
    color: #374151;
    background: #fff;
    line-height: 1.5;
}

.option-item:hover {
    background: #f8fafc;
    color: #1e293b;
}

.option-item.selected,
.option-item[data-selected="true"] {
    background: #f0f9ff;
    color: #0369a1;
    font-weight: 500;
}

.option-item.hidden {
    display: none;
}

/* Enhanced Search Styling */
.no-results-message {
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-style: italic;
    font-size: 14px;
    border-bottom: none;
}

.option-item mark {
    background: #fef08a;
    color: #365314;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* Custom Scrollbar */
.options-list::-webkit-scrollbar {
    width: 4px;
}

.options-list::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.options-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.options-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Enhanced Mobile Responsive */
@media (max-width: 768px) {
    .searchable-select-dropdown {
        max-height: 250px;
    }
    
    .options-list {
        max-height: 180px;
    }
    
    .searchable-select-display {
        padding: 12px 40px 12px 14px;
        font-size: 15px;
        min-height: 48px;
    }
    
    .option-item {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .search-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 10px 30px 10px 12px;
    }
}