/* Мерките на старите бутониери: във формата — рамка за всяка спирка с полетата ѝ; на страницата —
   таблица, която на телефон става карта за всеки ред (заглавието на колоната пред стойността). */

.misure,
.misure__rows {
  display: grid;
  gap: 12px;
}

.misura {
  margin: 0;
  padding: 8px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.misura__title {
  padding: 0 6px;
  font-weight: 600;
}

.misura__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  align-items: end;
  gap: 12px 14px;
}

/* Тесен екран: „Display“ на свой ред — Sì и No един до друг. */
@media (max-width: 999px) {
  .misura__grid > .choice {
    grid-column: 1 / -1;
  }
}

/* Широк екран: една спирка — един ред, колоните една под друга като в таблица. */
@media (min-width: 1000px) {
  .misura__grid {
    grid-template-columns:
      minmax(80px, 0.6fr) repeat(2, minmax(110px, 1fr)) repeat(2, minmax(140px, 1.3fr))
      auto;
  }
}

.mtable {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-weight: 400;
  white-space: normal;
}

.mtable th,
.mtable td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.mtable thead th {
  border-bottom: 1.5px solid var(--line-strong);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.mtable tbody th {
  font-weight: 600;
}

.mtable .empty-value {
  color: var(--muted);
}

@media (max-width: 759px) {
  .mtable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .mtable tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .mtable th,
  .mtable td {
    display: block;
    padding: 0;
    border: 0;
  }

  .mtable tbody th {
    grid-column: 1 / -1;
  }

  .mtable tbody th::before,
  .mtable td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--muted);
  }
}
