/* ══════════════════════════════════════════════════════════════════════════
   .ynav* — the unified year-filter control shared by model.php and maker.php:
   one compact trigger button showing the active scope; open state offers
   "כל השנים", a custom-range section (two <select>s + a compact apply +
   inline validation), then every individual year newest-first.

   Canonical, single visual implementation. Previously duplicated: model.php
   carried its own copy inline (its <style> block isn't a shared file) and
   maker.css carried a second, page-scoped copy under the --cl2-* token
   namespace. Both are now this one file; each page keeps ONLY what is
   genuinely page-specific:
     - the trigger label's element id (#yearNavBtnText on model.php,
       #ypTriggerLabel on maker.php) — inherently page-specific, stays local;
     - maker.php's inline range-validity hint/error text (.yp-range-hint /
       .yp-range-error) — model.php's range applies via full navigation
       instead of in-page validation, so it has no equivalent;
     - maker.php's extra :focus-visible rules on the range selects/apply/item
       and its mobile RTL panel-position flip — real, intentional behavior
       differences from the model page, not duplication, so they are not
       backported here or removed there.
   Values use the plain design tokens (--border/--text/--accent/...,
   assets/carlab-analytics-shell.css) rather than the --cl2-* namespace
   (assets/ui-v2/tokens.css) — both are loaded on every page these are used
   on and are byte-identical in value, so this is a naming choice only, not a
   behavior change. One 0.5px drift found while consolidating (the trigger's
   desktop font-size: model.php had 13px, maker.css's ported copy had
   var(--cl2-fs-sm) = 12.5px) is resolved to model.php's original 13px, the
   value that predates the port — this file is that ONE literal value both
   pages now share, rather than either page carrying its own accidental copy.
   ══════════════════════════════════════════════════════════════════════════ */

.ynav {
  position: relative;
  display: inline-block;
}

.ynav-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 118px;
  justify-content: space-between;
}

.ynav-btn:hover {
  border-color: var(--accent);
}

.ynav-btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.ynav-cev {
  flex: 0 0 auto;
  color: var(--text-dim);
  transition: transform .15s;
}

.ynav-btn[aria-expanded="true"] .ynav-cev {
  transform: rotate(180deg);
}

.ynav-panel {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 60;
  width: 250px;
  max-height: 344px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(20, 20, 15, .14);
  padding: 5px;
}

.ynav-panel[hidden] {
  display: none;
}

.ynav-range {
  padding: 6px 8px 2px;
}

.ynav-range-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ynav-range-row select {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.ynav-range-mid {
  font-size: 11px;
  color: var(--text-dim);
  flex: 0 0 auto;
}

.ynav-range-go {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
}

.ynav-range-go:hover {
  filter: brightness(.95);
}

.ynav-reset {
  display: block;
  width: 100%;
  text-align: start;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 10px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 7px;
}

.ynav-reset:hover {
  background: var(--surface);
}

.ynav-reset.on {
  color: var(--accent);
  background: var(--accent-dim);
}

.ynav-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

.ynav-item {
  display: block;
  width: 100%;
  text-align: start;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 7px;
}

.ynav-item:hover {
  background: var(--surface);
}

.ynav-item.on {
  background: var(--accent-dim);
  color: var(--accent);
}

@media (max-width: 560px) {
  .ynav-btn {
    min-width: 0;
    padding: 8px 9px;
    font-size: 12.5px;
  }
}
