/* Mașiniștii – calculatorul de putere (#standPutere). Se bazează pe variabilele din style.css. */
.stand { position: relative; color: var(--text, #1c2130); }
.stand [hidden] { display: none !important; }
.stand-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* selecturile: 2×2 pe telefon, pe un rând pe ecran mare */
.stand-sel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.stand-camp { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; }
.stand-camp-et { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--navy, #21273a); }
.stand-camp select {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-width: 0; margin: 0;
  font: inherit; font-size: 16px; line-height: 1.25; /* 16px: iOS nu mai face zoom la atingere */
  padding: 11px 34px 11px 12px;
  color: var(--text, #1c2130);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%2321273a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 14px 9px;
  border: 2px solid #cfd4dc; border-radius: 10px;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.stand-camp select:hover:not(:disabled) { border-color: var(--navy, #21273a); }
.stand-camp select:focus { outline: none; border-color: var(--yellow-2, #d9a300); box-shadow: 0 0 0 3px rgba(242, 183, 5, .45); }
.stand-camp select:disabled { background-color: #eceef2; color: #8a92a3; cursor: not-allowed; opacity: 1; }

/* exemple rapide la 1 click */
.stand-exemple { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; }
.stand-ex-et { font-size: .8rem; font-weight: 700; color: var(--muted, #5b6475); }
.stand-ex-lista { display: flex; flex-wrap: wrap; gap: 6px; }
.stand-ex {
  padding: 6px 11px; border-radius: 999px;
  border: 1.5px solid #cfd4dc; background: #fff; color: var(--navy, #21273a);
  font: inherit; font-size: .82rem; font-weight: 700; line-height: 1.2;
  cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease, transform .08s ease;
}
.stand-ex:hover:not(:disabled) { border-color: var(--navy, #21273a); background: #eef1f6; }
.stand-ex:active:not(:disabled) { transform: translateY(1px); }
.stand-ex:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(242, 183, 5, .55); }
.stand-ex:disabled { opacity: .55; cursor: default; }
.stand-ex--activ, .stand-ex--activ:hover:not(:disabled) {
  background: var(--navy, #21273a); border-color: var(--navy, #21273a); color: var(--yellow, #f2b705);
}

.stand-eroare { margin: 14px 0 0; padding: 12px 14px; background: #fff6d6; border-left: 4px solid var(--yellow, #f2b705); border-radius: 8px; font-weight: 600; }

/* starea inițială compactă */
.stand-gol {
  margin-top: 14px; padding: 18px 16px; border-radius: 12px;
  background: linear-gradient(145deg, #21273a, #171c2b);
  color: #e8ecf4; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 4px 16px rgba(16, 20, 32, .16);
}
.stand-gol-ico { flex: none; display: grid; place-items: center; width: 56px; height: 42px; }
.stand-gol-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stand-gol-txt strong { font-size: 1rem; color: #fff; line-height: 1.25; }
.stand-gol-txt span { font-size: .9rem; color: #b9c3d6; line-height: 1.35; }

/* antetul mașinii alese + comutatorul Original ↔ Stage 1 */
.stand-cap {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--light, #e3e6e9);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
}
.stand-titlu { min-width: 0; }
.stand-titlu h3 { margin: 0; font-size: clamp(1.12rem, 3.2vw, 1.4rem); color: var(--navy, #21273a); line-height: 1.2; }
.stand-subtitlu { margin: 2px 0 0; color: var(--muted, #5b6475); font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.stand-ecu {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #eef1f6; border: 1px solid #d4dae3; color: var(--navy, #21273a);
  font-size: .78rem; font-weight: 700; line-height: 1.25; letter-spacing: .01em;
}

.stand-mod {
  display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; border-radius: 999px; background: var(--navy, #21273a);
  box-shadow: 0 3px 10px rgba(16, 20, 32, .18);
  flex: 1 1 220px; max-width: 280px;
}
.stand-mod-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 0; border-radius: 999px; padding: 9px 14px; min-height: 38px;
  background: transparent; color: #c7d0e0; font: inherit; font-size: .9rem; font-weight: 800;
  cursor: pointer; white-space: nowrap;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.stand-mod-btn .stand-fulger { color: var(--yellow, #f2b705); flex: none; }
.stand-mod-btn--activ .stand-fulger { color: var(--navy, #21273a); }
.stand-mod-btn:hover:not(.stand-mod-btn--activ) { color: #fff; background: rgba(255, 255, 255, .08); }
.stand-mod-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(242, 183, 5, .6); }
.stand-mod-btn--activ {
  background: var(--yellow, #f2b705); color: var(--navy, #21273a);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
}
.stand--mod-serie .stand-mod-btn--activ { background: #fff; color: var(--navy, #21273a); }

/* notă sinceră pentru motoarele aspirate */
.stand-aspirat {
  margin: 12px 0 0; padding: 10px 13px; border-radius: 10px;
  background: #fff8df; border: 1px solid #f0d780; border-left: 4px solid var(--yellow-2, #d9a300);
  font-size: .88rem; line-height: 1.45; color: #3a3216;
}

/* zona principală (cadrane + grafic) */
.stand-vizual { position: relative; display: grid; gap: 16px; margin-top: 14px; }

/* coloana stângă: bordul cu cadrane + tabel compact */
.stand-bord { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.stand-ceasuri {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  padding: 12px 10px 14px; border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 0%, #2a324b 0%, #1c2234 55%, #151a28 100%);
  box-shadow: 0 8px 24px rgba(16, 20, 32, .22);
}
.stand-ceas { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.stand-ceas svg { display: block; width: 100%; max-width: 215px; height: auto; overflow: visible; font-family: inherit; }
.stand-ceas-val { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stand-ceas-insigna {
  margin-top: -6px; padding: 4px 10px; border-radius: 999px;
  font-size: clamp(.74rem, 2.9vw, .86rem); font-weight: 900; font-variant-numeric: tabular-nums;
  white-space: nowrap; line-height: 1.2;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.stand-ceas-cp .stand-ceas-insigna { background: var(--yellow, #f2b705); color: var(--navy, #21273a); }
.stand-ceas-nm .stand-ceas-insigna { background: #59b2ff; color: #122138; }
.stand-ceas .stand-ceas-insigna--serie {
  background: rgba(255, 255, 255, .10); color: #c7d0e0;
}

.stand-tabel {
  width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .86); border: 1px solid var(--light, #e3e6e9); border-radius: 12px; overflow: hidden;
}
.stand-tabel caption {
  text-align: left; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted, #5b6475); padding: 8px 10px 4px; background: rgba(255, 255, 255, .86);
}
.stand-tabel th, .stand-tabel td { padding: 7px 9px; text-align: right; border-top: 1px solid var(--light, #e3e6e9); }
.stand-tabel th:first-child { text-align: left; }
.stand-tabel thead th { font-size: .76rem; color: var(--muted, #5b6475); font-weight: 700; border-top: 0; padding-top: 2px; }
.stand-tabel tbody th { font-weight: 700; color: var(--navy, #21273a); }
.stand-tabel td:nth-child(2) { color: var(--muted, #5b6475); }
.stand-tabel td:nth-child(3) { font-weight: 800; color: var(--navy, #21273a); }
.stand-tabel td:last-child { font-weight: 800; color: #8a6200; white-space: nowrap; }

/* coloana dreaptă: filtru + grafic + legendă + slider turație */
.stand-grafic-box {
  min-width: 0; background: rgba(255, 255, 255, .72); border: 1px solid var(--light, #e3e6e9);
  border-radius: 14px; padding: 12px;
}
.stand-graf-cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.stand-filtre { display: inline-flex; gap: 4px; background: #e8ebf0; padding: 3px; border-radius: 999px; }
.stand-filtru {
  border: 0; border-radius: 999px; padding: 6px 11px; background: transparent;
  color: var(--muted, #5b6475); font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.stand-filtru:hover:not(.stand-filtru--activ) { color: var(--navy, #21273a); }
.stand-filtru:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(242, 183, 5, .55); }
.stand-filtru--activ { background: #fff; color: var(--navy, #21273a); box-shadow: 0 1px 4px rgba(16, 20, 32, .12); }
.stand-graf-indiciu { font-size: .78rem; font-weight: 600; color: var(--muted, #5b6475); }

.stand-grafic {
  position: relative; isolation: isolate; touch-action: pan-y; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent; border-radius: 10px; cursor: ew-resize;
}
.stand-grafic::before {
  content: ""; position: absolute; inset: 12px 36px 24px; z-index: -1; pointer-events: none;
  background: url(img/logo-filigran.png) no-repeat center / min(230px, 56%) auto;
  opacity: .09;
}
.stand-grafic:focus { outline: none; }
.stand-grafic:focus-visible { box-shadow: 0 0 0 3px rgba(242, 183, 5, .55); }
.stand-grafic svg { display: block; width: 100%; height: auto; overflow: visible; font-family: inherit; }

.stand-curbe-tunat { transition: opacity .26s ease; }
.stand--mod-serie .stand-curbe-tunat { opacity: .12; }
.stand--mod-serie .stand-curbe-serie path { stroke-dasharray: none; stroke-width: 2.8; }

.stand-tt {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; gap: 1px;
  padding: 7px 10px; border-radius: 8px;
  background: rgba(23, 28, 43, .95); color: #fff;
  font-size: 12px; line-height: 1.38; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(16, 20, 32, .28);
}
.stand-tt b { color: var(--yellow, #f2b705); font-size: 12.5px; }
.stand-tt strong { color: #fff; }
.stand-tt i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.stand-tt-cp { background: #f2b705; }
.stand-tt-nm { background: #59b2ff; }

.stand-legenda { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: var(--muted, #5b6475); }
.stand-legenda li { display: inline-flex; align-items: center; gap: 6px; }
.stand-legenda i { display: inline-block; width: 20px; height: 0; border-top: 3px solid; }
.stand-leg-cp-serie i { border-top: 2px dashed #9aa3b2; }
.stand-leg-nm-serie i { border-top: 2px dashed #8592a6; }
.stand-leg-cp-tunat i { border-color: #d99b00; }
.stand-leg-nm-tunat i { border-color: #26539c; }

/* exploratorul de turație pe situații reale de condus */
.stand-turatie {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--light, #e3e6e9);
  display: flex; flex-direction: column; gap: 10px;
}
.stand-tur-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.stand-tur-rpm { font-size: .92rem; color: var(--navy, #21273a); font-variant-numeric: tabular-nums; }
.stand-tur-rpm strong { font-weight: 900; }
.stand-tur-scen { color: var(--muted, #5b6475); font-weight: 700; }
.stand-tur-valori { display: flex; flex-wrap: wrap; gap: 6px; font-variant-numeric: tabular-nums; }
.stand-tur-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 8px; background: #f1f3f7;
  font-size: .82rem; color: var(--text, #1c2130); line-height: 1.25;
}
.stand-tur-pill i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.stand-tur-pill-cp i { background: #d99b00; }
.stand-tur-pill-nm i { background: #26539c; }
.stand-tur-pill strong { color: var(--navy, #21273a); font-weight: 800; }
.stand-tur-pill em {
  font-style: normal; font-weight: 900; font-size: .78rem;
  padding: 1px 6px; border-radius: 999px;
}
.stand-tur-pill-cp em { background: #fff0b8; color: #7a5600; }
.stand-tur-pill-nm em { background: #dcebff; color: #193c78; }
.stand-tur-muted { color: var(--muted, #5b6475); font-size: .78rem; }

.stand-slider-wrap { display: flex; flex-direction: column; gap: 2px; }
.stand-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0;
  background: transparent; cursor: pointer;
}
.stand-slider:focus { outline: none; }
.stand-slider::-webkit-slider-runnable-track {
  height: 7px; border-radius: 999px;
  background: linear-gradient(90deg, #cfd6e2 0%, #f2b705 70%, #e4572e 100%);
}
.stand-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; margin-top: -8.5px; border-radius: 50%;
  background: var(--navy, #21273a); border: 3px solid var(--yellow, #f2b705);
  box-shadow: 0 2px 6px rgba(16, 20, 32, .32);
  transition: transform .1s ease;
}
.stand-slider::-webkit-slider-thumb:active { transform: scale(1.1); }
.stand-slider::-moz-range-track {
  height: 7px; border-radius: 999px;
  background: linear-gradient(90deg, #cfd6e2 0%, #f2b705 70%, #e4572e 100%);
}
.stand-slider::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; box-sizing: border-box;
  background: var(--navy, #21273a); border: 3px solid var(--yellow, #f2b705);
  box-shadow: 0 2px 6px rgba(16, 20, 32, .32);
}
.stand-slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(242, 183, 5, .45); }
.stand-slider:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(242, 183, 5, .45); }
.stand-slider-capete {
  display: flex; justify-content: space-between; font-size: .74rem; font-weight: 700;
  color: var(--muted, #5b6475); font-variant-numeric: tabular-nums;
}

.stand-repere { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stand-reper {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 7px 6px; border-radius: 10px;
  border: 1.5px solid #d4dae3; background: #fff; color: var(--navy, #21273a);
  font: inherit; text-align: center; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.stand-reper strong { font-size: .8rem; font-weight: 800; line-height: 1.15; }
.stand-reper small { font-size: .72rem; font-weight: 700; color: var(--muted, #5b6475); font-variant-numeric: tabular-nums; }
.stand-reper:hover:not(.stand-reper--activ) { border-color: var(--navy, #21273a); background: #f3f5f9; }
.stand-reper:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(242, 183, 5, .55); }
.stand-reper--activ { background: var(--navy, #21273a); border-color: var(--navy, #21273a); color: #fff; }
.stand-reper--activ small { color: var(--yellow, #f2b705); }

.stand-nota { margin: 12px 0 0; font-size: .84rem; color: var(--muted, #5b6475); }

/* ecran mare: selecturile pe un rând, cadranele lângă grafic */
@media (min-width: 900px) {
  .stand-sel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stand-cap { flex-wrap: nowrap; }
  .stand-mod { flex: none; width: 248px; }
  .stand-vizual { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
}

@media (max-width: 480px) {
  .stand-ceasuri { padding: 10px 6px 12px; gap: 4px; }
  .stand-grafic-box { padding: 10px 8px; }
  .stand-graf-indiciu { display: none; }
  .stand-mod { max-width: none; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .stand-camp select, .stand-ex, .stand-mod-btn, .stand-ceas-insigna,
  .stand-filtru, .stand-curbe-tunat, .stand-reper, .stand-slider::-webkit-slider-thumb { transition: none; }
}
