/* K697 — searchable selects (typing filters options, Arabic-aware) */
.ks-wrap {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
}
.ks-wrap > select {
  visibility: hidden !important;
  pointer-events: none !important;
}
.ks-wrap > input.ks-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding-inline-end: 26px !important;
  cursor: text;
}
.ks-caret {
  position: absolute;
  inset-inline-end: 2px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.ks-caret:hover { background: rgba(15, 23, 42, .06); }
.ks-caret:disabled { opacity: .4; cursor: default; }

.ks-menu {
  position: fixed;
  z-index: 4000;
  display: none;
  box-sizing: border-box;
  min-width: 180px;
  padding: 4px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.ks-menu.open { display: block; }
.ks-opt {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.ks-opt:hover, .ks-opt.active { background: #eef6ff; }
.ks-opt[aria-selected="true"] { color: #0f766e; }
.ks-opt:disabled { color: #94a3b8; cursor: default; background: transparent; }
.ks-opt mark {
  background: #fef08a;
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.ks-group {
  padding: 7px 10px 3px;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
}
.ks-empty {
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
}
.ks-toast {
  position: fixed;
  inset-inline-start: 50%;
  bottom: 24px;
  z-index: 4100;
  transform: translateX(-50%) translateY(20px);
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 99px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.ks-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .ks-wrap > input.ks-input { font-size: 16px; }
  .ks-opt { padding: 11px 10px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ks-toast { transition: none; }
}
