/* Custom search dropdowns — replaces native select panels */

.search-card,
.search-outer-container {
    overflow: visible;
}

.search-select-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
}

.search-native-select {
    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;
    opacity: 0 !important;
    pointer-events: none !important;
}

.search-dropdown-trigger {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    text-align: right;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    padding: 2px 0 2px 18px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.search-dropdown-trigger.has-value {
    color: #0f172a;
    font-weight: 600;
}

.search-dropdown-trigger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.search-select-wrap.is-open .search-dropdown-trigger {
    color: #0f2766;
}

.search-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    z-index: 200;
    min-width: 220px;
    width: max-content;
    max-width: min(300px, 92vw);
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
    padding: 6px;
}

.search-dropdown-menu[hidden] {
    display: none !important;
}

.search-dropdown-option {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    text-align: right;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.search-dropdown-option:hover,
.search-dropdown-option:focus-visible {
    background: #f1f5f9;
    color: #0f172a;
    outline: none;
}

.search-dropdown-option.is-selected {
    background: #eef2ff;
    color: #0f2766;
    font-weight: 700;
}

.search-dropdown-option.is-placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.search-select-wrap.is-open .search-select-chevron {
    color: #0f2766;
    transform: translateY(-50%) rotate(180deg);
}

.search-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}

.search-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.search-dropdown-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.search-dropdown-menu {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

@media (max-width: 991px) {
    .search-dropdown-menu {
        max-height: 180px;
    }
}

/* Custom Arabic date picker */

.search-date-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
}

.search-date-trigger {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    text-align: right;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    padding: 2px 0;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.search-date-trigger.has-value {
    color: #0f172a;
    font-weight: 600;
}

.search-date-wrap.is-open .search-date-trigger {
    color: #0f2766;
}

.search-date-calendar {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    z-index: 210;
    width: 300px;
    max-width: 92vw;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
    padding: 14px;
    direction: rtl;
}

.search-date-calendar[hidden] {
    display: none !important;
}

.search-date-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}

.search-date-calendar-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    flex: 1;
    text-align: center;
}

.search-date-nav {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.15s ease;
}

.search-date-nav:hover {
    background: #e2e8f0;
    color: #0f2766;
}

.search-date-weekdays,
.search-date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.search-date-weekdays {
    margin-bottom: 6px;
}

.search-date-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    padding: 4px 0;
}

.search-date-day {
    aspect-ratio: 1;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}

.search-date-day:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0f172a;
}

.search-date-day.is-selected {
    background: #0f2766;
    color: #ffffff;
    font-weight: 700;
}

.search-date-day.is-today:not(.is-selected) {
    border: 1.5px solid #0f2766;
    color: #0f2766;
}

.search-date-day:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.search-date-day.is-outside {
    color: #cbd5e1;
}

.search-date-calendar-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.search-date-footer-btn {
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: #0f2766;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 6px;
}

.search-date-footer-btn:hover {
    background: #eef2ff;
}

