/* marketplace/static/marketplace/css/tom-select-theme.css */

/* 1. Style the actual visible control to match Tailwind inputs */
.ts-control {
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important; /* border-gray-300 */
    border-radius: 0.75rem !important; /* rounded-xl */
    padding: 0.75rem 1rem;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    min-height: 3rem;
    display: flex;
    align-items: center;
    width: 100%;
    transition: all 0.2s ease;
    color: #111827 !important; /* gray-900 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
}

/* 3. Replace default arrow with custom SVG arrow */
.ts-wrapper.single .ts-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3e%3cpath d='m4 6 4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 1rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.25em 1.25em !important;
    padding-right: 2.5rem !important; /* Ensure text doesn't overlap arrow */
}
.ts-wrapper.single .ts-control, 
.ts-wrapper.single .ts-control input {
    cursor: pointer;
    color: #111827 !important; /* gray-900 */
}

/* 4. Focus State - Match Tailwind focus ring */
.ts-wrapper.focus .ts-control {
    outline: none !important;
    border-color: #5B6CF9 !important; /* focus:border-[#5B6CF9] */
    box-shadow: 0 0 0 2px rgba(91, 108, 249, 0.2) !important; /* focus:ring-2 focus:ring-[#5B6CF9]/20 */
}

/* 5. Dropdown Menu Styling */
.ts-dropdown {
    border-radius: 0.75rem; /* rounded-xl */
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    padding: 0;
    margin-top: 4px;
    z-index: 50;
    background-color: #ffffff !important;
    color: #111827 !important;
}

/* 6. Option Styling */
.ts-dropdown .option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: #374151; /* gray-700 */
    font-size: 0.875rem;
    font-weight: 500;
}
.ts-dropdown .option.active, .ts-dropdown .active {
    background-color: #f3f4f6 !important; /* gray-100 */
    color: #111827 !important;
}

/* 7. Hide the original input completely */
select.search-select {
    display: none !important;
}

/* 8. Fix Flatpickr Native Selects (Month/Year) */
.flatpickr-current-month .flatpickr-monthDropdown-months {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-color: transparent !important;
    border: none !important;
    color: #111827 !important;
    font-weight: 800 !important;
    cursor: pointer;
    padding: 4px 8px !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
    background-color: #f3f4f6 !important;
    border-radius: 0.5rem;
}
.flatpickr-current-month .flatpickr-monthDropdown-months option {
    background-color: #ffffff !important;
    color: #111827 !important;
}
.flatpickr-current-month .numInputWrapper {
    width: 6ch !important;
}
.flatpickr-current-month .numInputWrapper input.numInput.cur-year {
    color: #111827 !important;
    font-weight: 800 !important;
    padding: 4px 8px !important;
}

/* Add a tiny bit of space underneath the month/year header */
.flatpickr-months {
    margin-bottom: 0.5rem !important;
}