/* /search — every open job, in any country (pages/search.js). Cards and the drawer are jobs.css.
   NOT `.wz-search` (whizply.css's search box): that one strips the border off every input inside it. */

.wz-jsearch { display: flex; flex-direction: column; gap: 18px; }
.wz-jsearch__top { display: flex; flex-direction: column; gap: 12px; }
.wz-jsearch__modes { align-self: flex-start; max-width: 100%; }

/* SMART MATCH STANDS OUT (the owner, 2026-10-29: "some animation and different colour so it will be
   highlighted", and an (i) that says how to use it). Learn AI's featured look (whizply.css): the accent
   colour, a twinkling sparkle and a light sweeping across, a greeting that rests after about 30 s.
   Selected, the thumb under it takes the violet-to-mint tint and a ring. Tokens only, so it follows
   Violet, Warm and dark. */
.wz-jsearch__modes { display: flex; align-items: center; gap: 6px; }
/* Unselected it stands out by its COLOUR and its sparkle only: no fill and no ring, so the one filled
   pill on the switch is always the selected mode (2026-10-29, a review: tinted and ringed while
   unselected, it read as the selected one). Hover gives the soft tint; selected, the thumb takes it. */
.wz-segmented__btn.wz-jsearch__smart { position: relative; overflow: hidden; color: var(--accent-deep); }
.wz-segmented__btn.wz-jsearch__smart:hover {
  color: var(--accent-deep);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.wz-jsearch__smart > * { position: relative; z-index: 1; }
.wz-jsearch__smart .wz-icon { color: var(--accent); animation: wz-twinkle 3.2s var(--ease-in-out) 9; }
.wz-jsearch__smart::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--surface) 70%, transparent) 50%, transparent 70%);
  translate: -120% 0; animation: wz-sweep 5.5s var(--ease-in-out) 1.2s 5;
}
.wz-segmented:has(.wz-jsearch__smart[aria-pressed="true"]) .wz-segmented__thumb {
  background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 22%, var(--surface)),
                                      color-mix(in srgb, var(--band-mint-accent) 18%, var(--surface)));
  box-shadow: var(--shadow-thumb), inset 0 0 0 1px var(--accent);
}
@media (prefers-reduced-motion: reduce) {
  .wz-jsearch__smart .wz-icon, .wz-jsearch__smart::after { animation: none; }
}
/* The (i)'s text: a heading line, three steps, and how the regular search differs. */
.wz-jsearch__tiphead { display: block; margin-bottom: 4px; }
.wz-jsearch__steps { display: grid; gap: 4px; margin: 0 0 8px; padding-left: 20px; }
.wz-jsearch__tipnote { margin: 0; padding-top: 8px; border-top: 1px solid var(--line); }

/* One bar: the job | a country | an experience level | Search, each a part every search needs. A
   field's corners (--r-md), the button square inside it, and a border that reads at a glance. */
.wz-jsearch__bar {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(160px, .85fr) auto;   /* "Experience level" never clipped */
  padding: 5px; border: 2px solid var(--line-control); border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.wz-jsearch__bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.wz-jsearch__bar.has-missing { border-color: var(--bad-ink); }
.wz-jsearch__q, .wz-jsearch__level { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 12px; }
.wz-jsearch__q { cursor: text; }
.wz-jsearch__q .wz-icon, .wz-jsearch__level .wz-icon { flex: none; color: var(--sub); }
.wz-jsearch__input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; outline: 0;
  background: transparent; color: var(--ink); font-size: var(--fs-lead);
}
.wz-jsearch__input::placeholder { color: var(--muted); }
.wz-jsearch__place, .wz-jsearch__level { border-left: 1.5px solid var(--line-strong); }
.wz-jsearch__place { min-width: 0; }
.wz-jsearch__place .wz-input,
.wz-jsearch__place .wz-input:hover,
.wz-jsearch__place .wz-input:focus,
.wz-jsearch__level .wz-select,
.wz-jsearch__level .wz-select:hover,
.wz-jsearch__level .wz-select:focus { border-color: transparent; box-shadow: none; background-color: transparent; }
.wz-jsearch__place .wz-input { font-size: var(--fs-lead); }
.wz-jsearch__level .wz-select { flex: 1; min-width: 0; padding-left: 0; font-size: var(--fs-lead); cursor: pointer; }
.wz-jsearch__go { margin-left: 5px; }
/* A part the server said is missing: a red rule under it, and the line below the bar says what. */
.wz-jsearch__bar .is-missing { box-shadow: inset 0 -2px 0 var(--bad-ink); }
.wz-jsearch__need {
  display: flex; align-items: center; gap: 6px; margin: 0;
  color: var(--bad-ink); font-size: var(--fs-sm); font-weight: 700;
}
.wz-jsearch__need[hidden] { display: none; }

/* The results, and the filters in a column to their right. */
.wz-jsearch__body { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 20px; align-items: start; }
.wz-jsearch__main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wz-jsearch__aside { position: sticky; top: 80px; }   /* below the sticky top bar (64px), as .wz-sticky */
.wz-jsearch__side { display: flex; flex-direction: column; padding: var(--card-pad); }
.wz-jsearch__sidebody { display: flex; flex-direction: column; gap: 14px; }
.wz-jsearch__sidehead { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.wz-jsearch__sidetitle { margin: 0; color: var(--ink); font-size: var(--fs-md); font-weight: 800; letter-spacing: .02em; }
.wz-jsearch__field { display: flex; flex-direction: column; gap: 6px; }
.wz-jsearch__label { color: var(--ink); font-size: var(--fs-sm); font-weight: 700; }
.wz-jsearch__field .wz-select { border-color: var(--line-control); }
.wz-jsearch__checks { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.wz-jsearch__toggle { display: none; }

.wz-jsearch__head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.wz-jsearch__read { flex: 1 1 320px; margin: 0; color: var(--ink); }
.wz-jsearch__sort { color: var(--ink); font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
.wz-jsearch__pager { justify-content: center; align-items: center; }

/* The opening lines a search card carries, shown in the drawer while the description loads. */
.wz-jpreview { margin: 0; color: var(--ink); line-height: 1.6; }

/* Narrower: the filters fold behind a button above the results. */
@media (max-width: 1023px) {
  .wz-jsearch__body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wz-jsearch__aside { position: static; order: -1; }
  .wz-jsearch__toggle { display: inline-flex; align-self: flex-start; }
  .wz-jsearch__side.is-open .wz-jsearch__toggle { margin-bottom: 14px; }
  .wz-jsearch__side:not(.is-open) { padding: 0; border: 0; background: transparent; box-shadow: none; }
  .wz-jsearch__side:not(.is-open) .wz-jsearch__sidebody { display: none; }
}

/* A phone: the bar's parts stack, each on its own line. */
@media (max-width: 720px) {
  .wz-jsearch__bar { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .wz-jsearch__q, .wz-jsearch__level { padding: 0 14px; }
  .wz-jsearch__place, .wz-jsearch__level { border-left: 0; border-top: 1.5px solid var(--line-strong); }
  .wz-jsearch__go { margin: 6px; }
}
