/* ===== Налог на подарок (юридический аспект) — розово-коралловая тема ===== */

:root {
  --gift-coral: #e85d4a;
  --gift-coral-dark: #cf4d3c;
  --gift-coral-deep: #b63f31;
  --gift-pink: #ff9d94;
  --gift-pink-soft: #ffe9e4;
  --gift-border: #f3c9c2;
  --gift-ink: #5c2e27;
  --gift-text: #8a4f47;
  --gift-green: #2e7d4f;
  --gift-green-bg: #e6f6ec;
}

.calculator-layout {
  display: flex;
  gap: 40px;
  padding: 20px;
  align-items: flex-start;
}

.calc-block {
  flex: 1;
  max-width: 520px;
  background: linear-gradient(160deg, #ffffff 0%, #fff3f0 100%);
  border: 1px solid var(--gift-border);
  border-radius: 20px;
  padding: 28px 30px;
  box-shadow: 0 12px 32px rgba(232, 93, 74, 0.16);
}

.calc-block h1 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.25;
  color: var(--gift-coral-deep);
}

.calc-block label {
  display: block;
  margin-top: 18px;
  font-weight: bold;
  font-size: 14px;
  color: var(--gift-ink);
}

.calc-block input[type="text"],
.calc-block select {
  width: 100%;
  padding: 12px 14px;
  margin-top: 6px;
  box-sizing: border-box;
  border: 1.5px solid var(--gift-border);
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
  color: var(--gift-ink);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.calc-block select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23e85d4a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.calc-block input[type="text"]:focus,
.calc-block select:focus {
  outline: none;
  border-color: var(--gift-coral);
  box-shadow: 0 0 0 3px rgba(232, 93, 74, 0.18);
}

/* Чекбокс нотариального заверения */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-top: 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--gift-ink);
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 1px;
  border: 2px solid var(--gift-border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}

.checkbox-label input[type="checkbox"]:checked {
  background: var(--gift-coral);
  border-color: var(--gift-coral);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

.checkbox-label input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 93, 74, 0.25);
}

.field-hint {
  margin: 6px 0 0 32px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--gift-text);
}

.calc-block button {
  margin-top: 25px;
  padding: 13px 32px;
  background: linear-gradient(135deg, var(--gift-coral) 0%, var(--gift-coral-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(232, 93, 74, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.calc-block button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(232, 93, 74, 0.45);
}

.calc-block button:active {
  transform: translateY(0);
}

/* ── Блок результатов ─────────────────────────────────────────────── */

.result-block {
  flex: 1;
  min-width: 280px;
  background: #fff;
  border: 1px solid var(--gift-border);
  border-top: 4px solid var(--gift-coral);
  border-radius: 4px;
  padding: 24px 26px;
  box-shadow: 0 10px 28px rgba(232, 93, 74, 0.12);
}

.result-block h2 {
  margin: 0 0 16px;
  color: var(--gift-coral-deep);
  font-size: 20px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.badge-exempt {
  display: inline-block;
  padding: 6px 14px;
  background: var(--gift-green-bg);
  color: var(--gift-green);
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
}

.badge-tax {
  display: inline-block;
  padding: 6px 14px;
  background: var(--gift-pink-soft);
  color: var(--gift-coral-deep);
  border: 1px solid var(--gift-pink);
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
}

.result-breakdown {
  border-top: 1px dashed var(--gift-border);
  border-bottom: 1px dashed var(--gift-border);
  padding: 6px 0;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding: 9px 0;
  font-size: 15px;
  color: var(--gift-ink);
}

.result-row strong {
  color: var(--gift-coral-deep);
  white-space: nowrap;
}

.result-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--gift-coral) 0%, var(--gift-coral-dark) 100%);
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
}

.result-total strong {
  font-size: 20px;
  white-space: nowrap;
}

.result-note {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--gift-text);
}

.result-note p {
  margin: 6px 0;
}

.result-error {
  padding: 14px 16px;
  background: #fdecec;
  color: #c0392b;
  border: 1px solid #f5c6c6;
  border-radius: 10px;
  font-weight: 600;
}

/* ── Адаптивность ─────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .calculator-layout {
    flex-direction: column;
    gap: 24px;
    padding: 14px;
  }

  .calc-block,
  .result-block {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .calc-block {
    padding: 22px 20px;
  }
}

@media (max-width: 560px) {
  .result-row,
  .result-total {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .result-total strong {
    font-size: 18px;
  }
}
