/* Searchable select — لا يغيّر مظهر الحقل المغلق؛ التصميم فقط للوحة الاختيارات */
.ss-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ss-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.ss-sheet {
  width: 100%;
  max-width: 520px;
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
  transform: translateY(18px);
  transition: transform 0.22s ease;
}

.ss-overlay.is-open .ss-sheet {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .ss-overlay {
    align-items: center;
    padding: 1.5rem;
  }

  .ss-sheet {
    border-radius: 1.25rem;
    max-height: min(70vh, 520px);
    transform: translateY(10px) scale(0.98);
  }

  .ss-overlay.is-open .ss-sheet {
    transform: none;
  }
}

.ss-handle {
  width: 40px;
  height: 4px;
  margin: 0.65rem auto 0;
  border-radius: 99px;
  background: #dde4ec;
}

.ss-sheet-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.5rem 1.15rem;
}

.ss-sheet-title {
  flex: 1 1 auto;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
}

.ss-sheet-close {
  border: 0;
  background: transparent;
  color: #6c757d;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
}

.ss-search-wrap {
  position: relative;
  padding: 0 1rem 0.75rem;
}

.ss-search {
  width: 100%;
  border: 1px solid rgba(52, 112, 174, 0.14);
  border-radius: 0.75rem;
  background: #f7f9fc;
  padding: 0.65rem 0.85rem 0.65rem 2.5rem;
  font-size: 0.95rem;
}

[dir="rtl"] .ss-search {
  padding: 0.65rem 2.5rem 0.65rem 0.85rem;
}

.ss-search-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 1.55rem;
  transform: translateY(-50%);
  color: var(--color-primary, #3470ae);
  pointer-events: none;
}

.ss-options {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0 0.75rem 1.1rem;
  -webkit-overflow-scrolling: touch;
}

.ss-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  border: 0;
  border-radius: 0.75rem;
  background: #f7f9fc;
  color: #1a1a1a;
  text-align: start;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.ss-option:hover {
  background: #ebf2f9;
}

.ss-option.is-selected {
  background: #ebf2f9;
  color: #295a8c;
  font-weight: 600;
}

.ss-option-check {
  color: var(--color-primary, #3470ae);
  font-size: 1.1rem;
  line-height: 1;
}

.ss-empty {
  text-align: center;
  color: #6c757d;
  padding: 2rem 1rem;
  font-size: 0.95rem;
}

body.ss-open {
  overflow: hidden;
}
