/* ============================================================
   TRAINER DISCOUNTS — простий калькулятор (без таблиці)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Unbounded:wght@400;700&family=Manrope:wght@400;500;600&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #f4f3ef;
  --surface:     #ffffff;
  --surface-2:   #f0efe9;
  --border:      #e2e0d8;
  --border-2:    #cccac0;

  --accent:      #2d6a2d;
  --accent-dim:  #3a8c3a;
  --accent-bg:   rgba(45, 106, 45, 0.07);
  --accent-glow: rgba(45, 106, 45, 0.14);

  --text:        #1a1a17;
  --text-2:      #52514a;
  --text-3:      #9a9890;

  --ff-display: 'Unbounded', sans-serif;
  --ff-body:    'Manrope', sans-serif;
  --ff-mono:    'DM Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow: 0 2px 20px rgba(0,0,0,.07);
  --t: .18s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── Page ───────────────────────────────────────────────────── */
.page {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Header ─────────────────────────────────────────────────── */
.header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header__badge {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid rgba(45, 106, 45, 0.2);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  width: fit-content;
}

.header__title {
  font-family: var(--ff-display);
  font-size: clamp(24px, 6vw, 36px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--text);
}

.header__sub {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Field ──────────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
}

.field__wrap {
  position: relative;
}

.field__input {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 14px 44px 14px 16px;
  font-family: var(--ff-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  -moz-appearance: textfield;
}
.field__input::-webkit-outer-spin-button,
.field__input::-webkit-inner-spin-button { -webkit-appearance: none; }
.field__input::placeholder {
  color: var(--text-3);
  font-size: 18px;
}
.field__input:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: var(--surface);
}

.field__currency {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--ff-mono);
  font-size: 16px;
  color: var(--text-3);
  pointer-events: none;
}

/* ── Result ─────────────────────────────────────────────────── */
.result {
  display: flex;
  align-items: stretch;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--t), background var(--t);
  min-height: 72px;
}
.result.has-value {
  border-color: rgba(45, 106, 45, 0.35);
  background: var(--accent-bg);
}

.result__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 14px 18px;
}

.result__sep {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}
.result.has-value .result__sep {
  background: rgba(45, 106, 45, 0.2);
}

.result__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
}

.result__value {
  font-family: var(--ff-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--text-3);
  transition: color var(--t);
}
.result.has-value .result__value {
  color: var(--accent);
}

.result__final {
  font-family: var(--ff-mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--text-3);
  transition: color var(--t);
}
.result.has-value .result__final {
  color: var(--text);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 400px) {
  .card { padding: 18px; }
  .result__final { font-size: 22px; }
  .result__value { font-size: 18px; }
}
