/* ФиброТест (FibroTest). Дополняет calc-phenoage.css + tool-hypertension.css. */

/* Поле на всю ширину сетки (для «Имя») */
.pa-field--wide { grid-column: 1 / -1; }

/* Таблицы (диапазоны стадий) — содержимое по центру колонок */
.ht-table th, .ht-table td { text-align: center; }

/* Число результата — как в других калькуляторах (не гигантские 152px) */
#ft-bigval { font-size: clamp(64px, 13vw, 104px); }

/* Подсказку опускаем ниже — чтобы не прилипала к полям ввода */
.pa-calc .ht-measure-tip { margin-top: 20px; }

/* ── Pill вердикта (плашка headline тёмная — берём светлые тона для контраста) ── */
.ft-pill { background: #eef1f6; color: var(--v2-ink-2); }
.ft-pill--green  { background: rgba(16, 185, 129, .20); color: #6ee7b7; }
.ft-pill--amber  { background: rgba(245, 158, 11, .20); color: #fcd34d; }
.ft-pill--orange { background: rgba(249, 115, 22, .22); color: #fdba74; }
.ft-pill--red    { background: rgba(239, 68, 68, .22);  color: #fca5a5; font-weight: 700; }

/* ── Три системы стадирования (чипы под пилюлей, на тёмной плашке) ── */
.ft-stages {
  position: relative;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-top: 14px;
}
.ft-chip {
  font-family: var(--v2-font); font-size: 11.5px; font-weight: 600;
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 5px 12px; border-radius: 99px; white-space: nowrap;
}

/* ── Шкала 0–1: зелёная → янтарная → оранжевая → красная ── */
.ft-scale { margin: 22px 0 26px; }
.ft-scale__track {
  position: relative;
  height: 14px; border-radius: 99px; overflow: visible;
  background: linear-gradient(90deg,
    #10b981 0%, #34d399 22%,
    #f59e0b 32%, #f59e0b 49%,
    #f97316 59%, #ef4444 73%, #b83a26 100%);
}
.ft-scale__marker {
  position: absolute; top: 50%; width: 4px; height: 26px;
  border-radius: 99px; background: #1f2430;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px var(--v2-surface, #fff);
  transition: left .9s cubic-bezier(.22,.61,.36,1);
}
.ft-scale__ticks {
  position: relative; height: 18px; margin-top: 6px;
  font-family: var(--v2-font); font-size: 11.5px; font-weight: 600; color: var(--v2-ink-3);
}
.ft-scale__ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ft-scale__ticks span:first-child { transform: none; left: 0; }
.ft-scale__ticks span:last-child { transform: none; right: 0; left: auto; }
.ft-scale__src { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--v2-ink-3); }

/* ── Предупреждение (холестаз/гемолиз) ── */
.ft-caveat {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 4px 0 8px; padding: 14px 18px;
  background: #fff7ed; border: 1px solid #fed7aa; border-left: 4px solid #ea580c;
  border-radius: 14px;
}
.ft-caveat .material-symbols-outlined { color: #ea580c; font-size: 22px; flex: 0 0 auto; }
.ft-caveat__text { margin: 0; font-size: 14px; line-height: 1.55; color: #9a3412; font-weight: 500; }

/* ── Выноска «простыми словами» ── */
.ft-plain {
  display: flex; gap: 14px; align-items: flex-start;
  margin: 18px 0 22px; padding: 16px 20px;
  border-radius: 14px;
  background: rgba(22, 200, 200, .07);
  border: 1px solid rgba(22, 200, 200, .25);
  border-left: 4px solid #16c8c8;
}
.ft-plain .material-symbols-outlined { color: #0ea5a5; font-size: 24px; flex: 0 0 auto; }
.ft-plain__title {
  font-family: var(--v2-font-display, 'Cabinet Grotesk', sans-serif);
  font-weight: 700; font-size: 14px; color: var(--v2-ink); margin-bottom: 4px;
}
.ft-plain__body { font-size: 14.5px; line-height: 1.6; color: var(--v2-ink-2); }
.ft-plain__body strong { color: var(--v2-ink); }

/* ── Заметное сообщение об ошибке ввода ── */
#ft-error-msg.is-visible {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fee2e2;
  border: 0; border-left: 4px solid #dc2626;
  color: #991b1b;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14.5px; font-weight: 600; line-height: 1.45;
  box-shadow: 0 6px 20px rgba(220, 38, 38, .18);
  animation: ft-err-pop .45s ease;
}
#ft-error-msg.is-visible::before {
  content: '⚠'; font-size: 18px; line-height: 1.2; flex-shrink: 0; color: #dc2626;
}
@keyframes ft-err-pop {
  0% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Карточки диапазонов для мобильного (вместо таблицы) ── */
.ft-zonecards { display: none; }
.ft-zcard {
  border: 1px solid var(--v2-border, #e6e8f0);
  border-left: 4px solid var(--ft-tone, #64748b);
  border-radius: 14px; padding: 14px 16px; background: var(--v2-surface, #fff);
}
.ft-zcard--green  { --ft-tone: #047857; --ft-tone-bg: rgba(5, 150, 105, .12); }
.ft-zcard--amber  { --ft-tone: #b45309; --ft-tone-bg: rgba(217, 119, 6, .12); }
.ft-zcard--orange { --ft-tone: #c2532f; --ft-tone-bg: rgba(217, 102, 61, .12); }
.ft-zcard--red    { --ft-tone: #c23b22; --ft-tone-bg: rgba(194, 59, 34, .12); }
.ft-zcard__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ft-zcard__name {
  font-family: var(--v2-font-display, 'Cabinet Grotesk', sans-serif);
  font-weight: 700; font-size: 15px; color: var(--v2-ink); line-height: 1.2;
}
.ft-zcard__r {
  flex: 0 0 auto;
  font-family: var(--v2-font-display, 'Cabinet Grotesk', sans-serif);
  font-weight: 700; font-size: 13px; color: var(--ft-tone);
  background: var(--ft-tone-bg);
  padding: 3px 10px; border-radius: 99px; white-space: nowrap;
}
.ft-zcard__desc { margin: 0; font-size: 14px; line-height: 1.55; color: var(--v2-ink-2); }

@media (max-width: 560px) {
  .ht-table-wrap { display: none; }
  .ft-zonecards { display: grid; gap: 12px; margin: 4px 0 18px; }
}
