/* ===== Калькулятор банкротства: что будет, если ничего не менять ===== */

.bankruptcy-calc {
  --bc-red: #ed213a;
  --bc-red-dark: #93291e;
  --bc-green: #1ea063;
  --bc-green-dark: #137a4a;
  --bc-green-soft: #e8f7ee;
  --bc-bg: #f6f8fb;
  --bc-border: #e3e8ef;
  --bc-text: #1d2733;
  --bc-muted: #6b7785;
  --bc-radius: 16px;
  --bc-shadow: 0 6px 24px rgba(20, 35, 60, 0.06);
  --bc-shadow-strong: 0 12px 40px rgba(20, 35, 60, 0.12);
  font-family: "Evolventa", "Inter", system-ui, sans-serif;
  color: var(--bc-text);
}

.bankruptcy-calc__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.bankruptcy-calc__subtitle {
  margin: 12px 0 32px;
  font-size: 16px;
  color: var(--bc-muted);
  max-width: 720px;
  line-height: 1.55;
}

.bankruptcy-calc__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== Вводные данные: 3 числовых поля ===== */

.bc-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: #fff;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  padding: 24px 28px;
  box-shadow: var(--bc-shadow);
}

.bc-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.bc-input__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bc-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bc-input__field {
  width: 100%;
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  color: var(--bc-text);
  font-variant-numeric: tabular-nums;
  padding: 14px 16px;
  border: 2px solid var(--bc-border);
  border-radius: 12px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bc-input__field:focus {
  border-color: var(--bc-red);
  box-shadow: 0 0 0 4px rgba(237, 33, 58, 0.12);
}

.bc-input__field:hover {
  border-color: #c8d2df;
}

.bc-input__field::-webkit-input-placeholder {
  color: #b0b8c2;
}

/* Подсказка */

.bc-hint {
  margin: 0;
  font-size: 13px;
  color: var(--bc-muted);
  line-height: 1.55;
  padding: 12px 16px;
  background: var(--bc-bg);
  border-radius: 10px;
  border-left: 3px solid var(--bc-border);
  text-align: center;
}

.bc-hint small,
.bc-savings__sub small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
  opacity: 0.85;
}

/* ===== Сценарии: 2 колонки ===== */

.bc-scenarios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.bc-scenario {
  background: #fff;
  border-radius: var(--bc-radius);
  padding: 28px;
  box-shadow: var(--bc-shadow);
  border: 1px solid var(--bc-border);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bc-scenario:hover {
  transform: translateY(-2px);
  box-shadow: var(--bc-shadow-strong);
}

.bc-scenario_bad {
  border-top: 4px solid var(--bc-red);
}

.bc-scenario_good {
  border-top: 4px solid var(--bc-green);
  background: linear-gradient(180deg, #f1faf5 0%, #ffffff 60%);
}

.bc-scenario__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bc-scenario__icon {
  font-size: 28px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f3f5f8;
  flex-shrink: 0;
}

.bc-scenario_bad .bc-scenario__icon {
  background: rgba(237, 33, 58, 0.1);
}

.bc-scenario_good .bc-scenario__icon {
  background: rgba(30, 160, 99, 0.1);
}

.bc-scenario__title {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
  color: var(--bc-text);
}

.bc-scenario__caption {
  margin: 0;
  font-size: 13px;
  color: var(--bc-muted);
  line-height: 1.4;
}

/* Итог сценария */

.bc-scenario__total {
  margin-top: auto;
  padding: 18px 20px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bc-scenario__total_red {
  background: rgba(237, 33, 58, 0.08);
  border: 1px dashed rgba(237, 33, 58, 0.4);
}

.bc-scenario__total_green {
  background: rgba(30, 160, 99, 0.1);
  border: 1px solid rgba(30, 160, 99, 0.3);
}

.bc-scenario__total-label {
  font-size: 13px;
  color: var(--bc-muted);
  line-height: 1.4;
}

.bc-scenario__total-value {
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  transition: color 0.25s ease;
}

.bc-scenario__total_red .bc-scenario__total-value {
  color: var(--bc-red-dark);
}

.bc-scenario__total_green .bc-scenario__total-value {
  color: var(--bc-green-dark);
}

.bc-scenario__total-meta {
  font-size: 13px;
  color: var(--bc-muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.bc-scenario__total_green .bc-scenario__total-meta {
  color: var(--bc-green-dark);
  opacity: 0.75;
}

.bc-scenario__sub {
  font-size: 14px;
  color: var(--bc-muted);
  line-height: 1.5;
}

.bc-scenario__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bc-scenario__list li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--bc-text);
  padding-left: 4px;
}

/* Микро-цифра "Только проценты" */

.bc-scenario__interest {
  font-size: 14px;
  line-height: 1.5;
  color: var(--bc-muted);
  padding: 10px 14px;
  background: var(--bc-bg);
  border-radius: 10px;
  border-left: 3px solid var(--bc-red);
}

.bc-scenario__interest #bc-interest {
  font-weight: 700;
  color: var(--bc-red-dark);
  font-variant-numeric: tabular-nums;
}

/* Раскрытие скрытых расходов */

.bc-hidden-toggle {
  background: transparent;
  border: 1px dashed var(--bc-border);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--bc-red-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.2s ease, border-color 0.2s ease;
  width: 100%;
}

.bc-hidden-toggle:hover {
  background: rgba(237, 33, 58, 0.04);
  border-color: var(--bc-red);
}

.bc-hidden-toggle__icon {
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.bc-hidden-toggle[aria-expanded="true"] .bc-hidden-toggle__icon {
  transform: rotate(45deg);
}

.bc-hidden-list {
  list-style: none;
  padding: 12px 16px;
  margin: 0;
  background: var(--bc-bg);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bc-hidden-list[hidden] {
  display: none;
}

.bc-hidden-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  line-height: 1.4;
  padding: 4px 0;
  border-bottom: 1px solid var(--bc-border);
}

.bc-hidden-item:last-child {
  border-bottom: none;
}

.bc-hidden-item__label {
  color: var(--bc-muted);
}

.bc-hidden-item__value {
  font-weight: 700;
  color: var(--bc-red-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ===== Плашки выгоды ===== */

.bc-savings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bc-savings__item {
  background: linear-gradient(135deg, #1ea063 0%, #137a4a 100%);
  color: #fff;
  border-radius: 16px;
  padding: 30px 32px;
  box-shadow: 0 12px 40px rgba(30, 160, 99, 0.28);
  position: relative;
  overflow: hidden;
  animation: bc-pulse 0.4s ease-out;
  text-align: center;
}

.bc-savings__item::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.bc-savings__label {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.92;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bc-savings__amount {
  position: relative;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  margin-bottom: 12px;
}

.bc-savings__sub {
  position: relative;
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.94;
  max-width: 720px;
  margin: 0 auto;
}

@keyframes bc-pulse {
  0% {
    transform: scale(0.97);
    opacity: 0.7;
  }
  60% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== CTA ===== */

.bc-cta {
  text-align: center;
  padding: 16px 0 4px;
}

.bc-cta__btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--bc-green) 0%, var(--bc-green-dark) 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 20px 44px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 24px rgba(30, 160, 99, 0.3);
  font-family: inherit;
  border: none;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.bc-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(30, 160, 99, 0.4);
}

.bc-cta__btn:active {
  transform: translateY(0);
}

.bc-cta__legal {
  margin: 16px auto 0;
  font-size: 12px;
  color: var(--bc-muted);
  line-height: 1.5;
  max-width: 580px;
  opacity: 0.85;
}

/* ===== Адаптив ===== */

@media (max-width: 991.98px) {
  .bc-scenarios {
    grid-template-columns: 1fr;
  }
  .bc-inputs {
    grid-template-columns: 1fr 1fr;
  }
  .bc-inputs .bc-input:last-child {
    grid-column: 1 / -1;
  }
  .bc-savings__amount {
    font-size: 36px;
  }
}

@media (max-width: 600px) {
  .bankruptcy-calc__subtitle {
    font-size: 15px;
  }
  .bc-inputs {
    grid-template-columns: 1fr;
    padding: 18px 20px;
  }
  .bc-inputs .bc-input:last-child {
    grid-column: auto;
  }
  .bc-input__field {
    font-size: 18px;
    padding: 12px 14px;
  }
  .bc-scenario {
    padding: 20px;
  }
  .bc-scenario__total-value {
    font-size: 26px;
  }
  .bc-savings__item {
    padding: 22px 20px;
  }
  .bc-savings__amount {
    font-size: 30px;
  }
  .bc-cta__btn {
    font-size: 15px;
    padding: 16px 28px;
    width: 100%;
  }
}

@media (max-width: 380px) {
  .bc-savings__amount {
    font-size: 26px;
  }
}

/* Тёмная тема */

@media (prefers-color-scheme: dark) {
  .bankruptcy-calc {
    --bc-bg: #14181f;
    --bc-border: #2a3140;
    --bc-text: #e9edf3;
    --bc-muted: #8e98a8;
  }
  .bc-inputs,
  .bc-scenario {
    background: #1b2029;
  }
  .bc-scenario_good {
    background: linear-gradient(180deg, #142a20 0%, #1b2029 60%);
  }
  .bc-input__field {
    background: #14181f;
    color: var(--bc-text);
  }
  .bc-scenario__icon {
    background: #2a3140;
  }
  .bc-hidden-list {
    background: #14181f;
  }
  .bc-hidden-item {
    border-color: #2a3140;
  }
}
