/* 💚 Стили калькулятора обратного НДС — бирюзово-зелёная (teal/green) денежная тема */

:root {
  --rnds-green: #1e7d32;
  --rnds-green-dark: #155d26;
  --rnds-green-light: #e8f5e9;
  --rnds-green-accent: #28a745;
  --rnds-teal: #0f766e;
  --rnds-gold: #b8860b;
  --rnds-text: #2b2b2b;
  --rnds-muted: #6b7280;
  --rnds-border: #c8e6c9;
  --rnds-warning-bg: #fff8e1;
  --rnds-warning-border: #f0d060;
}

/* 🧾 Поля ввода */
.calc-block label {
  display: block;
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--rnds-green-dark);
}

.calc-block input[type="number"],
.calc-block select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 1.05rem;
  border: 2px solid var(--rnds-border);
  border-radius: 10px;
  background-color: #fafffa;
  color: var(--rnds-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.calc-block input[type="number"]:focus,
.calc-block select:focus {
  outline: none;
  border-color: var(--rnds-green-accent);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.18);
}

.calc-block input[type="number"] {
  font-variant-numeric: tabular-nums;
}

.calc-block .field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--rnds-muted);
}

/* 📐 Карточка коэффициента */
.rate-factor-card {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%);
  border: 1px solid var(--rnds-border);
  border-top: 5px solid var(--rnds-teal);
  border-radius: 10px;
}

.rate-factor-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--rnds-green-dark);
}

.rate-factor-card p {
  margin: 0 0 0.8rem;
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--rnds-text);
}

.factor-highlight {
  color: var(--rnds-green);
  font-weight: 700;
  white-space: nowrap;
}

.factor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.factor-table th,
.factor-table td {
  padding: 0.5rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--rnds-border);
}

.factor-table th {
  background: var(--rnds-teal);
  color: #fff;
  font-weight: 600;
}

.factor-table tr:last-child td {
  border-bottom: none;
}

.factor-table tbody tr:hover {
  background: #f1f8e9;
}

.factor-table tbody tr.factor-row-active {
  background: #d7efd9;
  font-weight: 700;
}

.factor-table tbody tr.factor-row-active td:first-child {
  color: var(--rnds-green-dark);
}

/* 💰 Результаты */
.result-placeholder {
  margin: 0;
  color: var(--rnds-muted);
  font-size: 0.95rem;
}

.result-hero {
  background: linear-gradient(135deg, var(--rnds-teal) 0%, var(--rnds-green) 55%, var(--rnds-green-accent) 100%);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  color: #fff;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.result-hero .result-label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.result-hero .result-value {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.result-card {
  background: #fafffa;
  border: 1px solid var(--rnds-border);
  border-radius: 10px;
  padding: 0.8rem 1rem;
}

.result-card .result-label {
  display: block;
  font-size: 0.8rem;
  color: var(--rnds-muted);
}

.result-card .result-value {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--rnds-green-dark);
  font-variant-numeric: tabular-nums;
}

/* 🧮 Пошаговый расчёт */
.result-steps,
.result-coef,
.result-warning {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  font-size: 0.93rem;
  line-height: 1.55;
}

.result-steps {
  background: #f1f8e9;
  border: 1px solid var(--rnds-border);
}

.result-steps h3,
.result-coef h3,
.result-warning h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--rnds-green-dark);
}

.result-steps ol {
  margin: 0;
  padding-left: 1.2rem;
}

.result-steps li {
  margin-bottom: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.result-steps li:last-child {
  margin-bottom: 0;
}

.result-steps .calc-expr {
  font-weight: 700;
  color: var(--rnds-green);
}

/* 🪙 Коэффициент в результатах */
.result-coef {
  background: #fffdf3;
  border: 1px solid #f0e0a0;
}

.result-coef p {
  margin: 0;
  color: var(--rnds-text);
}

/* ⚠️ Предупреждение об округлении */
.result-warning {
  background: var(--rnds-warning-bg);
  border: 1px solid var(--rnds-warning-border);
  border-top: 5px solid var(--rnds-gold);
}

.result-warning h3 {
  color: #7a5c00;
}

.result-warning p {
  margin: 0;
  color: #5f4a00;
}

/* 📱 Мобильная адаптация */
@media (max-width: 640px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .result-hero .result-value {
    font-size: 1.6rem;
  }

  .factor-table {
    font-size: 0.82rem;
  }
}
