/* ── Choices.js custom theming ──────────────────────────── */
.pk-choices.choices {
    margin-bottom: 0;
}

.pk-choices .choices__inner {
    background: #fff !important;
    border: 1px solid #E7E2D8 !important;
    border-radius: 10px !important;
    padding: 11px 14px !important;
    min-height: 46px !important;
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 0.95rem !important;
    color: #1F2937 !important;
}

.pk-choices.is-focused .choices__inner,
.pk-choices.is-open .choices__inner {
    border-color: #0F766E !important;
    box-shadow: 0 0 0 3px rgba(15,118,110,0.15) !important;
}

.pk-choices .choices__list--single .choices__item {
    color: #1F2937;
    padding-right: 24px;
}

.pk-choices .choices__placeholder {
    color: #9CA3AF !important;
    opacity: 1 !important;
}

.pk-choices .choices__list--dropdown {
    border: 1px solid #E7E2D8 !important;
    border-radius: 10px !important;
    margin-top: 4px !important;
    box-shadow: 0 8px 24px rgba(15,23,42,0.08) !important;
    background: #fff !important;
}

.pk-choices .choices__list--dropdown .choices__item {
    padding: 10px 14px !important;
    font-size: 0.92rem !important;
    color: #374151 !important;
}

.pk-choices .choices__list--dropdown .choices__item--selectable.is-highlighted {
    background: #F0FDFA !important;
    color: #115E59 !important;
}

.pk-choices .choices__input {
    background: transparent !important;
    border: none !important;
    padding: 6px 10px !important;
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 0.92rem !important;
    color: #1F2937 !important;
    margin: 4px !important;
    border-bottom: 1px solid #E7E2D8 !important;
}

/* Caret */
.pk-choices.choices[data-type*="select-one"]::after {
    border-color: #6B7280 transparent transparent !important;
    right: 14px !important;
}
.pk-choices.choices[data-type*="select-one"].is-open::after {
    border-color: transparent transparent #6B7280 !important;
}

/* No results found */
.pk-choices .choices__list .choices__item--no-results,
.pk-choices .choices__list .choices__item--no-choices {
    color: #6B7280;
    font-style: italic;
    padding: 12px 14px;
}

/* Homepage smaller variant */
.pk-tutor-search .pk-choices .choices__inner {
    padding: 9px 12px !important;
    min-height: 42px !important;
    font-size: 0.9rem !important;
}

/* Force-hide the native <select> once Choices.js has wrapped it */
.choices select,
.choices select[hidden] {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

/* ── Flex sizing — make Choices wrapper grow like the original select ── */

/* Wrapper takes all available horizontal space inside any flex search bar */
.pk-search-bar .choices,
.pk-tutor-search-bar .choices,
form .choices.pk-choices {
    flex: 1 1 0;
    min-width: 0;
}

/* Inner container fills the wrapper */
.pk-choices .choices__inner {
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0;
}

/* Truncate placeholder / selected label cleanly instead of wrapping */
.pk-choices .choices__list--single .choices__item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Search bar layout — ensure flex is set and button doesn't grow */
.pk-search-bar,
.pk-tutor-search-bar {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-wrap: nowrap;
}

.pk-search-bar > .choices,
.pk-tutor-search-bar > .choices {
    flex: 1 1 0;
    min-width: 0;
}

.pk-search-bar > .pk-search-btn,
.pk-tutor-search-bar > .pk-search-btn {
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .pk-search-bar,
    .pk-tutor-search-bar {
        flex-wrap: wrap;
    }
    .pk-search-bar > .choices,
    .pk-tutor-search-bar > .choices {
        flex: 1 1 calc(50% - 4px);
    }
}
