/* ==========================================================================
   Search + Filters — Figma "01 Dashboard v2"
   72:12917 / 72:13096 filter sheet · 72:12953 filter results ·
   72:12969 search · 72:12996 / 72:13017 type-ahead · 72:13033 / 72:13078 results
   ========================================================================== */

/* ---------- Image crops (Figma image frame offsets) ---------- */
.srch-crop { position: absolute; display: block; pointer-events: none; }
.srch-crop img { position: absolute; max-width: none; }

/* ---------- Tags v2 ---------- */
.srch-tag {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 4px;
  font: 500 12px/normal var(--font-sans); letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--caviar); white-space: nowrap;
}

/* ---------- Search result card (172 square, 8 radius) ---------- */
.srch-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: 16px; row-gap: 32px;
}
.srch-grid-fr { column-gap: 17px; }
.srch-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.srch-tile-media {
  position: relative; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden;
  background: var(--neutral-light); cursor: pointer;
}
.srch-tile-bm { position: absolute; top: 8px; right: 8px; }
.srch-tile-media .srch-tag { position: absolute; left: 8px; top: calc(100% - 26px); }
.srch-tile-text { display: flex; flex-direction: column; gap: 4px; }
.srch-tile-text h3 { color: var(--caviar); cursor: pointer; }
.srch-course-link { font: 700 14px/19.6px var(--font-sans); color: var(--tomato); cursor: pointer; max-width: 150px; }

/* ---------- Dashboard Filter Results (72:12953) ---------- */
.srch-fr-top { flex-shrink: 0; background: var(--bg); padding: 19px 16px 0; }
.srch-fr-row { display: flex; gap: 8px; align-items: center; }
.srch-fr-pill { flex: 1 1 auto; }
.srch-fr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.srch-active-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--caviar); color: #fff; border-radius: 100px; padding: 3px 8px;
  font: 400 14px/22.75px var(--font-sans);
}
.srch-active-chip:active { transform: scale(.96); }
.srch-fr-scroller { padding: 23px 16px 24px; }

/* ---------- Search bar (56px, below the status bar) ---------- */
.srch-bar {
  flex-shrink: 0; position: relative; z-index: 5;
  display: flex; align-items: flex-start; gap: 16px;
  height: calc(var(--safe-top) + 56px);
  padding: var(--safe-top) 16px 0;
  background: var(--bg); border-bottom: 1px solid var(--neutral-light-shade);
}
.srch-back { width: 24px; height: 24px; margin-top: 16px; flex-shrink: 0; }
.srch-back img { width: 24px; height: 24px; }
.srch-pill {
  position: relative; flex: 1 1 auto; min-width: 0;
  height: 40px; margin: 8px 0 0; border-radius: 80px; background: var(--neutral-light);
  display: flex; align-items: center; gap: 8px; padding: 0 48px 0 16px;
}
.srch-pill-icon { width: 16px; height: 16px; flex-shrink: 0; }
.srch-input {
  flex: 1 1 auto; min-width: 0; height: 20px;
  border: 0; outline: 0; background: transparent; padding: 0; margin: 0;
  font: 400 14px/19.6px var(--font-sans); color: var(--caviar);
  caret-color: var(--tomato);
  -webkit-appearance: none; appearance: none;
}
/* Avoid iOS zoom-on-focus (inputs < 16px) on phones by scaling a 16px field down. */
.srch-field { flex: 1 1 auto; min-width: 0; height: 20px; display: flex; overflow: hidden; }
.srch-field .srch-input { width: 100%; }
html.is-mobile .srch-field .srch-input { font-size: 16px; transform: scale(.875); transform-origin: left center; width: 114.286%; flex: none; }
.srch-input::placeholder { color: var(--neutral-dark); opacity: 1; }
.srch-input::-webkit-search-cancel-button, .srch-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.srch-input-static { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srch-pill[data-action] { cursor: text; }
.srch-clear {
  position: absolute; right: 16px; top: 8px; width: 24px; height: 24px; border-radius: 44px;
  display: none; align-items: center; justify-content: center;
}
.srch-clear img { width: 7.5px; height: 7.5px; }
.srch-pill.has-value .srch-clear { display: flex; }

.srch-scroller { background: var(--bg); }

/* ---------- Search idle (72:12969) ---------- */
.srch-idle { padding: 24px 16px 32px; }
.srch-h { font: 700 18px/25.2px var(--font-sans); color: var(--caviar); }
.srch-instructors { gap: 18px; margin-top: 17px; padding-bottom: 2px; }
.srch-inst { width: 94px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.srch-inst-photo { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; display: block; }
.srch-inst-photo img { width: 88px; height: 88px; object-fit: cover; }
.srch-inst-name { font: 500 12px/22.75px var(--font-sans); color: var(--caviar); white-space: nowrap; text-align: center; }
.srch-h-suggested { margin-top: 22px; line-height: 29.25px; }
.srch-suggested { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 17px; }
.srch-sugg { font: 400 16px/26px var(--font-sans); color: var(--caviar); text-align: left; }

/* ---------- Type-ahead (72:12996 / 72:13017) ---------- */
.srch-ta { display: flex; flex-direction: column; gap: 8px; padding: 25px 16px 24px; }
.srch-ta-row {
  position: relative; display: flex; align-items: flex-start; gap: 16px;
  height: 66px; border-radius: 9px; background: #fff; text-align: left; width: 100%;
}
.srch-ta-row:active { background: var(--neutral-light); }
.srch-ta-thumb { position: relative; width: 50px; height: 50px; margin-top: 7px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--neutral-light); }
.srch-ta-text { display: flex; flex-direction: column; padding-top: 14px; min-width: 0; flex: 1 1 auto; }
.srch-ta-meta { font: 500 12px/normal var(--font-sans); color: var(--neutral-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 12px; line-height: 12px; }
.srch-ta-title { font: 700 16px/26px var(--font-sans); color: var(--caviar); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srch-ta-empty { padding: 25px 23px; font: 400 16px/26px var(--font-sans); color: var(--caviar); }

/* ---------- Search results (72:13033) ---------- */
.srch-results { padding-bottom: 24px; }
.srch-tabs { margin-top: 16px; }
.srch-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.srch-tabs::-webkit-scrollbar { display: none; }
.srch-tab {
  flex-shrink: 0; padding: 4px 8px; border-radius: 100px;
  background: var(--neutral-light); color: var(--caviar);
  font: 400 14px/22.75px var(--font-sans); white-space: nowrap;
  transition: background .2s, color .2s;
}
.srch-tab.on { background: var(--caviar); color: #fff; }
.srch-results-body { padding: 0 16px; }
.srch-count-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; margin-bottom: 28px; }
.srch-count { font: 400 14px/22.75px var(--font-sans); color: var(--caviar); }
.srch-filter-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--neutral-light); border-radius: 100px; padding: 6px 16px;
  font: 400 14px/22.75px var(--font-sans); color: #000;
}
.srch-filter-pill img { width: 24px; height: 24px; }
.srch-tab-empty { font: 400 16px/26px var(--font-sans); color: var(--neutral-dark); padding: 24px 0; }

/* ---------- No results (72:13078) ---------- */
.srch-none { display: flex; align-items: center; justify-content: center; }
.srch-none-box { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 0 16px; transform: translateY(-17px); }
.srch-none-box img { width: 40px; height: 40px; }
.srch-none-title { font: 400 24px/27px var(--font-sans); color: var(--caviar); }
.srch-none-sub { font: 400 16px/26px var(--font-sans); color: var(--neutral-dark); }

/* ---------- Filter sheet (72:12917 / 72:13096) ---------- */
.sheet.srch-filter-sheet { height: 707px; max-height: calc(100% - var(--safe-top) - 24px); border-radius: 24px 24px 0 0; }
.sheet.srch-filter-sheet.srch-ctx-search { height: 780px; max-height: calc(100% - var(--safe-top) - 18px); }
.srch-sheet-head { position: relative; flex-shrink: 0; height: 67px; background: var(--bg); }
.srch-sheet-head h2 { position: absolute; left: 16px; top: 24px; font: 700 18px/29.25px var(--font-sans); color: var(--caviar); }
.srch-sheet-x { position: absolute; right: 17px; top: 27px; width: 24px; height: 24px; }
.srch-sheet-x img { width: 24px; height: 24px; }
.srch-sheet-body { padding: 16px 16px 90px; display: flex; flex-direction: column; gap: 8px; }

.srch-sort { position: relative; height: 179px; flex-shrink: 0; padding-right: 17px; }
.srch-sort h3 { font: 700 16px/22.4px var(--font-sans); color: var(--caviar); margin-bottom: 16.6px; }
.srch-sort::after { content: ""; position: absolute; left: -1px; right: 0; bottom: 8px; height: 1px; background: var(--neutral-light-shade); }
.srch-radio {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; height: 23px; margin-bottom: 8px;
  font: 400 16px/22.4px var(--font-sans); color: var(--caviar); text-align: left;
}
.srch-radio i { width: 17px; height: 17px; border-radius: 50%; border: 1px solid #000; flex-shrink: 0; transition: background .15s, border-color .15s; }
.srch-radio.on i { background: var(--caviar); border-color: var(--caviar); }

.srch-acc { flex-shrink: 0; background: var(--neutral-light); border-radius: 8px; padding: 16px; }
.srch-acc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; width: 100%; height: 24px; text-align: left; }
.srch-acc-head span { font: 700 16px/22.4px var(--font-sans); color: var(--caviar); }
.srch-acc-head img { width: 24px; height: 24px; transition: transform .3s var(--ease-out); }
.srch-acc.open .srch-acc-head img { transform: rotate(180deg); }
.srch-acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease-out); }
.srch-acc-body > div { overflow: hidden; min-height: 0; }
.srch-acc.open .srch-acc-body { grid-template-rows: 1fr; }
.srch-fchips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 15px; padding-right: 1px; }
.srch-fchip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border-radius: 100px; padding: 4px 8px;
  font: 400 14px/19.6px var(--font-sans); color: var(--caviar); white-space: nowrap;
  transition: background .15s, color .15s;
}
.srch-fchip img { width: 16px; height: 16px; }
.srch-fchip.on { background: var(--caviar); color: #fff; }

.srch-sheet-foot {
  position: relative; flex-shrink: 0;
  height: calc(80px + max(0px, var(--safe-bottom) - 34px));
  border-top: 1px solid var(--neutral-light-shade); background: var(--bg);
}
.srch-reset { position: absolute; left: 16px; top: 23px; display: flex; align-items: center; gap: 4px; font: 400 16px/26px var(--font-sans); color: #000; }
.srch-reset img { width: 24px; height: 24px; }
.srch-view {
  position: absolute; right: 16px; top: 15px;
  background: var(--caviar); color: #fff; border-radius: 48px; padding: 8px 32px;
  font: 700 18px/25.2px var(--font-sans); white-space: nowrap;
}
.srch-view:active, .srch-reset:active { transform: scale(.97); }
