/* use the host pages' :root tokens, not --color-* (casino-styles.css is not loaded there) */

.rank-slot {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--rank-accent, var(--violet));
  box-shadow: 0 0 0 1px rgba(0,0,0,.4) inset, 0 0 14px -4px var(--rank-accent, var(--violet));
}
.rank-slot img {
  width: 30px; height: 30px;
  /* not `pixelated`: these are upscaled sources downscaled at non-integer ratios, which
   * nearest-neighbour samples unevenly */
}
.rank-slot.is-sm { width: 34px; height: 34px; }
.rank-slot.is-sm img { width: 20px; height: 20px; }

.rank-bar {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.07);
}
.rank-bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--rank-accent, var(--violet)) 55%, var(--text)),
    var(--rank-accent, var(--violet)));
  transition: width .5s var(--transition);
}

.vip-progress {
  display: flex; gap: 14px; align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.vip-progress-body { flex: 1; min-width: 0; }
.vip-progress-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 8px;
}
.vip-progress-title { font-size: 17px; font-weight: 700; }
.vip-progress-pct { font-size: 14px; font-weight: 700; color: var(--muted); }
.vip-progress-foot {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 8px;
  font-size: 12px; color: var(--muted);
}

.vip-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  margin-top: 10px;
}
.vip-row-main { flex: 1; min-width: 0; }
.vip-row-title { font-size: 14px; font-weight: 700; }
.vip-row-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.vip-row.is-locked { opacity: .55; }
.vip-row-lock { color: var(--muted); font-size: 14px; }
.vip-row-btn {
  flex: none;
  padding: 9px 18px; border: 0; border-radius: 8px;
  background: var(--violet); color: var(--text);
  font-weight: 700; font-size: 13px; cursor: pointer;
  transition: background .15s var(--transition);
}
.vip-row-btn:hover:not(:disabled) { background: var(--violet-hover); }
.vip-row-btn:disabled { background: var(--panel-2); color: var(--muted); cursor: default; }

/* outlined, not filled: a deadline, not a control; tabular figures stop the countdown jittering */
.vip-row-btn.is-countdown,
.vip-row-btn.is-countdown:disabled {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: .02em;
  min-width: 92px;
  text-align: center;
}

.vip-ladder { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.vip-ladder summary {
  cursor: pointer; font-weight: 700; font-size: 14px; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.vip-ladder summary::-webkit-details-marker { display: none; }
.vip-ladder summary::after { content: '\25BE'; color: var(--muted); }
.vip-ladder[open] summary::after { content: '\25B4'; }
.vip-tier {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.vip-tier:last-child { border-bottom: 0; }
.vip-tier-name { flex: 1; font-size: 13px; font-weight: 600; }
.vip-tier-req { font-size: 12px; color: var(--muted); }
.vip-tier-rate { font-size: 12px; font-weight: 700; color: var(--gold); }
.vip-tier.is-current { background: var(--panel-2); border-radius: 6px; padding: 9px 10px; }

/* index.html's .vip-card family is a different widget; never reuse those names here */
.vip-strip { margin: 0 0 28px; }
.vip-strip-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.vip-strip-card {
  width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
  transition: border-color .15s var(--transition);
}
.vip-strip-card:hover { border-color: var(--rank-accent, var(--violet)); }
.vip-strip-card:focus-visible { outline: 2px solid var(--rank-accent, var(--violet)); outline-offset: 2px; }

.vip-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: inherit;
  font-weight: 700; font-size: 13px; cursor: pointer;
  transition: border-color .15s var(--transition);
}
.vip-btn:hover { border-color: var(--rank-accent, var(--violet)); }
.vip-btn:focus-visible { outline: 2px solid var(--rank-accent, var(--violet)); outline-offset: 2px; }
.vip-btn .rank-slot { width: 28px; height: 28px; border-radius: 999px; }
.vip-btn .rank-slot img { width: 17px; height: 17px; }

/* 1500/1501: above .topbar (1000), .sidebar and chat rail (900); below .modal-overlay (2000) and .tut-overlay (3000) */
.vip-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1500; }
.vip-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 560px; max-width: 92vw;
  /* capped so the panel scrolls inside itself on short viewports */
  max-height: 88vh; overflow-y: auto;
  z-index: 1501;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
/* sticky close button needs the panel's background or rows show through */
.vip-modal-head {
  position: sticky; top: -18px;
  display: flex; align-items: center; justify-content: space-between;
  margin: -18px -18px 16px; padding: 18px;
  background: var(--bg);
  border-radius: 14px 14px 0 0;
}
.vip-modal-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.vip-close { background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; }
.vip-close:hover { color: var(--text); }

.vip-note {
  margin-top: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel);
  font-size: 12px; line-height: 1.45; color: var(--muted);
}
.vip-note strong { color: var(--text); font-weight: 700; }
.vip-note.is-taper { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.vip-note.is-taper strong { color: var(--gold); }
