/* 🏖 Пенсионный калькулятор — форма, результат и шкала готовности */

.calc-intro {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 8px 0 0;
}

.calc-block label {
  display: block;
  margin-top: 16px;
  font-weight: bold;
  font-size: 15px;
  color: #222;
}

/* 🎛 Числовые поля ввода */
.calc-block input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.calc-block input[type="number"]:hover {
  border-color: #999;
}

.calc-block input[type="number"]:focus {
  outline: none;
  border-color: #0077cc;
  box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.15);
}

/* Убираем стрелки у number-полей в Firefox */
.calc-block input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.calc-block input[type="number"]::-webkit-outer-spin-button,
.calc-block input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field-hint {
  display: block;
  color: #888;
  font-size: 12px;
  font-weight: normal;
  margin-top: 3px;
}

.calc-block button {
  margin-top: 22px;
  padding: 12px 24px;
  background: #0077cc;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s ease;
}

.calc-block button:hover {
  background: #005fa3;
}

.calc-block button:active {
  background: #004f87;
}

/* ⚠️ Сообщение об ошибке ввода */
.calc-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  color: #b3261e;
  font-size: 14px;
  line-height: 1.4;
}

/* 🎴 Карточка результата */
.result-block h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  color: #222;
}

.result-output {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 18px;
}

/* 🔢 Главное число: ежемесячный взнос */
.result-hero-wrap {
  text-align: center;
}

.result-hero-label {
  font-size: 13px;
  color: #777;
  margin: 0;
}

.result-hero {
  font-size: 2.2rem;
  font-weight: bold;
  text-align: center;
  margin: 6px 0 4px;
  color: #222;
  line-height: 1.15;
}

/* Цвет числа соответствует зоне готовности */
.result-hero-wrap.zone-ready .result-hero {
  color: #2e7d32;
}

.result-hero-wrap.zone-close .result-hero {
  color: #b26a00;
}

.result-hero-wrap.zone-far .result-hero {
  color: #d32f2f;
}

.result-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  margin-top: 4px;
}

.result-badge.ready {
  background: #2e7d32;
}

.result-badge.close {
  background: #f9a825;
  color: #333;
}

.result-badge.far {
  background: #d32f2f;
}

.result-verdict {
  text-align: center;
  font-size: 14px;
  color: #444;
  margin: 12px 0 4px;
  line-height: 1.5;
}

/* 🌡 Шкала готовности: сколько уже покрыто накоплениями */
.coverage-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #777;
  margin: 18px 0 4px;
}

.coverage-gauge {
  position: relative;
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e53935 0%, #e53935 40%, #ffb300 60%, #43a047 85%, #43a047 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.coverage-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  min-width: 4px;
  background: rgba(255, 255, 255, 0.55);
  border-right: 2px solid rgba(255, 255, 255, 0.9);
  transition: width 0.6s ease;
}

.coverage-marker {
  position: absolute;
  top: -4px;
  width: 8px;
  height: 22px;
  border-radius: 3px;
  background: #222;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  transition: left 0.6s ease;
}

/* 📋 Разбивка расчёта */
.retire-breakdown {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}

.retire-breakdown th,
.retire-breakdown td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
  vertical-align: top;
}

.retire-breakdown th {
  background: #f5f5f5;
  font-size: 13px;
}

.retire-breakdown td:last-child {
  text-align: right;
  font-weight: bold;
  white-space: nowrap;
}

.retire-breakdown .total-row td {
  background: #f0f7ff;
  font-size: 15px;
  border-top: 2px solid #d4e6f7;
}

.retire-breakdown .total-row td:last-child {
  color: #0077cc;
  font-size: 1.15rem;
}

/* 📊 Блок дефицита */
.retire-adjust {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  font-size: 13px;
  color: #333;
  line-height: 1.5;
}

.retire-adjust.success {
  background: #e9f7ee;
  border-color: #bfe6cc;
}

.retire-adjust strong {
  color: #b3261e;
}

.retire-adjust.success strong {
  color: #2e7d32;
}

.retire-note {
  font-size: 12px;
  color: #888;
  margin-top: 14px;
  line-height: 1.5;
  border-top: 1px dashed #ddd;
  padding-top: 10px;
}
