/**
 * Секция калькулятора тарифов (карточки, заголовок, подсказка).
 * Слайдер: bh-tariff-slider.css + bh-tariff-slider.js
 */
.bh-calc {
  --bh-calc-blue: #0080ff;
  --bh-calc-bg: #f8faff;
  --bh-calc-border: #d3daec;
  --bh-calc-text: #212121;
  --bh-calc-mint: #c5f6d4;
  --bh-calc-green: #3ac162;
  --bh-calc-gray-fill: #d3daec;
  box-sizing: border-box;
}

.tariff-calculator.bh-calc {
  box-sizing: border-box;
  max-width: 992px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  background: transparent;
  background-color: transparent;
  box-shadow: none;
  border-radius: 0;
}

.bh-calc *,
.bh-calc *::before,
.bh-calc *::after {
  box-sizing: border-box;
}

.bh-calc__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 50px 0 42px;
}

.bh-calc__title {
  margin: 0 0 30px;
  width: 100%;
  max-width: none;
  font-family: "Ubuntu Sans", "Ubuntu", sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 40px;
  text-align: center;
  color: var(--bh-calc-text);
}

.bh-calc__row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin-bottom: 40px;
}

.bh-calc__pro {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  margin: 0;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  line-height: 23.2px;
  color: var(--bh-calc-text);
  overflow-wrap: break-word;
}

.bh-calc__pro-bold {
  font-weight: 700;
}

.bh-calc__hint {
  flex: 0 1 auto;
  align-self: flex-start;
  width: auto;
  max-width: 100%;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 10px;
  outline: 1px solid var(--bh-calc-border);
  outline-offset: -1px;
  box-sizing: border-box;
}

.bh-calc__hint-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: #ff4d4d;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  color: #fff;
}

.bh-calc__hint-text {
  flex: 0 1 auto;
  min-width: 0;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 23.2px;
  color: var(--bh-calc-text);
  opacity: 0.8;
}

.bh-calc__tariff-note {
  margin: -8px 0 32px;
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 23.2px;
  text-align: center;
  color: var(--bh-calc-text);
  opacity: 0.8;
}

.bh-calc__slider-area {
  width: 100%;
  max-width: none;
  margin: 0 0 30px;
  padding-top: 0;
}

/* Webflow: .calculator-cards — space-between и grid-column-gap ломают визуальный gap: 30px */
.tariff-calculator.bh-calc .calculator-cards.bh-calc__cards {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  height: auto;
  min-height: 0;
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
  gap: 30px;
  column-gap: 30px;
  row-gap: 30px;
}

.bh-calc__cards {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 30px;
  column-gap: 30px;
  row-gap: 30px;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.bh-calc .calculator-cards_item.bh-calc__card {
  box-sizing: border-box;
  flex: 1 1 0;
  align-self: stretch;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 20px 16px 14px;
  border: none;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 10px;
  font-size: inherit;
  line-height: inherit;
  transition:
    outline-color 0.2s ease,
    background-color 0.2s ease;
}

.bh-calc .calculator-cards_item.bh-calc__card:hover {
  border-color: transparent;
}

.bh-calc__card--primary {
  background: var(--bh-calc-blue);
  outline: 1px solid var(--bh-calc-border);
  outline-offset: -1px;
}

.bh-calc__card--muted {
  background: var(--bh-calc-bg);
  outline: 1px solid var(--bh-calc-border);
  outline-offset: -1px;
}

/* От 20k подписчиков: скидки доступны — красный градиент (6 мес.) и тёмный фон (12 мес.). */
.bh-calc__card--muted.bh-calc__card--term-6:not(.is-no-disc) {
  background: linear-gradient(180deg, #e6363e 0%, #f5464d 100%);
  outline: none;
  outline-offset: 0;
}

.bh-calc__card--muted.bh-calc__card--term-12:not(.is-no-disc) {
  background: #212121;
  outline: none;
  outline-offset: 0;
}

/* Полупрозрачность только у контента, не у замка (акцент «заблокировано»). */
.bh-calc__card--muted.is-no-disc .bh-calc__card-title,
.bh-calc__card--muted.is-no-disc .bh-calc__badge--inset,
.bh-calc__card--muted.is-no-disc .bh-calc__card-body {
  opacity: 0.5;
}

.bh-calc__card--muted.is-no-disc .bh-calc__lock-icon {
  opacity: 1;
}

.bh-calc__card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
}

.bh-calc__card-heading {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.bh-calc__card-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.bh-calc__card-title {
  margin: 0;
  font-family: Roboto, sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 37.7px;
  text-align: left;
  white-space: nowrap;
}

.bh-calc__card--primary .bh-calc__card-title {
  color: #fff;
}

.bh-calc__card--muted .bh-calc__card-title {
  color: var(--bh-calc-text);
}

.bh-calc__card--muted.bh-calc__card--term-6:not(.is-no-disc) .bh-calc__card-title,
.bh-calc__card--muted.bh-calc__card--term-12:not(.is-no-disc) .bh-calc__card-title {
  color: #fff;
}

.bh-calc__lock-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: none;
  object-fit: contain;
  opacity: 1;
}

.bh-calc__card--muted.is-no-disc .bh-calc__lock-icon {
  display: block;
}

.bh-calc__badge--inset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.25);
  font-family: Roboto, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--bh-calc-text);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.bh-calc__card--primary .bh-calc__badge--inset {
  flex-shrink: 0;
}

.bh-calc__card-body {
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px 14px 24px;
  background: #fff;
  border-radius: 20px;
  outline: 1px solid var(--bh-calc-border);
  outline-offset: -1px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  box-sizing: border-box;
}

.bh-calc__card-label {
  margin: 0 0 4px;
  font-family: "Ubuntu Sans", Ubuntu, sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--bh-calc-text);
}

.bh-calc__price-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  width: 100%;
  min-height: 36px;
  margin-bottom: 12px;
}

.bh-calc__price-main {
  font-family: "Ubuntu Sans", Ubuntu, sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--bh-calc-text);
}

.bh-calc__price-main--lg {
  flex: 0 1 auto;
}

.bh-calc__price-old {
  flex: 0 0 auto;
  font-family: "Ubuntu Sans", Ubuntu, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: rgba(33, 33, 33, 0.5);
  text-decoration: line-through;
  white-space: nowrap;
}

.bh-calc__price-old:empty {
  display: none;
}

.bh-calc__per-month-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bh-calc-bg);
  box-sizing: border-box;
}

.bh-calc__per-month-label {
  font-family: Roboto, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--bh-calc-text);
}

.bh-calc__per-month-val {
  font-family: "Ubuntu Sans", Ubuntu, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--bh-calc-text);
}

.bh-calc__card-fine,
.bh-calc__card-note {
  margin: 0;
  margin-top: auto;
  width: 100%;
  max-width: none;
  font-family: "Ubuntu Sans", Ubuntu, sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--bh-calc-text);
}

.bh-calc__card-fine {
  margin-top: unset;
}

.bh-calc__card--primary .bh-calc__card-body {
  flex: 1 1 auto;
}

.bh-calc .calculator-cards_item-full {
  display: none !important;
}

.bh-calc__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media screen and (max-width: 991px) {
  .tariff-calculator.bh-calc .calculator-cards.bh-calc__cards,
  .bh-calc__cards {
    flex-wrap: wrap;
  }

  .bh-calc .calculator-cards_item.bh-calc__card {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }

  .bh-calc__row-top {
    flex-flow: column;
  }

  .bh-calc__hint {
    margin: auto;
    width: 100%;
    justify-content: center;
  }
}

@media screen and (max-width: 900px) {
  .bh-calc__inner {
    padding-top: 40px;
  }

  .bh-calc__title {
    font-size: 28px;
    line-height: 32px;
    margin-bottom: 40px;
  }
}

/* Мобильный выбор диапазона подписчиков (макет Figma 2227:1144 / Dropdown List) */
.bh-calc__mobile-range {
  display: none;
}

@media screen and (max-width: 767px) {
  .bh-calc__mobile-range {
    display: block;
    width: 100%;
    margin: 0 0 30px;
    padding: 0;
    box-sizing: border-box;
  }

  .tariff-calculator.bh-calc .bh-calc__slider-area {
    position: absolute;
    left: -9999px;
    top: 0;
    width: 400px;
    height: 62px;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    pointer-events: none;
    opacity: 0;
  }

  .bh-calc__select {
    position: relative;
    width: 100%;
    box-sizing: border-box;
  }

  .bh-calc__select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    outline: 1px solid var(--bh-calc-border);
    outline-offset: -1px;
    box-sizing: border-box;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    color: #333;
    text-align: left;
  }

  .bh-calc__select-trigger:focus-visible {
    outline: 2px solid var(--bh-calc-blue);
    outline-offset: 2px;
  }

  .bh-calc__select-value {
    flex: 1 1 auto;
    min-width: 0;
  }

  .bh-calc__select-chevron {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: transform 0.2s ease;
  }

  .bh-calc__select.is-open .bh-calc__select-chevron {
    transform: rotate(180deg);
  }

  .bh-calc__select-list {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    margin: 0;
    padding: 0;
    list-style: none;
    border-radius: 8px;
    background: #d3daec;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    outline: 1px solid var(--bh-calc-border);
    outline-offset: -1px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
  }

  .bh-calc__select-list[hidden] {
    display: none !important;
  }

  .bh-calc__select-list:not([hidden]) {
    display: flex !important;
  }

  .bh-calc__select-item {
    margin: 0;
    padding: 0;
    background: #fff;
  }

  .bh-calc__select-option {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 12px 16px;
    border: none;
    background: #fff;
    box-sizing: border-box;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    color: #333;
    text-align: left;
  }

  .bh-calc__select-option:hover,
  .bh-calc__select-option:focus-visible {
    background: rgba(211, 218, 236, 0.24);
  }

  .bh-calc__select-option.is-selected {
    background: rgba(211, 218, 236, 0.24);
  }
}
