/* מי תוקף, מה נפגע, ואיפה — MODULE sv-strip.css: the weekly time strip and its brush (#sv-strip).
   Uses the core tokens of .sv (sv-viz.css). The plot is 44 + 16 px on desktop and 34 + 14 px on phones (heights are
   set by sv-strip.js); the brush handles are 24 px wide, 44 px on touch. No dashed lines; no accent inside the plot. */

.sv-strip { position: relative; font-family: var(--sans); padding: .2rem 0 .5rem; }
.sv-strip:empty { display: none; }

/* head: the readout (start, right) and the key (end, left) */
.sv-strip-head { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem 1rem; min-height: 22px; margin-bottom: .2rem; }
.sv-strip-out { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.35; }
.sv-strip-out .sv-num { font-weight: 700; color: var(--ink); }
.sv-strip-key { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .1rem .7rem; margin-inline-start: auto; font-size: 12px; color: var(--muted-text); line-height: 1.3; }
.sv-strip-key > span { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.sv-strip-key > span:first-child { font-weight: 700; }
.sv-strip-key .sw { display: inline-block; flex: none; }
.sv-strip-key .sw.bar { width: 6px; height: 11px; }
.sv-strip-key .sw.bead { width: 6px; height: 6px; border-radius: 50%; }

/* caption row under the plot: the month-only note (start) and the hint, or in its place the reset (end) */
.sv-strip-cap { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem 1rem; min-height: 18px; margin: .1rem 0 0; font-size: 12px; color: var(--muted-text); line-height: 1.35; }
.sv-strip-mo:empty { display: none; }
.sv-strip-cend { margin-inline-start: auto; display: inline-flex; align-items: center; }
.sv-strip-hint[hidden], .sv-strip-reset[hidden] { display: none; }
/* the reset is set like the hint it replaces (no layout shift); its hit area is enlarged by a transparent pad */
.sv-strip-reset { position: relative; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; font-family: var(--sans); font-size: 12.5px; font-weight: 700;
  line-height: 1.35; color: var(--ink); white-space: nowrap; }
.sv-strip-reset::before { content: ""; position: absolute; inset: -6px -8px; }
.sv-strip-reset:hover { text-decoration: underline; text-underline-offset: 2px; }
.sv-strip-reset:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

/* the plot: a left-to-right island (oldest week on the left) */
.sv-strip-plot { position: relative; height: 60px; direction: ltr; touch-action: pan-y; cursor: crosshair; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.sv-strip-svg { position: absolute; top: 0; left: 0; display: block; overflow: visible; }
.sv-strip-mlab text { font-family: var(--sans); fill: var(--muted-text); }
.sv-strip-mlab text.yr { font-weight: 700; fill: var(--ink-soft); }

/* harvest-band labels: buttons in the axis row that select the season */
.sv-strip-bands { position: absolute; inset: 0; pointer-events: none; }
.sv-strip-band { position: absolute; pointer-events: auto; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; border: 0; background: none;
  font-family: var(--sans); font-weight: 700; color: var(--ink-soft); line-height: 1; white-space: nowrap; cursor: pointer; border-radius: 2px; }
.sv-strip-band:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.sv-strip-band.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

/* brush handles: wide transparent hit areas centred on the edge (24 px; 44 px on touch), with a small grip that hangs
   OUTSIDE the brushed period so it never covers the selected weeks; keyboard sliders */
.sv-strip-h { position: absolute; top: 0; width: 24px; height: 44px; margin-left: -12px; pointer-events: none; outline: none; z-index: 2; }
.sv-strip-h::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 18px; box-sizing: border-box;
  background: linear-gradient(to right, transparent 2px, var(--muted) 2px, var(--muted) 3px, transparent 3px, transparent 4px, var(--muted) 4px, var(--muted) 5px, transparent 5px) #fff;
  border: 1px solid var(--ink); border-radius: 3px; }
.sv-strip-h[data-edge="l"]::after { transform: translate(calc(-100% + 1px), -50%); }
.sv-strip-h[data-edge="r"]::after { transform: translate(-1px, -50%); }
.sv-strip-h.idle::after { border-color: var(--muted); }
.sv-strip-h:focus-visible::after { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); border-color: var(--ink); }

/* the per-week tooltip uses the shared .sv-tip; the week's dates sit after the value */
.sv-strip .sv-tip { max-width: 17rem; }
.sv-strip-wk { font-weight: 400; font-size: 13px; color: var(--ink-soft); }
.sv-strip-act { margin-top: .15rem; }

@media (max-width: 767px) {
  .sv-strip { padding-bottom: .4rem; }
  .sv-strip-plot { height: 48px; }
  .sv-strip-head { gap: .1rem .7rem; }
  .sv-strip-out { font-size: 12.5px; }
  .sv-strip-key { font-size: 11.5px; gap: .05rem .55rem; margin-inline-start: 0; }
  .sv-strip-key > span:first-child, .sv-strip-key .per { display: none; }
  /* the note always takes its own line, so the hint and the reset that replaces it share the next one (no shift) */
  .sv-strip-cap { font-size: 11.5px; }
  .sv-strip-mo { flex-basis: 100%; }
}
@media (pointer: coarse) {
  .sv-strip-h::after { width: 10px; height: 22px; }
  .sv-strip-reset::before { inset: -14px -10px; }
}
@media (forced-colors: active) { .sv-strip-svg { forced-color-adjust: none; } }
@media print { .sv-strip-h, .sv-strip-hint, .sv-strip-reset { display: none; } }
/* phones: the season buttons keep their 13 px look but get a 44 px hit area (PLAN §3.3) */
@media (max-width: 767px) { .sv-strip-band::before { content: ''; position: absolute; inset: -3px -2px -28px; } }
