/* Choices.js Dark Mode Customization */

/* Light mode - default styles from CDN */
.choices {
    font-size: 14px;
    position: relative;
}

/* Ensure dropdown doesn't get covered */
.choices__list--dropdown {
    z-index: 100 !important;
}

/* Dark mode overrides */
.dark .choices__inner {
    background-color: rgb(30 41 59) !important; /* slate-800 */
    border-color: rgb(71 85 105) !important; /* slate-600 */
    color: rgb(226 232 240) !important; /* slate-200 */
}

.dark .choices__input {
    background-color: rgb(30 41 59) !important;
    color: rgb(226 232 240) !important;
}

.dark .choices__list--dropdown {
    background-color: rgb(30 41 59) !important;
    border-color: rgb(71 85 105) !important;
}

.dark .choices__list--dropdown .choices__item--selectable {
    color: rgb(226 232 240) !important;
}

.dark .choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: rgb(51 65 85) !important; /* slate-700 */
    color: rgb(248 250 252) !important; /* slate-50 */
}

.dark .choices__placeholder {
    color: rgb(148 163 184) !important; /* slate-400 */
}

/* Search input in dropdown */
.dark .choices__input--cloned {
    background-color: rgb(51 65 85) !important;
    border-color: rgb(71 85 105) !important;
    color: rgb(226 232 240) !important;
}

/* No results message */
.dark .choices__item--choice.has-no-results,
.dark .choices__item--choice.has-no-choices {
    color: rgb(148 163 184) !important;
}

/* Selected item in single select */
.dark .choices__item--selectable {
    color: rgb(226 232 240) !important;
}

/* Scrollbar for dropdown in dark mode */
.dark .choices__list--dropdown::-webkit-scrollbar {
    width: 8px;
}

.dark .choices__list--dropdown::-webkit-scrollbar-track {
    background: rgb(51 65 85);
}

.dark .choices__list--dropdown::-webkit-scrollbar-thumb {
    background: rgb(71 85 105);
    border-radius: 4px;
}

.dark .choices__list--dropdown::-webkit-scrollbar-thumb:hover {
    background: rgb(100 116 139);
}

/* Custom class for league filter */
.choices-league-filter .choices__inner {
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 8px;
}

.choices-league-filter .choices__list--dropdown {
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    position: absolute !important;
    z-index: 1000 !important;
    max-height: 300px !important;
}

.dark .choices-league-filter .choices__list--dropdown {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
}

/* Ensure parent card has enough space when dropdown is open */
.choices-league-filter[data-type="select-one"].is-open {
    margin-bottom: 320px;
    transition: margin-bottom 0.2s ease;
}

.choices-league-filter[data-type="select-one"]:not(.is-open) {
    margin-bottom: 0;
    transition: margin-bottom 0.2s ease;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .choices-league-filter .choices__inner {
        min-height: 40px;
        padding: 6px 10px;
    }
}
