/* ============================================================
   BWB Game Stats Widget – Dark theme, red accent
   ============================================================ */

.bwb-gsw-game-stats {
  --gsw-bg: #0a0a0a;
  --gsw-panel: #0f0f0f;
  --gsw-surface: #141414;
  --gsw-border: rgba(255, 255, 255, 0.06);
  --gsw-border-focus: rgba(255, 255, 255, 0.1);
  --gsw-text: #fafafa;
  --gsw-muted: #737373;
  --gsw-muted-strong: #a3a3a3;
  --gsw-accent: #e53935;
  --gsw-accent-bright: #ef4444;

  position: relative;
  background: var(--gsw-panel);
  border: 1px solid var(--gsw-border);
  border-radius: 10px;
  padding: 0;
  color: var(--gsw-text);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* Top accent – red bar */
.bwb-gsw-game-stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #c62828 15%,
    var(--gsw-accent-bright) 50%,
    #c62828 85%,
    transparent 100%
  );
  opacity: 1;
  z-index: 11;
}

/* Thumbnail – keep effect */
.bwb-gsw-thumb {
  position: relative;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--gsw-border);
}

.bwb-gsw-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    transparent 35%,
    rgba(0, 0, 0, 0.5) 80%,
    rgba(0, 0, 0, 0.85) 100%
  );
  pointer-events: none;
}

.bwb-gsw-thumb img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.bwb-gsw-thumb-release {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* List – SLOT INFO style: icon left, label above value */
.bwb-gsw-game-stats .bwb-gsw-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-top: 1px solid var(--gsw-border);
}

.bwb-gsw-game-stats .bwb-gsw-list > li {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 14px 6px 12px;
  border-bottom: 1px solid var(--gsw-border);
}

.bwb-gsw-game-stats .bwb-gsw-list > li:last-child {
  border-bottom: none;
}

/* Icon column – left, fixed width, vertically centered; !important to override theme */
.bwb-gsw-game-stats .bwb-gsw-stat-icon {
  flex-shrink: 0;
  width: 36px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em !important;
  line-height: 1;
  color: var(--gsw-muted);
}

.bwb-gsw-game-stats .bwb-gsw-stat-icon i {
  font-size: inherit !important;
}

/* Icon colors (SLOT INFO style) – each icon type unique; !important to override theme */
.bwb-gsw-game-stats .bwb-gsw-icon--rtp        { color: #ec4899 !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--studio     { color: #06b6d4 !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--volatility { color: #3b82f6 !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--maxwin     { color: #f59e0b !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--bet        { color: #22c55e !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--paylines   { color: #a78bfa !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--reels      { color: #f97316 !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--release     { color: #7c3aed !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--rows       { color: #64748b !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--hit        { color: #6366f1 !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--bonus      { color: #8b5cf6 !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--maxfreq    { color: #0ea5e9 !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--rank       { color: #06b6d4 !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--critic     { color: #eab308 !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--user       { color: #14b8a6 !important; }
.bwb-gsw-game-stats .bwb-gsw-icon--default    { color: #94a3b8 !important; }

/* Label + value block – label above value, left-aligned */
.bwb-gsw-game-stats .bwb-gsw-stat-label-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}

.bwb-gsw-game-stats .bwb-gsw-label {
  color: var(--gsw-muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.bwb-gsw-game-stats .bwb-gsw-value {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

/* Legacy: first span in list items (no longer used for stat rows) */
.bwb-gsw-game-stats li > span:first-child {
  color: var(--gsw-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bwb-gsw-game-stats .bwb-gsw-rank-number,
.bwb-gsw-game-stats .bwb-gsw-user-score-badge {
  font-weight: 600;
}

.bwb-gsw-game-stats .bwb-gsw-value .bwb-metric-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.bwb-gsw-game-stats .bwb-gsw-rank-number {
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bwb-gsw-game-stats .bwb-trend-group {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
}

.bwb-gsw-game-stats .bwb-trend-group::before {
  content: "(";
  color: var(--gsw-muted);
}

.bwb-gsw-game-stats .bwb-trend-group::after {
  content: ")";
  color: var(--gsw-muted);
}

.bwb-gsw-game-stats .bwb-trend {
  font-weight: 600;
  white-space: nowrap;
}

.bwb-gsw-game-stats .bwb-trend--up   { color: #4ade80; }
.bwb-gsw-game-stats .bwb-trend--down { color: #f87171; }
.bwb-gsw-game-stats .bwb-trend--flat { color: var(--gsw-muted); }

.bwb-gsw-game-stats .bwb-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gsw-accent);
  color: #fff !important;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  cursor: help;
  margin-left: 4px;
}

/* Score badges */
.bwb-gsw-game-stats .bwb-gsw-user-score-badge,
.bwb-gsw-game-stats .bwb-gsw-critic-score-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3px 10px !important;
  min-width: 32px !important;
  height: 24px !important;
  box-sizing: border-box !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0.02em !important;
  border-radius: 6px !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  margin: 0 !important;
  vertical-align: middle !important;
}

.bwb-gsw-game-stats .bwb-gsw-user-score-badge.bwb-score--red,
.bwb-gsw-game-stats .bwb-gsw-critic-score-badge.bwb-score--red {
  background: #ff6874 !important;
  color: #0a0a0a !important;
}

.bwb-gsw-game-stats .bwb-gsw-user-score-badge.bwb-score--amber,
.bwb-gsw-game-stats .bwb-gsw-critic-score-badge.bwb-score--amber {
  background: #f39c12 !important;
  color: #0a0a0a !important;
}

.bwb-gsw-game-stats .bwb-gsw-user-score-badge.bwb-score--green,
.bwb-gsw-game-stats .bwb-gsw-critic-score-badge.bwb-score--green {
  background: #27ae60 !important;
  color: #0a0a0a !important;
}

.bwb-gsw-game-stats .bwb-gsw-user-score-badge.bwb-score--na,
.bwb-gsw-game-stats .bwb-gsw-critic-score-badge.bwb-score--na {
  background: transparent !important;
  color: var(--gsw-muted) !important;
  font-weight: 500 !important;
  padding: 0 !important;
  min-width: 0 !important;
  height: auto !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: inline !important;
}

/* Critic & User score rows – same layout as others, slight background */
.bwb-gsw-game-stats .bwb-gsw-game-stats__critic-score,
.bwb-gsw-game-stats .bwb-gsw-game-stats__user-score {
  background: var(--gsw-surface);
}

.bwb-gsw-game-stats .bwb-gsw-value .bwb-gsw-score-label {
  margin-left: 6px;
}

/* Provider links in value cell */
.bwb-gsw-game-stats__studio .bwb-gsw-value a {
  font-weight: 600;
  color: #fff !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.bwb-gsw-game-stats__studio .bwb-gsw-value a:hover {
  color: var(--gsw-accent-bright) !important;
  text-decoration: none;
}

.bwb-gsw-game-stats__studio .bwb-gsw-value .bwb-ext-icon-img {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 4px;
  vertical-align: middle;
  opacity: 0.8;
}

.bwb-gsw-game-stats li::marker {
  content: none !important;
}
