/* ═══════════════════════════════════════════════════════════════════
   DFS Casino Hubs — slot-demo-player.css
   Inherits all --bg / --accent / --text tokens from DFS theme.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Wrapper & grid ──────────────────────────────────────────────── */
.dfsh-player-wrap {
  margin-bottom: 28px;
  font-family: var(--font, 'Outfit', system-ui, sans-serif);
}

.dfsh-player-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0;
  background: var(--bg-card, #12121a);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: var(--radius, 12px);
  overflow: hidden;
}

/* ── Main demo column ────────────────────────────────────────────── */
.dfsh-player-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--border, rgba(255,255,255,.08));
}

/* Iframe container: 16:9 */
.dfsh-player-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  flex-shrink: 0;
}

.dfsh-player-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.dfsh-player-no-demo {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #0d1b3e, #16213e);
  color: rgba(255,255,255,.4);
  font-size: .85rem;
}
.dfsh-player-no-demo-icon { font-size: 2.5rem; }

/* Info bar below the iframe */
.dfsh-player-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  flex: 1;
  background: var(--bg-card, #12121a);
  min-height: 0;
}

.dfsh-player-info-left { flex: 1; min-width: 0; }

.dfsh-player-slot-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text, #f0f0f5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
  line-height: 1.2;
}

.dfsh-player-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.dfsh-player-provider {
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent, #7c3aed);
  background: rgba(124,58,237,.1);
  border: 1px solid rgba(124,58,237,.2);
  padding: 2px 8px;
  border-radius: 4px;
}

.dfsh-player-tag {
  font-size: .7rem;
  color: rgba(240,240,245,.5);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  padding: 2px 7px;
  border-radius: 4px;
}

.dfsh-player-blurb {
  font-size: .8rem;
  color: rgba(240,240,245,.55);
  line-height: 1.6;
  margin: 0;
  /* 3 lines max in info bar */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dfsh-player-ctas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 2px;
}

.dfsh-player-btn-real,
.dfsh-player-btn-review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
  font-family: var(--font, 'Outfit', system-ui, sans-serif);
  border: none;
  cursor: pointer;
}

.dfsh-player-btn-real {
  background: var(--accent, #7c3aed);
  color: #fff;
}
.dfsh-player-btn-real:hover { background: #8b4df0; transform: translateY(-1px); color: #fff; }

.dfsh-player-btn-review {
  background: transparent;
  color: rgba(240,240,245,.55);
  border: 1px solid rgba(255,255,255,.08);
}
.dfsh-player-btn-review:hover { background: rgba(255,255,255,.05); color: var(--text, #f0f0f5); }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.dfsh-player-sidebar {
  display: flex;
  flex-direction: column;
  /* Height is clamped to the main column height by JS via --player-main-h */
  height: var(--dfsh-player-h, auto);
  max-height: var(--dfsh-player-h, 600px);
  overflow: hidden;
  background: var(--bg-elevated, #1a1a26);
}

/* 4 equal-height slots fill the full sidebar height */
.dfsh-player-side-item {
  flex: 1;
  display: flex;
  gap: 0;
  align-items: stretch;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
  cursor: pointer;
  transition: background .15s;
  overflow: hidden;
}
.dfsh-player-side-item:last-child { border-bottom: none; }
.dfsh-player-side-item:hover      { background: rgba(124,58,237,.06); }
.dfsh-player-side-item.active     { background: rgba(124,58,237,.12); border-left: 3px solid var(--accent, #7c3aed); }

.dfsh-player-side-thumb {
  width: 72px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dfsh-player-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dfsh-player-side-emoji { font-size: 1.4rem; }
.dfsh-player-side-rtp {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: .55rem;
  font-weight: 700;
  background: rgba(0,0,0,.7);
  color: #d4a843;
  padding: 1px 3px;
}

.dfsh-player-side-info {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.dfsh-player-side-name {
  font-size: .76rem;
  font-weight: 700;
  color: var(--text, #f0f0f5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.dfsh-player-side-provider {
  font-size: .62rem;
  color: rgba(240,240,245,.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dfsh-player-side-btns {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}

.dfsh-player-side-play,
.dfsh-player-side-review {
  padding: 4px 8px;
  border-radius: 5px;
  font-size: .62rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-family: var(--font, 'Outfit', system-ui, sans-serif);
  white-space: nowrap;
}
.dfsh-player-side-play {
  background: var(--accent, #7c3aed);
  color: #fff;
  border: none;
}
.dfsh-player-side-play:hover  { background: #8b4df0; }
.dfsh-player-side-review {
  background: transparent;
  color: rgba(240,240,245,.5);
  border: 1px solid rgba(255,255,255,.1);
}
.dfsh-player-side-review:hover { background: rgba(255,255,255,.05); color: var(--text, #f0f0f5); }

/* ── Loading state ───────────────────────────────────────────────── */
.dfsh-player-loading .dfsh-player-frame-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Reddit card styles ──────────────────────────────────────────── */
.dfsh-reddit-card {
  background: var(--bg-elevated, #1a1a26);
  border: 1px solid rgba(255,69,0,.15);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 8px;
  font-size: .82rem;
}
.dfsh-reddit-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.dfsh-reddit-sub {
  font-size: .68rem;
  font-weight: 700;
  color: #ff4500;
  background: rgba(255,69,0,.1);
  border: 1px solid rgba(255,69,0,.2);
  padding: 2px 7px;
  border-radius: 4px;
}
.dfsh-reddit-flair {
  font-size: .62rem;
  color: rgba(240,240,245,.5);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  padding: 2px 7px;
  border-radius: 4px;
}
.dfsh-reddit-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text, #f0f0f5);
  line-height: 1.4;
  margin-bottom: 8px;
}
.dfsh-reddit-img {
  margin-bottom: 10px;
  border-radius: 6px;
  overflow: hidden;
  max-height: 300px;
}
.dfsh-reddit-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  max-height: 300px;
}
.dfsh-reddit-img--small { max-width: 120px; float: right; margin-left: 10px; max-height: 80px; }
.dfsh-reddit-img--small img { height: 80px; width: 120px; object-fit: cover; }
.dfsh-reddit-text {
  font-size: .8rem;
  color: rgba(240,240,245,.6);
  line-height: 1.6;
  margin-bottom: 10px;
}
.dfsh-reddit-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .7rem;
}
.dfsh-reddit-score { color: #ff4500; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.dfsh-reddit-comments { color: rgba(240,240,245,.5); }
.dfsh-reddit-awards   { color: #d4a843; }
.dfsh-reddit-author   { color: rgba(240,240,245,.4); }
.dfsh-reddit-link {
  margin-left: auto;
  color: var(--accent, #7c3aed);
  text-decoration: none;
  font-weight: 600;
  font-size: .68rem;
  white-space: nowrap;
}
.dfsh-reddit-link:hover { opacity: .8; }

/* Feed source badge — reddit */
.dfsh-src-tag--reddit {
  background: rgba(255,69,0,.1);
  color: #ff6534;
  border: 1px solid rgba(255,69,0,.2);
}
.dfsh-feed-icon--reddit { background: rgba(255,69,0,.08); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Stack to single column — sidebar becomes horizontal carousel */
  .dfsh-player-layout {
    grid-template-columns: 1fr;
  }

  .dfsh-player-main {
    border-right: none;
    border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
  }

  /* Override the JS-set height — not needed when stacked */
  .dfsh-player-sidebar {
    height: auto !important;
    max-height: none !important;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: none;
    /* Visible: 2 items at a time */
  }
  .dfsh-player-sidebar::-webkit-scrollbar { display: none; }

  .dfsh-player-side-item {
    flex: 0 0 50%;
    flex-direction: column;
    border-bottom: none;
    border-right: 1px solid var(--border, rgba(255,255,255,.08));
    scroll-snap-align: start;
    align-items: stretch;
  }
  .dfsh-player-side-item:last-child { border-right: none; }

  .dfsh-player-side-thumb {
    width: 100%;
    height: 90px;
    flex-shrink: 0;
  }

  .dfsh-player-side-info {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .dfsh-player-info {
    flex-direction: column;
    padding: 12px 14px;
    gap: 10px;
  }
  .dfsh-player-ctas {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .dfsh-player-blurb {
    -webkit-line-clamp: 2;
  }
  /* Show only 1 slide at a time on very small screens */
  .dfsh-player-side-item {
    flex: 0 0 80%;
  }
}
