/* ============================================
   Сброс стилей сайта внутри калькулятора
   #tbCalc даёт специфичность 1,0,0 — выше любого
   классового селектора шаблона сайта
   ============================================ */
.tb-calc * {
  box-sizing: border-box;
}

#tbCalc h2,
#tbCalc h3,
#tbCalc h4,
#tbCalc p,
#tbCalc ul,
#tbCalc li {
  margin: 0 !important;
  padding: 0 !important;
  font-size: unset;
  line-height: unset;
  color: unset;
  font-weight: unset;
  border: none;
  background: none;
}

.tb-calc a {
  text-decoration: none;
  color: inherit;
}
.tb-calc button {
  font-family: inherit;
}

.tb-calc {
  font-family: 'Segoe UI', Arial, sans-serif;
  max-width: 780px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e0e4ea;
  border-radius: 12px;
  overflow: hidden;
}
.tb-calc__header {
  background: #003E59;
  color: #fff;
  padding: 28px 32px 22px;
}

body .wrapper #tbCalc .tb-calc__header h2 {
  color: #fff !important;
}

#tbCalc .tb-calc__header h2 {
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 0 0 6px 0 !important;
  padding: 0 !important;
  color: #fff !important;
  background: none !important;
  border: none !important;
}
#tbCalc .tb-calc__header p {
  font-size: 14px !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  opacity: 0.75;
}

/* Progress */
.tb-calc__progress {
  display: flex;
  background: #002d43;
  padding: 0 32px;
}
.tb-calc__step-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-align: center;
  position: relative;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  cursor: default;
  user-select: none;
}
.tb-calc__step-tab.active {
  color: #fff;
  border-bottom-color: #f0a500;
}
.tb-calc__step-tab.done {
  color: rgba(255,255,255,0.65);
  border-bottom-color: rgba(255,255,255,0.25);
}
.tb-calc__step-num {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  margin-right: 6px;
  vertical-align: middle;
}
.tb-calc__step-tab.active .tb-calc__step-num { background: #f0a500; color: #003E59; }
.tb-calc__step-tab.done .tb-calc__step-num { background: rgba(255,255,255,0.3); }

/* Body */
.tb-calc__body { padding: 32px; }

.tb-calc__section { display: none; }
.tb-calc__section.visible { display: block; }

.tb-calc__section-title {
  font-size: 16px;
  font-weight: 700;
  color: #003E59;
  margin-bottom: 18px;
}

/* Cards grid */
.tb-calc__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.tb-calc__cards.cols3 { grid-template-columns: repeat(3, 1fr); }

.tb-calc__card {
  border: 2px solid #e0e4ea;
  border-radius: 10px;
  padding: 16px 14px;
  cursor: pointer;
  transition: all 0.18s;
  background: #fafbfc;
  user-select: none;
}
.tb-calc__card:hover { border-color: #003E59; background: #f0f5f8; }
.tb-calc__card.selected {
  border-color: #003E59;
  background: #e8f0f5;
}
.tb-calc__card-icon { font-size: 22px; margin-bottom: 8px; }
.tb-calc__card-title {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}
.tb-calc__card-desc {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}
.tb-calc__card-price {
  font-size: 13px;
  color: #003E59;
  font-weight: 600;
  margin-top: 8px;
}

/* Checkboxes */
.tb-calc__checks { display: grid; gap: 10px; margin-bottom: 8px; }
.tb-calc__check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e0e4ea;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s;
  background: #fafbfc;
  user-select: none;
}
.tb-calc__check-label:hover { border-color: #003E59; background: #f0f5f8; }
.tb-calc__check-label input { display: none; }
.tb-calc__check-box {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 5px;
  border: 2px solid #c5cdd8;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.18s;
  margin-top: 1px;
}
.tb-calc__check-label.checked .tb-calc__check-box {
  background: #003E59;
  border-color: #003E59;
  color: #fff;
}
.tb-calc__check-label.checked { border-color: #003E59; background: #e8f0f5; }
.tb-calc__check-text-title {
  font-size: 14px;
  font-weight: 600;
  color: #111;
}
.tb-calc__check-text-desc {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}
.tb-calc__check-text-price {
  font-size: 12px;
  color: #003E59;
  font-weight: 600;
  margin-top: 3px;
}

/* Step 2 info block */
.tb-calc__info-block {
  background: #f0f5f8;
  border: 1px solid #d0dce5;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #445;
  line-height: 1.5;
}
.tb-calc__info-block strong { color: #003E59; }

/* Nav buttons */
.tb-calc__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}
.tb-calc__btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
}
.tb-calc__btn-back {
  background: #f0f2f5;
  color: #555;
}
.tb-calc__btn-back:hover { background: #e0e4ea; }
.tb-calc__btn-next {
  background: #003E59;
  color: #fff;
  margin-left: auto;
}
.tb-calc__btn-next:hover { background: #005279; }
.tb-calc__btn-next:disabled { background: #b0bec5; cursor: not-allowed; }

/* Result */
.tb-calc__result { display: none; }
.tb-calc__result.visible { display: block; }
.tb-calc__result-header {
  font-size: 16px;
  font-weight: 700;
  color: #003E59;
  margin-bottom: 20px;
}
.tb-calc__result-rows { margin-bottom: 20px; }
.tb-calc__result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 14px;
}
.tb-calc__result-row:last-child { border-bottom: none; }
.tb-calc__result-label { color: #444; flex: 1; padding-right: 20px; }
.tb-calc__result-val { color: #003E59; font-weight: 600; white-space: nowrap; }
.tb-calc__result-total {
  background: #003E59;
  color: #fff;
  border-radius: 10px;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.tb-calc__result-total-label { font-size: 15px; opacity: 0.85; }
.tb-calc__result-total-price { font-size: 24px; font-weight: 800; }
.tb-calc__result-note {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  margin-bottom: 20px;
}
.tb-calc__cta {
  display: block;
  width: 100%;
  padding: 15px;
  background: #f0a500;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.18s;
}
.tb-calc__cta:hover { background: #d99200; }
.tb-calc__restart {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  text-decoration: underline;
}
.tb-calc__restart:hover { color: #003E59; }

/* Step hint */
.tb-calc__hint {
  font-size: 12px;
  color: #999;
  margin-top: 14px;
  line-height: 1.4;
}

@media (max-width: 520px) {
  .tb-calc__cards { grid-template-columns: 1fr 1fr; }
  .tb-calc__cards.cols3 { grid-template-columns: 1fr 1fr; }
  .tb-calc__body { padding: 20px 16px; }
  .tb-calc__header { padding: 20px 16px 16px; }
  .tb-calc__progress { padding: 0 10px; }
  .tb-calc__step-tab { font-size: 11px; padding: 8px 4px; }
}