/* Dropdown under header search — do not rely on Tailwind utilities
   (markup is injected from theme JS and may not be scanned). */
.header-search-wrap {
  position: relative;
  z-index: 40;
}

predictive-search {
  position: relative;
  display: block;
  width: 100%;
}

.tm-search-shortcuts,
.predictive-search .tm-search-shortcuts,
.js-search-results.tm-search-shortcuts,
.js-search-results .tm-search-shortcuts {
  position: absolute;
  display: none;
  /* Sit just under the search field */
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 0;
  margin: 0;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  color: #2a2b2a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  z-index: 60;
}

predictive-search[open] .tm-search-shortcuts,
.header-search-wrap[data-open] .tm-search-shortcuts {
  display: block;
  z-index: 80;
}

predictive-search .js-search-overlay,
predictive-search .overlay.js-search-overlay {
  display: none !important;
  pointer-events: none !important;
}

predictive-search[open] .js-search-overlay,
predictive-search[open] .overlay.js-search-overlay {
  display: block !important;
  pointer-events: auto !important;
}

.tm-search-shortcuts__inner {
  padding: 0.85rem 1rem 1rem;
}

.tm-search-shortcuts__section + .tm-search-shortcuts__section {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #f0f0f0;
}

.tm-search-shortcuts__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.55rem;
}

.tm-search-shortcuts__title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #777;
  text-transform: none;
}

.tm-search-shortcuts__clear {
  padding: 0;
  border: 0;
  background: none;
  color: #777;
  font-size: 13px;
  cursor: pointer;
}

.tm-search-shortcuts__clear:hover {
  color: #ff580d;
}

.tm-search-shortcuts__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tm-search-shortcuts__chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid rgba(42, 43, 42, 0.12);
  border-radius: 999px;
  background: #f7f7f7;
  color: #2a2b2a;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.tm-search-shortcuts__chip:hover,
.tm-search-shortcuts__chip:focus-visible {
  border-color: #ff580d;
  background: rgba(255, 88, 13, 0.1);
  color: #ff580d;
  outline: none;
}

@media (max-width: 768.98px) {
  .tm-search-shortcuts,
  .predictive-search .tm-search-shortcuts,
  .js-search-results .tm-search-shortcuts {
    left: 0;
    right: 0;
    width: 100%;
    max-height: min(60vh, 360px);
  }
}
