/* Test dei 5 km nella pagina «Soglie e zone» e pagina «Massimali» (js/zones.js).
   Solo token di colore: chiaro e scuro vanno da soli. */

/* FC soglia sotto i riquadri delle soglie (js/panels.js) */
.st-lthr { margin-top: 8px; }
.st-lthr input { width: 3.2em; }

/* ---------- test dei 5 km: una riga che si apre sul posto ---------- */
.z5 { max-width: 520px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.z5-h {
  display: flex; align-items: center; gap: 11px; min-height: 50px; padding: 6px 12px;
  border-radius: 11px; cursor: pointer; list-style: none;
}
.z5-h::-webkit-details-marker { display: none; }
.z5-h:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.z5-h:active { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.z5-h .pr-t b { display: flex; align-items: center; flex-wrap: wrap; }
.z5[open] .z5-h .pr-ch svg { rotate: 90deg; }
.z5-b { padding: 2px 12px 12px; }
.z5-how { margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.qts.z5-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.z5-in .qt { background: var(--surface); }
.z5 .f-err { margin: 8px 0 0; }
.z5-res { margin-top: 12px; }
.z5-res:empty { display: none; }
/* VDOT, passo e FC soglia: due o tre numeri in fila */
.z5-sum {
  display: flex; gap: 1px; margin-bottom: 10px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: var(--line);
}
.z5-st { display: flex; flex: 1 1 0; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; background: var(--surface); }
.z5-st span {
  overflow: hidden; font: 600 11px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); white-space: nowrap; text-overflow: ellipsis;
}
.z5-st b { font: 700 24px/1.1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.z5-st b small { margin-left: 3px; font: 500 12px/1 var(--f-body); color: var(--muted); }
.z5-res .tbl-wrap { background: var(--surface); }
.z5-res .hint { margin-top: 6px; }
.z5-res .f-actions { margin-top: 10px; }
.z5-res .btn[disabled] { opacity: .55; cursor: default; }

/* tabelle delle zone di «Soglie e zone» (js/panels.js): una per sport, col suo titolo */
.zt-h { margin: 14px 0 6px; font: 700 13px/1.2 var(--f-body); }
.zt-h:first-child { margin-top: 4px; }
.zt-h small { margin-left: 4px; font-weight: 500; color: var(--muted); }

/* ---------- Massimali ---------- */
.mx-intro { margin: 12px 0 0; max-width: 560px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.mx-none { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.mx-none .btn { margin-left: 4px; vertical-align: middle; }
.mx-list[hidden], .mx-it[hidden] { display: none; }
/* ricerca tra i massimali */
.mx-search {
  display: flex; align-items: center; gap: 8px; max-width: 560px; height: 42px; margin-top: 12px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted);
}
.mx-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.mx-search svg { flex: none; width: 18px; height: 18px; }
.mx-search input {
  flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: 0; outline: none;
  background: transparent; color: var(--ink); font: 400 15px/1.2 var(--f-body);
}
.mx-search input::placeholder { color: var(--muted); }
.mx-list {
  display: flex; flex-direction: column; max-width: 560px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2);
}
.mx-it + .mx-it { border-top: 1px solid var(--line); }
.mx-row { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 6px 12px; cursor: pointer; list-style: none; }
.mx-row::-webkit-details-marker { display: none; }
.mx-row:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.mx-row:active { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.mx-t { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.mx-t b { overflow: hidden; font-size: 15px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.mx-t small { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.mx-t small span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mx-tag {
  flex: none; padding: 0 6px; border-radius: 5px; font: 700 10.5px/1.6 var(--f-body); font-style: normal;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent);
}
.mx-tag.is-mine { color: color-mix(in srgb, var(--strength) 80%, var(--ink)); background: color-mix(in srgb, var(--strength) 15%, transparent); }
.mx-kg { flex: none; font: 700 22px/1 var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mx-kg small { font: 500 12px/1 var(--f-body); color: var(--muted); }
.mx-it:not(.is-mine) .mx-kg { color: var(--muted); }
.mx-it[open] .pr-ch svg { rotate: 90deg; }
.mx-ed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 2px 12px 12px; }
.mx-note { margin: 0; padding: 0 12px 12px; font-size: 12.5px; color: var(--muted); }
/* kg da scrivere: il numero grande, l'unità accanto */
.mx-kgin {
  display: flex; align-items: baseline; gap: 6px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: text;
}
.mx-kgin:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.mx-kgin input {
  width: 4.2em; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink);
  font: 700 20px/1.2 var(--f-display); font-variant-numeric: tabular-nums;
}
.mx-kgin input:focus, .mx-kgin input:focus-visible { outline: none; }
.mx-kgin input::placeholder { color: color-mix(in srgb, var(--muted) 50%, transparent); }
.mx-kgin em { font-style: normal; font-size: 12.5px; color: var(--muted); }
/* esercizio nuovo */
.mx-add { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; max-width: 560px; }
#mxName {
  flex: 1 1 200px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--ink); font: 500 15px/1.3 var(--f-body);
}
#mxName:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.mx-add .mx-kgin { background: var(--surface-2); }

@media (max-width: 820px) {
  /* il nome su tutta la riga, sotto kg e «Aggiungi»; 16 px: il telefono non ingrandisce la pagina */
  #mxName { flex-basis: 100%; font-size: 16px; }
  .mx-search input { font-size: 16px; }
  .mx-add .mx-kgin { flex: 1 1 auto; }
  .mx-add .mx-kgin input { width: 100%; }
}
@media (max-width: 360px) {
  .z5-st { padding: 7px 8px; }
  .z5-st b { font-size: 21px; }
}

/* ---------- editor: la zona di passo di una fase di corsa (js/editor.js, 4/11/2026) ---------- */
.ed-step .es-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; }
.ed-step .es-zl { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; min-width: 0; }
.ed-step .es-zl span { font-size: 13px; font-weight: 700; color: var(--muted); }
.ed-step .es-zone select { flex: 1 1 auto; min-width: 0; width: auto; padding: 6px 8px; font-weight: 600; }
.ed-zn { margin: 2px 2px 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; } /* sotto le fasi, una volta sola */
/* con la zona le caselle del passo si leggono soltanto */
.ed-step .es-tgt.is-zone input { background: transparent; border-style: dashed; color: var(--ink); }
/* pagina dell'allenamento: il nome della zona sotto il passo */
.do-zn { font-size: 12.5px; font-weight: 600; color: var(--muted); }
