.sfc-source-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sfc-combobox {
    --sfc-border: rgba(108, 178, 239, 0.42);
    --sfc-surface: #f7fbff;
    --sfc-text: #082a4c;
    --sfc-muted: #60788f;
    --sfc-accent: #137fdc;
    position: relative;
    width: 100%;
    direction: rtl;
}

.sfc-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    min-height: 46px;
    overflow: hidden;
    border: 1px solid var(--sfc-border);
    border-radius: 7px;
    background: var(--sfc-surface);
    color: var(--sfc-text);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.sfc-combobox.is-open .sfc-control,
.sfc-control:focus-within {
    border-color: var(--sfc-accent);
    box-shadow: 0 0 0 3px rgba(19, 127, 220, 0.16);
}

.sfc-search {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 13px;
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    color: inherit !important;
    font: inherit;
    text-align: right;
    direction: rtl;
    box-shadow: none !important;
}

.sfc-search::placeholder { color: var(--sfc-muted); opacity: 0.9; }

.sfc-toggle {
    display: grid;
    place-items: center;
    min-width: 42px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-right: 1px solid rgba(96, 120, 143, 0.2);
    background: transparent;
    color: var(--sfc-text);
    cursor: pointer;
}

.sfc-toggle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 160ms ease;
}

.sfc-combobox.is-open .sfc-toggle::before { transform: rotate(225deg) translate(-1px, -1px); }

.sfc-listbox {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    display: none;
    max-height: 276px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(87, 166, 232, 0.42);
    border-radius: 7px;
    background: #071f3a;
    color: #f7fbff;
    box-shadow: 0 18px 40px rgba(0, 9, 25, 0.38);
    list-style: none;
}

.sfc-combobox.is-open .sfc-listbox { display: block; }

.sfc-option,
.sfc-empty {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 11px;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.55;
}

.sfc-option { cursor: pointer; }
.sfc-option:hover,
.sfc-option.is-active { background: rgba(32, 139, 229, 0.2); }
.sfc-option[aria-selected="true"] { background: #137fdc; color: #fff; }
.sfc-empty { color: #a8bdd0; cursor: default; }

.sfc-jalali-field {
    position: relative;
    width: 100%;
    direction: rtl;
}

.sfc-jalali-field .jalali-date-input {
    width: 100%;
    min-height: 46px;
    padding-inline: 46px 12px;
    cursor: pointer;
    text-align: right;
    direction: ltr;
}

.sfc-calendar-trigger {
    position: absolute;
    inset-inline-start: 4px;
    inset-block: 4px;
    width: 38px;
    min-width: 38px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: rgba(19, 127, 220, 0.12);
    color: #137fdc;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.sfc-calendar-trigger svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sfc-calendar-trigger:hover { background: rgba(19, 127, 220, 0.2); }
.sfc-calendar-trigger:focus-visible { outline: 3px solid rgba(19, 127, 220, 0.3); outline-offset: 1px; }

jdp-container {
    --jdp-day-size: 44px;
    --jdp-primary: #137fdc;
    --jdp-color-0: #ffffff;
    --jdp-color-1: #edf6ff;
    --jdp-color-2: #d8eafa;
    --jdp-color-3: #91afd0;
    --jdp-color-4: #526b86;
    --jdp-color-5: #082a4c;
    z-index: 10020 !important;
    font-family: inherit;
    border: 1px solid #9fc7eb;
    border-radius: 8px;
}

jdp-container .jdp-year select,
jdp-container .jdp-month select {
    min-height: 40px;
    color: #082a4c;
    background: #fff;
    border-radius: 6px;
}

jdp-container .jdp-btn-empty,
jdp-container .jdp-btn-close { min-height: 40px; display: inline-flex; align-items: center; }

@media (max-width: 520px) {
    .sfc-jalali-field .jalali-date-input { min-height: 48px; }
    .sfc-listbox { max-height: min(42vh, 300px); }
}

@media (prefers-reduced-motion: reduce) {
    .sfc-control,
    .sfc-toggle::before { transition: none; }
}
