/* ═══════════════════════════════════════════════════════════════════════════
   COUNTER — счётчик
   Акцент: #f59e0b (amber)

   gh-1: − цифра + кнопки в одну строку, компактно.
   gh-2: кнопки круглые по краям, цифра крупная по центру.
   gh-3/4: кнопки огромные, цифра гигантская, бар снизу.
   ═══════════════════════════════════════════════════════════════════════════ */

.t-counter-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.t-counter-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 0;
}

.t-counter-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-family: inherit;
  transition: all .12s;
}
.t-counter-btn:hover {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245,158,11,.08);
  transform: scale(1.05);
}
.t-counter-btn:active { transform: scale(.95); }

.t-counter-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.t-counter-val {
  font-size: 42px;
  font-weight: 700;
  font-family: var(--mono);
  color: #f59e0b;
  line-height: 1;
  white-space: nowrap;
}
.t-counter-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
}

/* Прогресс-бар (если есть макс) */
.t-counter-bar-row {
  flex-shrink: 0;
  height: 5px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}
.t-counter-bar-fill {
  height: 100%;
  background: #f59e0b;
  border-radius: 99px;
  transition: width .35s cubic-bezier(.4,0,.2,1);
}

/* ── gh-1: компактная строка ── */
@container metric (max-height: 119px) {
  .t-metric-body    { padding: 0 8px 8px; }
  .t-counter-main   { gap: 6px; }
  .t-counter-btn    { width: 28px; height: 28px; font-size: 16px; border-width: 1.5px; }
  .t-counter-val    { font-size: 26px; }
  .t-counter-sub    { display: none; }
  .t-counter-bar-row { height: 3px; }
}

/* ── gh-2: стандарт ── */
@container metric (min-height: 120px) and (max-height: 239px) {
  .t-counter-btn  { width: 36px; height: 36px; font-size: 20px; }
  .t-counter-val  { font-size: 38px; }
}

/* ── gh-3/4: всё крупно ── */
@container metric (min-height: 360px) {
  .t-counter-btn  { width: 60px; height: 60px; font-size: 30px; border-width: 2.5px; }
  .t-counter-val  { font-size: 72px; }
  .t-counter-sub  { font-size: 14px; }
  .t-counter-bar-row { height: 8px; }
}

/* ── gw-2/3: больше места — кнопки крупнее ── */
@container metric (min-width: 260px) {
  .t-counter-btn { width: 48px; height: 48px; font-size: 26px; }
  .t-counter-val { font-size: 52px; }
}
