/* Points System Styles
   ----------------------------------------------------------------------------
   MONOCHROME AND COMPACT. This sheet used to be the last gold-leaf surface on
   the platform: an amber radial wash on the modal, a brown-to-white gradient
   slab behind the balance, a #ffd700 coin, a gold "Claim" pill and a green
   "Already Claimed" one — on a black-and-white theme it read as a different
   product. It was also enormous: a 960px dialog with 24px padding inside 24px
   padding and a 4rem balance, so a single number needed most of a laptop screen.

   The rules now: surfaces come from --surface-*, ink from --ink*, the one filled
   button is --brand-fill/--brand-ink, and coloured literals survive ONLY where
   they carry meaning (the admin Add/Remove buttons — a destructive action must
   not look like a safe one). Keep it that way. */
#userPointsModal .modal-dialog {
  max-width: 560px;
}

#userPointsModal .modal-content.user-points-modal-content {
  background: var(--surface-overlay);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

#userPointsModal .user-points-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-overlay);
}

#userPointsModal .modal-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 0 auto;
  text-align: right;
}

#userPointsModal .user-points-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--surface-sunken);
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#userPointsModal .user-points-back-btn i {
  font-size: 1.15rem;
  line-height: 1;
}

#userPointsModal .user-points-back-btn:hover {
  background: var(--glass-strong);
  color: var(--ink);
  transform: translateX(-1px);
}

#userPointsModal .user-points-modal-body {
  padding-bottom: 8px;
}

.points-container {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  color: var(--ink);
  margin-bottom: 12px;
}

/* Legacy two-column overview. Kept because older markup elsewhere still uses
   it; the coins modal now uses the balance strip + action stack below. */
.points-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(230px, 1.1fr);
  gap: 12px;
  align-items: stretch;
}

.points-overview-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* The balance is a fixed-height strip: coin on the left, label and figure
   beside it. NO `min-height: 100%`, no vertical centring against a parent that
   has no height of its own — that combination is what let a single number
   stretch over the entire modal body and push the tabs below the fold. */
.points-balance {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-overlay);
  text-align: left;
}

.points-balance-coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-sunken);
}

.points-balance-figure {
  min-width: 0;
}

.points-balance-kicker {
  margin-bottom: 3px;
  line-height: 1;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.points-balance h2 {
  font-size: clamp(1.5rem, 3.4vw, 1.9rem);
  margin: 0;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.points-balance .points-label {
  font-size: 0.82rem;
  color: var(--ink-muted);
  opacity: 1;
  margin-top: 4px;
}

/* The coin glyph is ink, not gold. It sits beside the number as punctuation,
   not as a second focal point competing with it. */
.points-icon {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1;
}

/* Daily Bonus Section */
.daily-bonus {
  display: flex;
  align-items: center;
  background: var(--surface-overlay);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.daily-bonus-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.daily-bonus-header strong {
  display: block;
  font-size: 0.92rem;
}

.streak-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-sunken);
  color: var(--ink-soft);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 4px;
}

/* `.coin-send-open` rides along on the pill styling but is NOT a `.bonus-btn`.
   user-points.js delegates `click` on `.bonus-btn` straight to claimDailyBonus(),
   so wearing that class would make "Send" try to claim the daily bonus as well. */
.bonus-btn,
.coin-send-open {
  background: var(--brand-fill);
  border: none;
  color: var(--brand-ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.bonus-btn:hover:not(:disabled),
.coin-send-open:hover:not(:disabled) {
  background: var(--brand-fill-hover);
  transform: translateY(-1px);
}

/* Claimed is a STATE, not a success event — it reads as a spent, disabled pill
   rather than a green badge asking to be pressed again. */
.bonus-claimed,
.bonus-btn.bonus-claimed:hover:not(:disabled) {
  background: var(--surface-sunken);
  color: var(--ink-muted);
  border: 1px solid var(--line);
  transform: none;
}

.points-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-overlay);
  border: 1px solid var(--line);
}

.points-action-copy {
  min-width: 0;
}

.points-action-copy strong {
  display: block;
  margin-bottom: 4px;
}

/* ── Send coins to another account ─────────────────────────────────────────
   The panel behind the "Send" action card. It sits INSIDE the coins modal
   rather than being a second modal on top of it — stacking Bootstrap dialogs
   fights the backdrop, and this one is short enough to belong in the sheet.

   Every colour here is a token. The coins sheet is covered by
   __tests__/coins-modal-contrast.test.js precisely because a hex literal in this
   file (or in the JS that renders into it) is a colour no re-skin and no theme
   checker can reach. See docs/COIN_TRANSFER.md. */
.coin-send {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
}

.coin-send[hidden] { display: none; }

.coin-send-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.coin-send-x {
  background: none;
  border: none;
  color: var(--ink-muted);
  padding: 2px 4px;
  line-height: 1;
  cursor: pointer;
}

.coin-send-x:hover { color: var(--ink); }

.coin-send-field { margin-bottom: 12px; }

.coin-send-label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* `!important` matches the sibling rule for the admin debug fields below: the
   global `.form-control` rule in the platform sheet is itself `!important`, and
   these inputs sit in the same modal. */
.coin-send-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line) !important;
  background: var(--surface-sunken) !important;
  color: var(--ink) !important;
  font-size: 0.9rem;
}

.coin-send-input::placeholder { color: var(--ink-muted); }

.coin-send-input:focus {
  outline: none;
  border-color: var(--line-strong) !important;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.coin-send-amount-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-send-input-num {
  flex: 1 1 auto;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.coin-send-max {
  flex: 0 0 auto;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.coin-send-max:hover { background: var(--glass-strong); color: var(--ink); }

.coin-send-help {
  display: block;
  margin-top: 5px;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

/* Resolved / refused. Status colours, because they carry meaning rather than
   brand — "goes to Luna" and "no account matches that" must not read alike. */
.coin-send-help.is-ok { color: var(--status-success); }
.coin-send-help.is-bad { color: var(--status-danger); }

/* The picker. Absolutely positioned inside a scrollable modal body, so the
   wrapper is what it is measured against. */
.coin-send-suggest-wrap { position: relative; }

.coin-send-suggest {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-overlay);
  box-shadow: var(--shadow-md);
}

.coin-send-suggest[hidden] { display: none; }

.coin-send-hit {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}

.coin-send-hit:hover,
.coin-send-hit.is-active { background: var(--glass); }

.coin-send-hit img,
.coin-send-hit-blank {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-sunken);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.coin-send-hit-text { min-width: 0; }

.coin-send-hit-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-send-hit-meta {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.coin-send-suggest-note {
  padding: 10px 11px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.coin-send-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--wash);
  border: 1px solid var(--line-soft);
  font-size: 0.76rem;
  color: var(--ink-soft);
}

.coin-send-error {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--status-danger);
}

.coin-send-error[hidden] { display: none; }

.coin-send-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.coin-send-cancel {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 6px;
  cursor: pointer;
}

.coin-send-cancel:hover { color: var(--ink); }

.coin-send-go {
  background: var(--brand-fill);
  border: none;
  color: var(--brand-ink);
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.coin-send-go:hover:not(:disabled) {
  background: var(--brand-fill-hover);
  transform: translateY(-1px);
}

.coin-send-go:disabled {
  background: var(--surface-sunken);
  color: var(--ink-disabled);
  cursor: not-allowed;
  transform: none;
}

.subscriber-bonus-card {
  border-width: 1px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-raised);
}

.subscriber-bonus-card .card-body {
  padding: 16px;
}

.admin-points-panel {
  border-radius: 14px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
}

/* The debug fields inherit the global .form-control rule, which is `!important`
   throughout and leaves them a --surface-sunken well on a --surface-raised panel:
   two greys one step apart, so the field edge disappears. Pin them to the page
   surface with a real border. Both background and colour are stated outright —
   a field that leaves either to the UA is a field a browser in dark mode is
   free to repaint as a black box. */
#userPointsModal .admin-points-panel .form-control {
  background: var(--surface-page) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 12px !important;
  min-height: 38px !important;
  padding: 0.45rem 0.7rem !important;
  font-size: 0.85rem !important;
  box-shadow: none !important;
}

#userPointsModal .admin-points-panel .form-control::placeholder {
  color: var(--ink-muted) !important;
}

#userPointsModal .admin-points-panel .form-control:focus {
  background: var(--surface-page) !important;
  border-color: var(--ink) !important;
  box-shadow: 0 0 0 3px var(--focus-ring) !important;
  transform: none !important;
}

#userPointsModal .admin-points-panel .form-label {
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--ink-soft);
}

#userPointsModal .admin-points-panel .text-muted {
  color: var(--ink-soft) !important;
}

.points-tabs-shell {
  padding-top: 4px;
}

#userPointsModal .nav-tabs {
  gap: 8px;
}

#userPointsModal .nav-tabs .nav-link {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--surface-sunken);
}

#userPointsModal .nav-tabs .nav-link.active {
  color: var(--brand-ink);
  background: var(--brand-fill);
}

#userPointsModal .buy-points-container,
#userPointsModal .points-history,
#userPointsModal .leaderboard {
  border-radius: 20px;
}

#userPointsModal .buy-points-container {
  padding: 8px 4px 0;
}

#userPointsModal .accordion-item {
  background: transparent;
  border-color: var(--line);
}

#userPointsModal .accordion-button {
  background: var(--glass);
  color: var(--text-primary, #000000);
}

#userPointsModal .accordion-button:not(.collapsed) {
  background: var(--glass-strong);
  color: var(--text-primary, #000000);
  box-shadow: none;
}

#userPointsModal .accordion-button:focus {
  box-shadow: none;
}

#userPointsModal .accordion-body {
  color: var(--text-secondary, #4e4e4e);
}

#userPointsModal .user-points-modal-footer {
  background: var(--surface-overlay);
  border-top: 1px solid var(--line);
  padding: 10px 16px 12px;
}

/* Points History */
.points-history {
  background: var(--bg-secondary, #d2d2d2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  border: 1px solid var(--glass-border, rgba(119, 119, 119, 0.2));
}

.points-history-header {
  background: var(--bg-primary, #e5e5e5);
  padding: 15px 20px;
  border-bottom: 1px solid var(--glass-border, rgba(119, 119, 119, 0.2));
  font-weight: bold;
  color: var(--text-primary, #000000);
}

.points-history-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--glass-border, rgba(119, 119, 119, 0.1));
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.points-history-item:hover {
  background-color: var(--glass-strong);
}

.points-history-item:last-child {
  border-bottom: none;
}

.transaction-info {
  flex: 1;
}

.transaction-reason {
  font-weight: 500;
  color: var(--text-primary, #000000);
  margin-bottom: 2px;
}

.transaction-meta {
  font-size: 0.85rem;
  color: var(--text-secondary, #4e4e4e);
}

.transaction-amount {
  font-weight: bold;
  font-size: 1.1rem;
  padding: 5px 10px;
  border-radius: 20px;
  min-width: 80px;
  text-align: center;
}

.transaction-amount.credit {
  color: #28a745;
  background-color: rgba(40, 167, 69, 0.1);
}

.transaction-amount.debit {
  color: #901924;
  background-color: rgba(144, 25, 36, 0.1);
}

/* Leaderboard */
.leaderboard {
  background: var(--bg-secondary, #d2d2d2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  border: 1px solid var(--glass-border, rgba(119, 119, 119, 0.2));
}

.leaderboard-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--glass-border, rgba(119, 119, 119, 0.1));
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
}

.leaderboard-item:hover {
  background-color: var(--glass-strong);
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.leaderboard-rank {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-secondary, #4e4e4e);
  margin-right: 15px;
  min-width: 30px;
}

.leaderboard-rank.first {
  color: var(--ink);
}

.leaderboard-rank.second {
  color: var(--ink-soft);
}

/* Medal ranks read as weight, not metal: black / grey / light grey. Gold and
   bronze were the last two hues in here and they only said "1st" and "3rd",
   which the number already says. */
.leaderboard-rank.third {
  color: var(--ink-muted);
}

.leaderboard-user {
  flex: 1;
  display: flex;
  align-items: center;
}

.leaderboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
  object-fit: cover;
}

.leaderboard-name {
  font-weight: 500;
  color: var(--text-primary, #000000);
}

.leaderboard-points {
  font-weight: bold;
  color: var(--primary-light, #232323);
  font-size: 1.1rem;
}

/* Points Widget (for display in other pages) */
.points-widget {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(45deg, #707070, #9a9a9a);
  color: var(--ink);
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.points-widget:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.points-widget .points-icon {
  margin-right: 5px;
}

/* Daily Rewards Calendar Modal Styles */
.daily-rewards-header {
  background: linear-gradient(to bottom right, #000000, #292929);
  border: none;
  padding: 20px 24px;
}

.daily-rewards-icon {
  background: var(--glass-strong);
  border-radius: 50%;
  padding: 15px;
  backdrop-filter: blur(10px);
}

.current-streak-banner {
  background: var(--bg-tertiary, rgba(0, 0, 0, 0.05));
  border-bottom: 1px solid var(--glass-border, rgba(119, 119, 119, 0.2));
}

.streak-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.streak-flame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.streak-flame i {
  position: relative;
  z-index: 1;
}

.streak-count {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--scrim-strong);
  color: #de3b00;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Streak Container */
.streak-container {
  padding: 24px;
  min-height: 400px;
}

.streak-header {
  text-align: center;
  margin-bottom: 30px;
}

/* Streak Grid */
.streak-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  max-width: 100%;
  margin: 0 auto;
}

/* Streak Day Cards */
.streak-day {
  background: var(--glass-bg, rgba(0, 0, 0, 0.05));
  border: 2px solid var(--glass-border, rgba(119, 119, 119, 0.2));
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text-primary, #000000);
}

.streak-day:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Streak Day States */
.streak-day.completed {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-color: #28a745;
  color: var(--ink);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.16);
}

.streak-day.current {
  background: var(--brand-fill);
  border-color: var(--brand-fill);
  color: var(--brand-ink);
  animation: pulseStreak 2s infinite;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.streak-day.future {
  background: var(--glass-bg, rgba(0, 0, 0, 0.03));
  border-color: var(--glass-border, rgba(119, 119, 119, 0.1));
  color: var(--text-secondary, #4e4e4e);
  opacity: 0.7;
}

/* Streak Day Content */
.streak-day-number {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.streak-icon {
  font-size: 1.5rem;
  margin: 4px 0;
}

.streak-points {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 4px;
}

.streak-points small {
  font-size: 0.7rem;
  opacity: 0.8;
}

/* Streak Bonus Indicators */
.streak-bonus-indicator {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #bf3300;
  color: var(--status-ink);
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  z-index: 2;
}

.streak-bonus-indicator.weekly {
  background: var(--brand-fill);
  color: var(--brand-ink);
}

.streak-bonus-indicator.final {
  background: linear-gradient(135deg, #919191 0%, #828282 100%);
  color: var(--ink);
  width: 30px;
  height: 30px;
  font-size: 1rem;
}

/* Next Reward Display */
.next-reward {
  text-align: center;
}

.next-reward-preview {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 15px;
  display: inline-block;
  margin-top: 5px;
}

.reward-amount {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--ink);
}

/* Today's Reward Section */
.todays-reward-section {
  background: linear-gradient(135deg, var(--bg-tertiary, rgba(0, 0, 0, 0.05)) 0%, rgba(40, 167, 69, 0.1) 100%);
  border-top: 3px solid #28a745;
}

.todays-reward-info h6 {
  color: #28a745;
  font-weight: 600;
}

.reward-details {
  margin: 15px 0;
}

.reward-points {
  background: rgba(40, 167, 69, 0.1);
  border-radius: 12px;
  padding: 8px 16px;
  display: inline-block;
  margin-right: 10px;
}

.reward-bonus-text {
  margin-top: 8px;
  font-style: italic;
}

/* Claim Button */
.claim-todays-reward {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.16);
  transition: all 0.3s ease;
  color: var(--ink);
  min-height: 48px;
  min-width: 140px;
}

.claim-todays-reward:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  color: var(--ink);
}

.claim-todays-reward:disabled {
  background: var(--fill-mid);
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

/* Fix for modal scrolling issues */
#dailyRewardsModal .modal-dialog {
  height: calc(100% - 60px);
  margin-top: 30px;
  margin-bottom: 30px;
}

#dailyRewardsModal .modal-content {
  max-height: 100%;
}

#dailyRewardsModal .modal-body {
  overflow-y: auto;
  /* remove the scroll‐contain that snaps back */
  overscroll-behavior: auto;
  /* enable smooth/native touch scrolling on iOS/Chrome */
  -webkit-overflow-scrolling: touch;
}

/* Prevent content from jumping around during interactions */
.streak-container {
  min-height: 480px;
  position: relative;
}

/* Prevent scroll jumping */
.streak-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  max-width: 100%;
  margin: 0 auto;
}

/* Ensure the claim button doesn't cause layout shifts */
.claim-todays-reward {
  min-height: 48px;
  min-width: 140px;
}

/* Animations */
@keyframes pulseStreak {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  }
  50% {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
  }
}

@keyframes streakComplete {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.streak-day.completing {
  animation: streakComplete 0.6s ease-out;
}

/* Responsive Design for Streak Grid */
@media (max-width: 768px) {
  #userPointsModal .modal-dialog {
    margin: 0.75rem;
  }

  #userPointsModal .user-points-modal-header {
    padding: 10px 14px;
  }

  #userPointsModal .user-points-back-btn {
    width: 32px;
    height: 32px;
  }

  .points-container {
    padding: 12px;
  }

  .points-overview-grid {
    grid-template-columns: 1fr;
  }

  .points-balance {
    padding: 10px 12px;
  }

  .daily-bonus-header,
  .points-action-card {
    flex-direction: column;
    align-items: stretch;
  }

  .bonus-btn,
  .points-action-card .btn {
    width: 100%;
  }

  .streak-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }
  
  .streak-day {
    padding: 8px 4px;
    min-height: 80px;
  }
  
  .streak-day-number {
    font-size: 1rem;
  }
  
  .streak-icon {
    font-size: 1.2rem;
  }
  
  .streak-points {
    font-size: 0.7rem;
  }
  
  .streak-bonus-indicator {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }
  
  .streak-bonus-indicator.final {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
  }
  
  .streak-info {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .next-reward {
    text-align: center !important;
    margin-top: 15px;
  }
}

@media (max-width: 576px) {
  #userPointsModal .modal-content.user-points-modal-content {
    border-radius: 20px;
  }

  #userPointsModal .modal-title {
    font-size: 1rem;
  }

  #userPointsModal .user-points-modal-footer {
    padding: 12px 18px 16px;
  }

  .streak-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  
  .streak-day {
    padding: 6px 3px;
    min-height: 70px;
  }
  
  .streak-day-number {
    font-size: 0.9rem;
  }
  
  .streak-icon {
    font-size: 1rem;
  }
  
  .streak-points {
    font-size: 0.65rem;
  }
  
  .streak-container {
    padding: 16px;
  }
}

/* Animation for point changes */
@keyframes pointsUpdate {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
    color: var(--ink);
  }
  100% {
    transform: scale(1);
  }
}

.points-updated {
  animation: pointsUpdate 0.6s ease-in-out;
}

/* Loading states */
.points-loading {
  opacity: 0.6;
  pointer-events: none;
}

.points-skeleton {
  background: linear-gradient(90deg, #0f0f0f 25%, #1f1f1f 50%, #0f0f0f 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Daily Bonus Notification Styles */
.daily-bonus-notification {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.daily-bonus-notification.show {
  opacity: 1;
  visibility: visible;
}

.daily-bonus-notification.hiding {
  opacity: 0;
  transform: scale(0.8);
}

.daily-bonus-container {
  background: linear-gradient(135deg, #d35500 0%, #e00000 50%, #b66c00 100%);
  border: 3px solid var(--line-strong);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.06);
}

.daily-bonus-calendar {
  position: relative;
  font-size: 3rem;
  color: var(--ink);
  animation: bounceIn 0.8s ease-out;
}

.calendar-day {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  font-weight: bold;
  color: #f40000;
  background: var(--brand-fill);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dayBounce 1.5s ease-out;
}

.streak-fire {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 2rem;
  color: #c80000;
  opacity: 0;
  transition: all 0.3s ease;
}

.streak-fire.active {
  opacity: 1;
  animation: fireFlicker 1.5s infinite;
}

.streak-number {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--brand-fill);
  color: #f10000;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.streak-info {
  background: var(--scrim-soft);
  border-radius: 20px;
  padding: 8px 15px;
  margin-top: 10px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

/* Special Reward Notification Styles */
.special-reward-notification {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.special-reward-notification.show {
  opacity: 1;
  visibility: visible;
}

.special-reward-notification.hiding {
  opacity: 0;
  transform: scale(0.8);
}

.reward-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--veil-strong);
  backdrop-filter: blur(5px);
}

/* The card is an overlay surface, not a grey plate. It used to be a
   #707070→#9a9a9a gradient carrying --ink (black) copy — roughly 4:1 for the
   title and worse for everything layered on it, so "Milestone Achieved!", the
   trophy and the coin count all read as grey-on-grey. */
.reward-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: var(--surface-overlay);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.special-reward-notification.show .reward-container,
.daily-bonus-notification.show .reward-container {
  transform: translate(-50%, -50%) scale(1);
}

.reward-content {
  text-align: center;
  color: var(--ink);
  position: relative;
  z-index: 2;
}

.reward-icon-container {
  position: relative;
  margin-bottom: 20px;
  height: 80px;
}

.reward-main-icon {
  font-size: 3rem;
  color: var(--ink);
  animation: bounceIn 0.8s ease-out;
}

.reward-star {
  position: absolute;
  color: var(--ink);
  font-size: 1.2rem;
  animation: twinkle 2s infinite;
}

.star-1 {
  top: 10px;
  left: 20px;
  animation-delay: 0.2s;
}

.star-2 {
  top: 5px;
  right: 30px;
  animation-delay: 0.5s;
}

.star-3 {
  bottom: 10px;
  left: 30px;
  animation-delay: 0.8s;
}

/* No text-shadow: these are dark headings on a light card now, and a dark blur
   under dark type is a smudge, not a lift. */
.reward-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.reward-message {
  font-size: 1.1rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

.reward-points {
  background: var(--surface-sunken);
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 15px;
}

.points-earned {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--ink);
  animation: pointsGlow 2s infinite alternate;
}

.points-label {
  display: block;
  font-size: 1rem;
  opacity: 0.8;
  margin-top: 5px;
}

.reward-meta {
  font-size: 0.9rem;
  opacity: 0.7;
}

.reward-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--surface-sunken);
  border: none;
  color: var(--ink);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.reward-close-btn:hover {
  background: var(--surface-raised);
  transform: scale(1.1);
}

/* The "Play Sound" fallback ships as Bootstrap's .btn-outline-light — white
   type on a white outline, i.e. invisible on the light card. Give it the
   card's own ink instead of touching the markup in three places. */
.special-reward-notification .btn-outline-light,
.daily-bonus-notification .btn-outline-light {
  color: var(--ink);
  border-color: var(--line-strong);
}

.special-reward-notification .btn-outline-light:hover,
.special-reward-notification .btn-outline-light:focus,
.daily-bonus-notification .btn-outline-light:hover,
.daily-bonus-notification .btn-outline-light:focus {
  background: var(--surface-sunken);
  border-color: var(--line-strong);
  color: var(--ink);
}

/* ──────────────────────────────────────────────────────────────
   Compact reward modal — top-centered, no backdrop, 16:9 card.
   Shared by the milestone (.special-reward-notification) and the
   daily-bonus (.daily-bonus-notification) modals so both use the
   same compact landscape design.
   ────────────────────────────────────────────────────────────── */
.special-reward-notification,
.daily-bonus-notification {
  /* Let clicks pass through the empty area so the modal isn't intrusive */
  pointer-events: none;
}

.special-reward-notification.hiding,
.daily-bonus-notification.hiding {
  /* Fade + slide up instead of shrinking from center */
  transform: none;
}

/* No dimming/blur backdrop for these modals */
.special-reward-notification .reward-backdrop,
.daily-bonus-notification .reward-backdrop {
  display: none;
}

.special-reward-notification .reward-container,
.daily-bonus-notification .reward-container {
  pointer-events: auto;
  top: 16px;
  left: 50%;
  bottom: auto;
  transform: translateX(-50%) translateY(-14px) scale(0.97);
  width: 420px;
  max-width: calc(100vw - 32px);
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 32px);
  padding: 18px 22px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

.special-reward-notification.show .reward-container,
.daily-bonus-notification.show .reward-container {
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Landscape (16:9) layout: icon on the left, text on the right */
.special-reward-notification .reward-content,
.daily-bonus-notification .reward-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  text-align: left;
  width: 100%;
}

/* One icon, centred in its own disc. The twinkling stars and drifting confetti
   that used to share this box are gone — on a 420px landscape card they fought
   the trophy for the same corner and left nothing for the eye to land on. */
.special-reward-notification .reward-icon-container,
.daily-bonus-notification .reward-icon-container {
  flex: 0 0 auto;
  height: 56px;
  width: 56px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--veil-strong, rgba(0, 0, 0, 0.05));
  border: 1px solid var(--line-soft, rgba(0, 0, 0, 0.08));
}

.special-reward-notification.is-milestone .reward-icon-container {
  border-color: rgba(187, 125, 0, 0.45);
  background: rgba(187, 125, 0, 0.14);
}

.special-reward-notification.is-milestone .reward-main-icon {
  color: #d79000;
}

.special-reward-notification .reward-text,
.daily-bonus-notification .reward-text {
  flex: 1 1 auto;
  min-width: 0;
}

.special-reward-notification .reward-main-icon,
.daily-bonus-notification .reward-main-icon,
.daily-bonus-notification .daily-bonus-calendar {
  font-size: 2.2rem;
}

.special-reward-notification .reward-title,
.daily-bonus-notification .reward-title {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.special-reward-notification .reward-message,
.daily-bonus-notification .reward-message {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.special-reward-notification .reward-points,
.daily-bonus-notification .reward-points {
  padding: 8px 12px;
  margin-bottom: 0;
}

.special-reward-notification .points-earned,
.daily-bonus-notification .points-earned {
  font-size: 1.7rem;
}

/* Keep the daily-bonus streak meta/info compact in the landscape card */
.daily-bonus-notification .reward-meta,
.daily-bonus-notification .streak-info {
  font-size: 0.8rem;
  margin-top: 6px;
  padding: 4px 10px;
}

.special-reward-notification .reward-close-btn,
.daily-bonus-notification .reward-close-btn {
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
}

.reward-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  /* Decorative confetti on a light card — full-strength ink reads as specks
     of dirt over the copy it drifts past. */
  background: var(--line-strong);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 3s infinite;
}

.particle-1 { left: 10%; animation-delay: 0.2s; }
.particle-2 { left: 25%; animation-delay: 0.8s; }
.particle-3 { left: 50%; animation-delay: 0.4s; }
.particle-4 { left: 75%; animation-delay: 1.2s; }
.particle-5 { left: 85%; animation-delay: 0.6s; }
.particle-6 { left: 40%; animation-delay: 1.0s; }

/* Notification Animation Keyframes */
@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* The coin count breathes rather than glows: a shadow-based glow needs a dark
   card to read against, and this card is light. */
@keyframes pointsGlow {
  0% { opacity: 0.82; }
  100% { opacity: 1; }
}

@keyframes particleFloat {
  0% { transform: translateY(100%); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(-100%); opacity: 0; }
}

/* Daily Bonus Specific Animation Keyframes */
@keyframes calendarPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes dayBounce {
  0% { transform: translate(-50%, -50%) scale(0); }
  60% { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes fireFlicker {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  25% { transform: scale(1.1) rotate(2deg); }
  50% { transform: scale(0.95) rotate(-1deg); }
  75% { transform: scale(1.05) rotate(1deg); }
}

/* ============================================================================
   COIN PACKS + AUTO TOP-UP  —  markup comes from public/js/buy-points.js
   ----------------------------------------------------------------------------
   These two surfaces were the last part of the coins sheet still painting its
   own colours from JS: a hardcoded #d9d9d9→#cbcbcb slab wearing Bootstrap's
   .text-white / .text-white-50, left over from when the modal was dark. On the
   white theme that meant white-on-light-grey — the pack unit ("COINS"), the
   struck-through original price, the auto top-up subtitle and every field label
   were effectively invisible.

   Everything below comes from tokens, and the JS emits classes only. The
   `!important`s are not decoration: .btn in overwrite-bootstrap.css sets
   background/border/radius with !important, so a filled button here can only
   win on specificity + !important.
   ============================================================================ */

/* --- Pack card -------------------------------------------------------------
   Scoped to #userPointsModal and `!important` on the paint: this sheet loads
   BEFORE style.css / overwrite-bootstrap.css, whose `.card` rule sets
   background, border, radius and shadow with !important. Plain `.buy-points-card`
   loses that tie on source order — which is why the old markup carried inline
   styles and `border-0`. Specificity is how it wins now, not inline colour. */
#userPointsModal .buy-points-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 14px 12px 12px;
  text-align: center;
  background: var(--surface-raised) !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

#userPointsModal .buy-points-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10) !important;
}

#userPointsModal .buy-points-card:active {
  transform: translateY(-1px);
}

#userPointsModal .buy-points-card.border-primary {
  border-color: var(--line-strong) !important;
  box-shadow: 0 0 0 2px var(--line-strong) !important;
}

/* Popular / discount flags share a row — they used to be absolutely positioned
   at the same coordinates, so a pack that was both rendered one over the other.
   The row is always present, empty or not, so a flagless pack's coin and price
   still sit at the same height as its neighbours'. */
.buy-points-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 22px;
  margin-bottom: 2px;
}

.buy-points-flag {
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.buy-points-flag.is-popular {
  background: var(--brand-fill);
  color: var(--brand-ink);
}

.buy-points-flag.is-deal {
  background: var(--surface-sunken);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.buy-points-coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
}

.buy-points-coin img {
  width: 28px;
  height: 28px;
}

.buy-points-amount {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.buy-points-unit {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.buy-points-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 8px;
}

.buy-points-price-now {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.buy-points-price-was {
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-decoration: line-through;
}

.buy-points-card .buy-points-buy {
  width: 100%;
  margin-top: auto;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.82rem !important;
  background: var(--brand-fill) !important;
  color: var(--brand-ink) !important;
  border: 1px solid transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.buy-points-card .buy-points-buy:hover {
  background: var(--brand-fill-hover) !important;
  color: var(--brand-ink) !important;
}

.buy-points-card .buy-points-buy:disabled {
  background: var(--surface-sunken) !important;
  color: var(--ink-muted) !important;
}

/* --- Auto top-up panel --------------------------------------------------- */
.auto-topup-panel {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  color: var(--ink);
}

.auto-topup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.auto-topup-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.auto-topup-status {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* On is a state, not a success event — same rule the daily-bonus pill follows. */
.auto-topup-status.is-on {
  background: var(--brand-fill);
  color: var(--brand-ink);
}

.auto-topup-status.is-off {
  background: var(--surface-sunken);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.auto-topup-subtitle {
  margin: 0 0 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.auto-topup-field {
  margin-bottom: 14px;
}

.auto-topup-field.is-locked {
  opacity: 0.55;
  pointer-events: none;
}

.auto-topup-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* One joined control: the wrapper draws the border, the input is transparent
   inside it and the unit sits behind a divider. Previously the input carried
   the global .form-control pill radius and the unit was a separate Bootstrap
   .input-group-text, so the two never lined up. */
.auto-topup-threshold {
  display: inline-flex;
  align-items: stretch;
  max-width: 220px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-page);
}

.auto-topup-threshold:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.auto-topup-input {
  width: 110px;
  min-width: 0;
  padding: 8px 10px;
  font-size: 0.9rem;
  font-weight: 600;
  /* Opaque, never transparent: a see-through field is what let the browser's own
     dark field paint show through and turn this into a black box. */
  background: var(--surface-page);
  color: var(--ink);
  border: 0;
  outline: none;
}

.auto-topup-unit {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface-sunken);
  border-left: 1px solid var(--line);
}

.auto-topup-packs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.auto-topup-panel .auto-topup-pack {
  padding: 0.35rem 0.8rem !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  background: var(--surface-sunken) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.auto-topup-panel .auto-topup-pack:hover {
  border-color: var(--line-strong) !important;
}

.auto-topup-panel .auto-topup-pack.active {
  background: var(--brand-fill) !important;
  color: var(--brand-ink) !important;
  border-color: transparent !important;
}

/* currentColor so the price stays legible on both the plain and the filled chip. */
.auto-topup-pack-price {
  margin-left: 5px;
  opacity: 0.7;
}

.auto-topup-panel .auto-topup-action {
  display: block;
  width: 100%;
  padding: 0.55rem 0.95rem !important;
  font-size: 0.85rem !important;
  background: var(--brand-fill) !important;
  color: var(--brand-ink) !important;
  border: 1px solid transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.auto-topup-panel .auto-topup-action:hover {
  background: var(--brand-fill-hover) !important;
  color: var(--brand-ink) !important;
}

/* Outlined, but on the panel's own surface rather than `transparent`: a
   see-through button inherits whatever is behind it, and states a pair
   (--ink on --brand-fill, from the rule above) that is black on black. */
.auto-topup-panel .auto-topup-action.is-secondary {
  background: var(--surface-raised) !important;
  color: var(--ink) !important;
  border-color: var(--line-strong) !important;
}

.auto-topup-panel .auto-topup-action.is-secondary:hover {
  background: var(--surface-sunken) !important;
  color: var(--ink) !important;
}

.auto-topup-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.76rem;
  color: var(--ink-soft);
}

.auto-topup-note.is-error {
  color: var(--danger-color, #d50b0b);
}
