/* ─── Friends + Games panels (top-right zoom, sub-panels of Settings) ────────── */

.landing__panel--tall {
  width: min(94vw, 640px);
  height: 88vh;
  overflow: hidden;
}

.landing-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.landing-tabs__bar {
  display: flex;
  gap: 0.4rem;
}

.landing-tabs__btn {
  flex: 1;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(184, 134, 30, 0.3);
  border-radius: 6px;
  background: rgba(20, 12, 4, 0.62);
  color: var(--brass-gold-light);
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.landing-tabs__btn.is-active {
  background: rgba(60, 38, 12, 0.85);
  color: var(--brass-gold-glow);
  border-color: rgba(220, 170, 50, 0.7);
}

.landing-tabs__panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  display: none;
}

.landing-tabs__panel::-webkit-scrollbar {
  display: none;
}

.landing-tabs__panel.is-active {
  display: block;
}

.landing-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  background: rgba(20, 12, 4, 0.5);
  margin-bottom: 0.4rem;
}

.landing-row__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.landing-row__name {
  color: var(--brass-gold-glow);
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-row__sub {
  color: var(--brass-gold-muted);
  font-size: 0.78rem;
  font-style: italic;
}

.landing-row__actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.landing-row__btn {
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(184, 134, 30, 0.45);
  border-radius: 5px;
  background: rgba(42, 24, 8, 0.7);
  color: var(--brass-gold-bright);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.landing-row__btn:hover {
  background: rgba(80, 48, 12, 0.88);
  border-color: rgba(220, 170, 50, 0.85);
}

.landing-row__btn--danger {
  border-color: rgba(180, 70, 50, 0.5);
  color: var(--brass-brown-bright);
}

.landing-empty {
  color: var(--brass-gold-light);
  font-size: 0.85rem;
  font-style: italic;
  padding: 0.6rem 0.2rem;
}

/* ─── Inline lobby (waiting room) panel ─────────────────────────────────────── */

/* Wider + taller than the standard panel to hold a two-column layout (players +
   chat). The internal grid stretches to fill the panel and the chat column owns
   its own scroll surface so the panel itself does not scroll. */
.landing__panel--lobby {
  width: min(96vw, 920px);
  height: 82vh;
  overflow: hidden;
}

/* The lobby title spans three short lines (player count, optional timer, host).
   Mixed-case so the host display name reads naturally — the splash default
   text-transform: uppercase loses that signal. white-space: pre-line lets a
   `\n` in the title text break the lines. */
.landing__panel--lobby .landing__panel-title {
  text-transform: none;
  letter-spacing: 0.02em;
  white-space: pre-line;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  line-height: 1.3;
}

.landing__panel--lobby .landing__panel-body {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.lobby-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.85rem 1rem;
  background: rgba(20, 12, 4, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid rgba(184, 134, 30, 0.35);
  border-radius: 6px;
  text-align: left;
}

.lobby-section-heading {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-gold-bright);
  border-bottom: 1px solid rgba(184, 134, 30, 0.25);
  padding-bottom: 0.35rem;
}

.lobby-slots {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  /* Grow to absorb leftover vertical space so the action row pins to the
     bottom of the column (aligned with the chat compose row across the gap). */
  flex: 1;
  min-height: 0;
}

.lobby-slot {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(184, 134, 30, 0.18);
  border-radius: 4px;
}

.lobby-slot__chip {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brass-shadow-deep);
  flex-shrink: 0;
}

.lobby-slot__chip--empty {
  background: rgba(80, 60, 30, 0.35);
  color: rgba(232, 200, 122, 0.55);
}

.lobby-slot__name {
  flex: 1;
  color: var(--brass-gold-cream);
  font-size: 0.95rem;
}

.lobby-slot__name--waiting {
  color: rgba(232, 200, 122, 0.55);
  font-style: italic;
}

.lobby-slot__rating {
  color: rgba(232, 200, 122, 0.7);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.lobby-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  /* Pinned to the bottom of the left column so Start/Close land on the same
     vertical line as the chat compose row in the right column. */
  margin-top: auto;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(184, 134, 30, 0.25);
}

.lobby-actions > .landing__panel-action {
  flex: 1;
  min-width: 0;
}

.lobby-banner {
  margin: 0.6rem 0 0;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
  color: var(--brass-gold-highlight);
  background: rgba(120, 70, 10, 0.4);
  border: 1px solid rgba(220, 160, 60, 0.55);
  border-radius: 4px;
}

.lobby-waiting-host {
  margin: 0.6rem 0 0;
  color: rgba(232, 200, 122, 0.7);
  font-style: italic;
  font-size: 0.85rem;
}

.lobby-col--right {
  /* Chat owns the full right column height so its internal scroller works. */
  padding: 0.6rem;
}

.lobby-chat-host {
  flex: 1;
  min-height: 0;
  display: flex;
}

.lobby-chat-host > * {
  flex: 1;
  min-height: 0;
  width: 100%;
}
