/* ══════════════════════════════════════════════════════════════════
   Discounts & Cooldown Planner — page-specific styles.
   The bordered "legend" panels (border-2 border-black/10 + an
   absolutely-positioned label notched into the top edge) are built
   with Tailwind utilities straight in the markup, matching /calc/'s
   own authoring style — this file only covers the pieces Tailwind
   can't express: underline inputs, badges, list rows, the timeline,
   saved-game chips. calc.css is loaded alongside for .calc-share,
   .calc-lead-banner and .calc-advanced-toggle, reused as-is.
   ══════════════════════════════════════════════════════════════════ */

/* ── UNDERLINE INPUTS (no box, matches .calc-field__input) ───────── */
.discounts-underline-input {
  width: 100%;
  font-family: 'Roboto Mono', monospace;
  font-size: 2.2rem;
  font-weight: 700;
  color: #17140f;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(0, 0, 0, 0.15);
  outline: none;
  padding: 0.5rem 0;
  transition: border-color 0.2s;
}

.discounts-underline-input:focus {
  border-color: #b8ff68;
}

.discounts-underline-input::placeholder {
  color: rgba(23, 20, 15, 0.2);
}

select.discounts-underline-input {
  cursor: pointer;
  font-size: 1.5rem;
}

@media (max-width: 480px) {
  .discounts-underline-input {
    font-size: 1.8rem;
  }

  select.discounts-underline-input {
    font-size: 1.2rem;
  }

  .discounts-status__headline {
    font-size: 2.5rem;
  }
}

/* ── RESULT: big hero-number status ──────────────────────────────── */
.discounts-status-panel {
  transition: border-color 0.3s;
}

.discounts-status__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(23, 20, 15, 0.4);
}

.discounts-status__flag {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(23, 20, 15, 0.2);
  transition: background 0.3s;
}

.discounts-status__flag.is-now {
  background: #b8ff68;
}

.discounts-status__headline {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #17140f;
  line-height: 1;
  margin-top: 0.5rem;
}

.discounts-status__unit {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(23, 20, 15, 0.35);
  margin-left: 0.5rem;
}

.discounts-status__sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(23, 20, 15, 0.5);
  margin-top: 0.75rem;
}

/* ── LIST ROWS (festivals, calendar) ─────────────────────────────── */
.discounts-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 1.1rem;
}

.discounts-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.discounts-row__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.discounts-row__name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #17140f;
}

.discounts-row__meta {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(23, 20, 15, 0.4);
}

.discounts-row__date {
  flex-shrink: 0;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(23, 20, 15, 0.45);
  white-space: nowrap;
}

.discounts-badge {
  flex-shrink: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.45rem 0.9rem;
  border-radius: 100px;
  white-space: nowrap;
}

.discounts-badge--can {
  background: #b8ff68;
  color: #090909;
}

.discounts-badge--blocked {
  background: rgba(248, 113, 113, 0.18);
  color: #b91c1c;
}

.discounts-badge--cooldown {
  background: rgba(251, 191, 36, 0.2);
  color: #92400e;
}

.discounts-badge--late {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(23, 20, 15, 0.5);
}

/* ── TARGET EVENT NOTE (shown when a specific festival is selected) ─ */
.discounts-target-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.02);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.6;
  color: rgba(23, 20, 15, 0.75);
}

.discounts-target-note__icon {
  flex-shrink: 0;
  font-weight: 800;
}

.discounts-target-note--can {
  border-left-color: #b8ff68;
}

.discounts-target-note--can .discounts-target-note__icon {
  color: #4d7a1f;
}

.discounts-target-note--blocked {
  border-left-color: #f87171;
  background: rgba(248, 113, 113, 0.06);
}

.discounts-target-note--blocked .discounts-target-note__icon {
  color: #dc2626;
}

.discounts-target-note--cooldown {
  border-left-color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}

.discounts-target-note--cooldown .discounts-target-note__icon {
  color: #92400e;
}

.discounts-target-note--late {
  border-left-color: rgba(0, 0, 0, 0.25);
  background: rgba(0, 0, 0, 0.03);
}

.discounts-target-note--late .discounts-target-note__icon {
  color: rgba(23, 20, 15, 0.5);
}

/* ── SAVED GAMES PANEL ────────────────────────────────── */
.discounts-games {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.discounts-games__chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(23, 20, 15, 0.65);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.discounts-games__chip:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

.discounts-games__chip.is-active {
  background: #17140f;
  color: #b8ff68;
  border-color: #17140f;
}

.discounts-games__chip-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  cursor: pointer;
  /* neutralize UA <button> chrome — this is a real <button> now (a11y), styled to match the old <span> */
  border: none;
  padding: 0;
  font: inherit;
  line-height: 1;
}

.discounts-games__chip.is-active .discounts-games__chip-delete {
  background: rgba(184, 255, 104, 0.2);
}

/* "+ Add game" reuses .calc-region-add from calc.css for button parity */

.discounts-games__empty {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(23, 20, 15, 0.35);
}

/* Rules section reuses /calc/'s #formulas look directly (serif, off-white, MathJax) */

/* ── SHARE: extra modifiers on top of .calc-share__btn ─ */
.calc-share__btn--telegram:hover {
  color: #17140f;
  background: rgba(36, 161, 222, 0.12);
  border-color: rgba(36, 161, 222, 0.3);
}

.calc-share__btn--ics:hover {
  color: #17140f;
  background: rgba(184, 255, 104, 0.18);
  border-color: rgba(184, 255, 104, 0.4);
}

@media (max-width: 640px) {
  .discounts-row__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ── BETA DISCLAIMER (bottom-of-page footnote) ─────────── */
.discounts-beta-note {
  max-width: 46rem;
  margin: 0 auto;
  padding-top: 3rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
}

.discounts-beta-note__label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #17140f;
  margin-bottom: 1rem;
}

.discounts-beta-note__text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  color: rgba(23, 20, 15, 0.5);
}

@media (min-width: 768px) {
  .discounts-beta-note__text {
    font-size: 1.125rem;
  }
}
