/* Live lobby, globe, session sheets, and the Mix Room chat rail */

body.has-live-lobby {
  background: #08090c;
  color: #e8e6df;
}
body.has-live-lobby .footer { margin-top: 0; }

.live-hero {
  padding: 28px 0 12px;
  display: flex; flex-wrap: wrap; gap: 16px 24px;
  align-items: flex-end; justify-content: space-between;
}
.live-hero h1 { margin: 0; font-size: 32px; letter-spacing: -.03em; }
.live-hero p { margin: 6px 0 0; color: #9b98a4; max-width: 520px; }
.live-tabs { display: flex; gap: 6px; }
.live-tabs button {
  appearance: none; height: 36px; padding: 0 14px;
  border: 1px solid rgba(255,255,255,.1); background: #12141a; color: #e8e6df;
  border-radius: 999px; font: 700 13px/1 inherit; cursor: pointer;
}
.live-tabs button.is-on { background: #d6ff3e; color: #111; border-color: #d6ff3e; }

.live-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 8px 0 16px;
}
.live-toolbar input[type="search"], .live-toolbar select {
  height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1);
  background: #12141a; color: #f2f0ea; padding: 0 10px; font: inherit;
}
.live-code-form { display: flex; gap: 6px; margin-left: auto; }
.live-code-form input { width: 8em; text-transform: uppercase; letter-spacing: .12em; }

.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  padding-bottom: 48px;
}
.live-card {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 180px; padding: 14px;
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: #12141c;
  color: inherit; text-align: left; cursor: pointer;
}
.live-card .wave {
  position: absolute; inset: 0;
  opacity: .9; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(0,0,0,.25) 6px 7px),
    linear-gradient(180deg, transparent 20%, rgba(0,0,0,.55) 100%),
    var(--card-wave, linear-gradient(120deg, #1c1230, #123044));
}
.live-card .live-card-body { position: relative; z-index: 1; margin-top: auto; }
.live-card h2 { margin: 0 0 4px; font-size: 16px; }
.live-card .meta { margin: 0; font-size: 12px; color: #d8d6d0; }
.live-card .genre-tag {
  position: relative; z-index: 1;
  display: inline-block; font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 6px; border-radius: 4px; background: rgba(0,0,0,.45);
}
.live-card-actions { position: relative; z-index: 1; display: flex; gap: 6px; flex-wrap: wrap; }
.live-card-actions .btn { height: 30px; padding: 0 10px; font-size: 12px; }

.live-globe-wrap {
  position: relative;
  height: min(68vh, 560px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 40%, #142033, #08090c 70%);
  overflow: hidden;
  margin-bottom: 48px;
}
.live-globe-wrap svg, .live-globe-wrap canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.live-globe-wrap .map-svg { width: 100%; height: 100%; }
.live-globe-legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-size: 12px; color: #9b98a4; background: rgba(8,9,12,.65);
  padding: 6px 10px; border-radius: 8px;
}

.live-sheet, .live-modal {
  position: fixed; inset: 0; z-index: 80;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.62);
  padding: 16px;
}
.live-sheet.is-open, .live-modal.is-open { display: flex; }
.live-sheet-card, .live-modal-card {
  width: min(440px, 100%);
  background: #14161c;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.live-sheet-card h2, .live-modal-card h2 { margin: 0 0 8px; }
.live-field { display: grid; gap: 4px; margin: 10px 0; font-size: 13px; }
.live-field input, .live-field select {
  height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1);
  background: #0e1016; color: #f2f0ea; padding: 0 10px; font: inherit;
}
.live-share { display: grid; gap: 6px; margin: 12px 0; }
.live-share code {
  display: block; padding: 8px 10px; background: #0e1016; border-radius: 8px;
  font: 700 18px/1.2 ui-monospace, monospace; letter-spacing: .16em;
  text-align: center; color: #d6ff3e;
}
.live-decks { display: grid; gap: 8px; margin: 12px 0; }
.live-deck-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 8px; background: #0e1016;
  border: 1px solid rgba(255,255,255,.08);
}
.live-deck-row.is-free { border-color: rgba(214,255,62,.35); }
.live-badge {
  font: 700 10px/1 ui-monospace, monospace; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 6px; border-radius: 4px;
  background: #2a2c32; color: #d8d6d0;
}
.live-badge.free { background: #d6ff3e; color: #111; }
.live-badge.taken { background: #5a2430; color: #ffd0d6; }

/* Mix Room chat rail */
.live-side {
  display: none;
  flex-direction: column;
  width: 280px;
  background: #101218;
  border-left: 1px solid rgba(255,255,255,.08);
  min-height: 0;
}
body.is-live-room #mix-room.has-live-side {
  padding-right: 280px;
}
body.is-live-room #live-side:not([hidden]) {
  display: flex !important;
  position: fixed !important;
  top: 58px; right: 0; bottom: 0;
  width: 280px;
  z-index: 40;
}
.live-side-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.live-side-tabs { display: flex; gap: 4px; }
.live-side-tabs button {
  appearance: none; height: 28px; padding: 0 10px;
  border: 0; background: transparent; color: #9b98a4;
  border-radius: 6px; cursor: pointer; font: 700 12px/1 inherit;
}
.live-side-tabs button.is-on { background: #1c1e26; color: #d6ff3e; }
.live-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.live-chat-log {
  flex: 1; overflow: auto; margin: 0; padding: 10px 12px;
  list-style: none; font-size: 13px;
}
.live-chat-log li { margin: 0 0 8px; }
.live-chat-log .who { color: #d6ff3e; font-weight: 700; margin-right: 6px; }
.live-chat-form, .live-friend-form {
  display: flex; gap: 6px; padding: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.live-chat-form input, .live-friend-form input {
  flex: 1; height: 34px; border-radius: 6px; border: 1px solid rgba(255,255,255,.1);
  background: #0e1016; color: #f2f0ea; padding: 0 8px; font: inherit;
}
.live-chat-tools, .live-friend-list { padding: 0 10px 10px; margin: 0; }
.live-friend-list { list-style: none; }
.live-friend-list li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #3a3d44; display: inline-block; margin-right: 6px;
}
.live-dot.on { background: #19c45a; box-shadow: 0 0 8px #19c45a; }
.live-room-banner {
  display: none;
  padding: 4px 12px; font-size: 12px; color: #d6ff3e;
  background: #161a10; border-bottom: 1px solid rgba(214,255,62,.2);
}
body.is-live-room .live-room-banner { display: block; }

@media (max-width: 900px) {
  body.is-live-room #mix-room.has-live-side { padding-right: 0; }
  body.is-live-room #live-side:not([hidden]) {
    width: 100%; top: auto; height: 42vh; border-left: 0;
    border-top: 1px solid rgba(255,255,255,.1);
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0; white-space: nowrap;
}

.live-card.is-example .genre-tag { color: #d6ff3e; }
.live-globe-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 16px; text-align: center; color: #c8c6c0; font-size: 16px;
  z-index: 3; pointer-events: none;
}
.live-globe-empty[hidden] { display: none !important; }
#live-empty {
  text-align: center; padding: 64px 16px 80px; font-size: 16px; color: #c8c6c0;
}

.live-share[hidden] { display: none !important; }
.live-globe-wrap.is-empty .live-globe-legend { display: none; }
