/* sg-crm-prices: страницы населенных пунктов и таблицы цен.
   Цвета и шрифты наследуются от темы, свои только фон плашек и линии. */

.sg-city { margin: 0 0 32px; }
.sg-city .sg-city-h2 { margin: 36px 0 14px; }

/* строка условий выезда */
.sg-city-terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: rgba(0, 0, 0, .12);
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 28px;
}
.sg-city-terms > div { background: #fff; padding: 14px 16px; }
.sg-city-terms b { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.sg-city-terms span { font-size: 14px; opacity: .8; }

/* карточки: сетка и фото берутся из темы (.cards .sale_block .item .card), здесь только блок расчета */
.sg-city-cards .sg-city-card { display: flex; flex-direction: column; }
.sg-city-price { margin-top: 8px; }
.sg-city-calc {
  background: rgba(254, 79, 0, .06);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0 12px;
  font-size: 14px;
  display: grid;
  gap: 4px;
}
.sg-city-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.sg-city-row b { white-space: nowrap; }
.sg-city-row.sg-city-sum { font-weight: 700; border-top: 1px dashed rgba(0, 0, 0, .2); padding-top: 6px; margin-top: 2px; }
.sg-city-card .sg-city-btn { margin-top: auto; }

/* страница города без вида: блоки по видам */
.sg-city-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 0 0 28px; }
.sg-city-type { border: 1px solid rgba(0, 0, 0, .12); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.sg-city-type h2 { margin: 0; font-size: 20px; }
.sg-city-type p { margin: 0; }
.sg-city-type .sg-city-btn { align-self: flex-start; margin-top: auto; }

/* блок формулы */
.sg-city-formula {
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 14px;
  padding: 20px 22px;
  max-width: 72ch;
}
.sg-city-formula ol { padding-left: 20px; margin: 10px 0; }
.sg-city-formula li { margin: 6px 0; }
.sg-city-example {
  background: rgba(254, 79, 0, .06);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
.sg-city-mini { margin: 12px 0 0; opacity: .85; }

/* таблица [sg_prices] */
table.sg-prices { width: 100%; border-collapse: collapse; margin: 0 0 24px; }
table.sg-prices th, table.sg-prices td { padding: 8px 12px; border-bottom: 1px solid rgba(0, 0, 0, .12); text-align: left; }
table.sg-prices td:nth-child(2) { white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 480px) {
  .sg-city-terms b { font-size: 20px; }
  .sg-city-formula { padding: 16px; }
}
