/* explained.css — /workouts/explained/ (19 okt '26): klikbare oefeningkaarten, de filterbalk (#ex-filter) en de popup per oefening
   (#ex-pop). De slider in de popup hergebruikt de klassen van de race-uitlegslider uit race.css (.tc-race-track, .tc-race-item,
   .tc-race-card, .tc-race-nav); deze regels passen ze aan (geen run-labels, geen lijn). Alleen op deze pagina geladen, na race.css.
   Geen hover-lift; animaties en smooth scroll uit bij prefers-reduced-motion. Handgeschreven, geen build. */

/* kaarten: de hele kaart opent de popup (de link in de kop rekt over de kaart; links erin blijven klikbaar) */
.wx-ex { position: relative; transition: border-color 0.15s ease; }
.wx-ex[hidden] { display: none; }
.wx-ex h3 a.wx-ex-link { color: inherit; text-decoration: none; }
.wx-ex-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.wx-ex-link:focus-visible { outline: none; }
.wx-ex:hover, .wx-ex:focus-within { border-color: rgba(var(--accent-rgb), 0.6); }
.wx-ex .wx-eg a, .wx-ex .mm-mus { position: relative; z-index: 1; }

/* filterbalk */
.exf { display: grid; gap: 8px; margin: 0 0 18px; padding: 14px; border-radius: var(--radius); background: var(--card-flat); border: 1px solid var(--line); }
.exf-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.exf-search { position: relative; flex: 1 1 220px; min-width: 0; }
.exf-search svg { position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.exf-search input { width: 100%; height: 40px; margin: 0; padding: 0 14px 0 38px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: #fff; font: inherit; font-size: 0.9rem; -webkit-appearance: none; appearance: none; }
.exf-search input:focus { outline: none; border-color: rgba(var(--accent-rgb), 0.6); }
.exf-search input::placeholder { color: var(--muted); opacity: 1; }
.exf-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.exf .wo-pop-h { margin: 4px 0 0; }
.exf .wo-n { margin-left: auto; }
.exf .wo-empty { margin: 4px 0 0; font-size: 0.9rem; }
.exf .wo-empty[hidden] { display: none; }

/* popup: telefoon = volledig scherm, laptop = groot paneel in het midden */
html.exp-open, html.exp-open body { overflow: hidden; }
.exp { position: fixed; inset: 0; z-index: 1000000; display: flex; align-items: flex-start; justify-content: center; padding: clamp(16px, 4vw, 48px) 16px; overflow-y: auto; background: rgba(0, 0, 0, 0.82); animation: expFade 0.2s ease-out both; }
.exp[hidden] { display: none; }
.exp-panel { width: min(960px, 100%); min-width: 0; margin: auto 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; color: #fff; animation: expIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.exp-head { display: flex; align-items: flex-start; gap: 14px; padding: clamp(18px, 3vw, 26px) clamp(18px, 3vw, 28px) 12px; }
.exp-ic { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: rgba(var(--accent-rgb), 0.12); color: var(--accent); }
.exp-ic svg { width: 40px; height: 40px; }
.exp-head-t { flex: 1 1 auto; min-width: 0; }
.exp-head h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.2rem); font-style: italic; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.exp-races { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; }
.exp-races small { margin-right: 4px; color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.exp-race { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: #fff; font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.exp-race img { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; }
.exp-race:hover, .exp-race:focus-visible { border-color: rgba(var(--accent-rgb), 0.6); }
.exp-x { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; cursor: pointer; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.55); background: rgba(0, 0, 0, 0.25); color: #fff; transition: border-color 0.2s ease, background 0.2s ease; }
.exp-x:hover, .exp-x:focus-visible { border-color: #fff; background: rgba(255, 255, 255, 0.1); outline: none; }
.exp-x svg { width: 18px; height: 18px; }

/* slider: dezelfde klassen als de race-uitleg, zonder run-labels en verbindingslijn */
.exp-slider { padding-top: 4px; }
.exp .tc-race-track { --gap: 14px; --pad: clamp(18px, 3vw, 28px); padding: 0 var(--pad) 4px; scroll-padding-inline: var(--pad); cursor: default; }
.exp .tc-race-item { flex: 0 0 clamp(240px, 46vw, 340px); padding-top: 0; }
.exp .tc-race-item::before, .exp .tc-race-item::after { display: none; }
.exp .tc-race-card { cursor: default; margin: 0; }
.exp .tc-race-card::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.6) 100%); }
.exp .exp-img img { object-position: 50% 50%; }
.exp .exp-ic-card, .exp .exp-mm { display: grid; place-items: center; }
.exp .exp-ic-card { color: var(--accent); }
.exp .exp-ic-card svg { width: 58%; height: 58%; }
.exp .exp-ic-card .tc-race-title { color: #fff; }
.exp .exp-mm svg { width: 100%; height: 92%; } /* viewBox past zich aan (meet): het figuur staat in het midden */
.exp .tc-race-title { font-size: 1.1rem; left: 14px; right: 14px; bottom: 12px; }
.exp .tc-race-nav { margin-top: 12px; }
.exp .tc-race-nav[hidden] { display: none; }

/* tekst, spieren, workouts */
.exp-body { padding: 14px clamp(18px, 3vw, 28px) clamp(18px, 3vw, 28px); }
.exp-how { margin: 0 0 12px; color: var(--muted); font-size: 0.98rem; line-height: 1.6; }
.exp-mus .mm-mus { margin: 0 0 10px; }
.exp-body .mm-legend { margin-bottom: 6px; }
.exp-h { margin: 20px 0 8px; font-size: 1.05rem; }
.exp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 6px; }
.exp-list a { display: block; min-width: 0; height: 100%; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: #fff; text-decoration: none; }
.exp-list a:hover, .exp-list a:focus-visible { border-color: rgba(var(--accent-rgb), 0.6); }
.exp-list b { display: block; font-size: 0.9rem; line-height: 1.25; }
.exp-list small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.76rem; }
.exp-more { margin: 10px 0 0; font-size: 0.88rem; }
.exp-more a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; }
.exp-more svg { width: 16px; height: 16px; }
.exp.is-out { pointer-events: none; animation: expFadeOut 0.18s ease-in forwards; }
@keyframes expFade { from { opacity: 0; } }
@keyframes expFadeOut { to { opacity: 0; } }
@keyframes expIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@media (max-width: 680px) {
  .exp { padding: 0; }
  .exp-panel { width: 100%; min-height: 100%; margin: 0; border: 0; border-radius: 0; }
  .exp-head { padding-top: 16px; }
  .exp .tc-race-item { flex-basis: min(78vw, 340px); }
}
@media (prefers-reduced-motion: reduce) { .exp, .exp-panel, .exp.is-out { animation: none !important; } .wx-ex, .exp-x { transition: none; } }
