/* components/select-search.css — The search list that opens from every dropdown.
   Script: assets/js/select-search.js. Loaded late in includes/layout.php so it wins. */

.ss-panel {
  position: fixed;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 6px;
  background: #fffdf8;
  border: 1px solid rgba(184, 134, 43, .55);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(49, 14, 20, .22);
  font-family: var(--sans, "Source Sans 3", "Segoe UI", sans-serif);
  color: var(--ink, #2f171b);
  overflow: hidden;
}

.ss-panel[hidden] { display: none !important; }

.ss-panel .ss-search,
body.desk-body .ss-panel .ss-search {
  flex: none;
  width: 100% !important;
  height: 36px !important;
  margin: 0 0 6px;
  padding: 6px 10px !important;
  font-size: 14px;
  background: #fff !important;
  border: 1px solid rgba(184, 134, 43, .55) !important;
  border-radius: 8px !important;
  color: var(--ink, #2f171b) !important;
  box-shadow: none !important;
}

.ss-panel .ss-search:focus,
body.desk-body .ss-panel .ss-search:focus {
  outline: none;
  border-color: var(--maroon, #671f2b) !important;
  box-shadow: 0 0 0 3px rgba(122, 20, 40, .12) !important;
}

.ss-list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ss-item {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.ss-item.is-active { background: rgba(198, 161, 90, .22); }

.ss-item.is-selected {
  font-weight: 700;
  color: var(--maroon, #671f2b);
}

.ss-item.is-selected::after { content: " ✓"; }

.ss-item.is-disabled {
  color: #9a8a8c;
  cursor: default;
  background: none;
}

.ss-group {
  padding: 8px 10px 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #8a6a3a;
}

.ss-empty {
  margin: 0;
  padding: 10px;
  font-size: 14px;
  color: #8a7a7c;
  text-align: center;
}

@media (pointer: coarse) {
  .ss-item { padding: 11px 12px; font-size: 15px; }
  .ss-panel .ss-search,
  body.desk-body .ss-panel .ss-search { height: 40px !important; font-size: 16px; }
}

@media print {
  .ss-panel { display: none !important; }
}
