/* ==========================================================================
   AROOSYAR • ری‌اسکین Chosen با رنگ‌های سیستم طراحی (v3)
   وابسته به: chosen.min.css (پایه) + متغیرهای aroosyar-theme.css
   ========================================================================== */

.chosen-container {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    text-align: right;
    width: 100% !important;
}

/* --- حالت استاندارد (داخل .field-group مثل فرم‌های جستجو) --- */
.chosen-container-single .chosen-single {
    height: 48px;
    line-height: 48px;
    padding: 0 42px 0 16px;
    background: var(--surface, #fff);
    border: 1.5px solid var(--line, #E3ECF2);
    border-radius: var(--r-sm, 14px);
    box-shadow: none;
    color: var(--ink, #0F1533);
    font-size: .92rem;
    transition: var(--t, .28s cubic-bezier(.22, .75, .3, 1));
}
.chosen-container-single .chosen-single:hover {
    border-color: var(--sky-400, #A3BEE7);
}
.chosen-container-active.chosen-with-drop .chosen-single,
.chosen-container-active .chosen-single {
    border-color: var(--sky-400, #A3BEE7);
    box-shadow: 0 0 0 4px rgba(175, 197, 211, .28);
}

/* فلش رو به پایین سفارشی (بدون اسپرایت) */
.chosen-container-single .chosen-single div {
    position: absolute;
    top: 0; left: 14px;
    width: 16px; height: 100%;
}
.chosen-container-single .chosen-single div b {
    background: none !important;
    display: block;
    position: relative;
}
.chosen-container-single .chosen-single div b::before {
    content: "";
    position: absolute;
    top: 50%; left: 2px;
    width: 8px; height: 8px;
    border-right: 2px solid var(--muted, #7C88A8);
    border-bottom: 2px solid var(--muted, #7C88A8);
    transform: translateY(-65%) rotate(45deg);
    transition: var(--t, .28s cubic-bezier(.22, .75, .3, 1));
}
.chosen-container-active .chosen-single div b::before {
    border-color: var(--sky-600, #7099d6);
    transform: translateY(-35%) rotate(225deg);
}

.chosen-container .chosen-drop {
    border: 1.5px solid var(--sky-400, #A3BEE7);
    border-radius: var(--r-sm, 14px);
    box-shadow: var(--sh-2, 0 12px 32px -18px rgba(15, 21, 51, .28));
    overflow: hidden;
    margin-top: 6px;
    left: 0; right: 0;
}

/* --- جستجو داخل دراپ‌داون --- */
.chosen-container .chosen-search {
    padding: 10px;
    background: var(--sky-50, #F4F8FB);
    border-bottom: 1px solid var(--line, #E3ECF2);
}
.chosen-container .chosen-search input[type="text"] {
    background: var(--surface, #fff) !important;
    border: 1.5px solid var(--line, #E3ECF2);
    border-radius: var(--r-sm, 14px);
    padding: 8px 14px !important;
    font-family: 'Vazirmatn', sans-serif;
    font-size: .86rem;
    color: var(--ink, #0F1533);
    width: 100%;
}
.chosen-container .chosen-search input[type="text"]:focus {
    outline: none;
    border-color: var(--sky-400, #A3BEE7);
}

/* --- گزینه‌های لیست --- */
.chosen-container .chosen-results {
    padding: 6px;
    margin: 0;
    max-height: 260px;
}
.chosen-container .chosen-results li {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: .87rem;
    color: var(--ink-2, #43507A);
}
.chosen-container .chosen-results li.group-result {
    font-weight: 800;
    color: var(--ink, #0F1533);
    background: transparent;
    font-size: .8rem;
    padding-top: 12px;
}
.chosen-container .chosen-results li.highlighted {
    background: var(--sky-100, #E7F0F6);
    color: var(--ink, #0F1533);
}
.chosen-container .chosen-results li.no-results {
    background: transparent;
    color: var(--muted, #7C88A8);
}

.chosen-container-single .chosen-single abbr {
    background: none !important;
    position: relative;
}
.chosen-container-single .chosen-single abbr::before {
    content: "✕";
    font-size: .7rem;
    color: var(--muted, #7C88A8);
}

/* --- حالت فشرده مخصوص هدر (پیل کوچک) --- */
.aroosyar-header-selector .chosen-container-single .chosen-single {
    height: 40px;
    line-height: 40px;
    padding: 0 34px 0 12px;
    border-radius: var(--r-pill, 15px);
    font-size: .82rem;
    min-width: 140px;
}
.aroosyar-header-selector .chosen-container .chosen-drop {
    min-width: 220px;
    left: auto;
    right: 0;
}

@media (max-width: 767px) {
    .aroosyar-header-selector { display: none; }
}
