/* Izaicinājumi (challenges): the lobby button and its window (challenges-client.js). */
.ch-open-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 2px solid var(--gold-bright, #e2c374);
  background: linear-gradient(180deg, rgba(226, 195, 116, 0.22), rgba(226, 195, 116, 0.08));
  color: var(--cream, #faf6ec);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.ch-open-btn:hover { background: linear-gradient(180deg, rgba(226, 195, 116, 0.3), rgba(226, 195, 116, 0.12)); }
.ch-open-btn:focus-visible { outline: 3px solid #e2c374; outline-offset: 2px; }
.ch-flag {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px;
  background: #e2c374; color: #2a2005; display: flex; align-items: center; justify-content: center;
}
.ch-text { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 1rem; }
.ch-sub { font-size: 0.78rem; font-weight: 500; color: #e8dcb8; }
.ch-badge {
  flex-shrink: 0; padding: 3px 8px; border-radius: 999px;
  background: #e2c374; color: #2a2005; font-size: 0.75rem; font-weight: 800; white-space: nowrap;
}
.ch-badge.hidden { display: none; }

.ch-card { width: min(420px, 92vw); max-width: 420px; }
.ch-title { margin-bottom: 12px; }
.ch-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); margin-bottom: 14px; }
.ch-tab {
  position: relative; min-height: 38px; border: 0; border-radius: 7px; background: transparent;
  color: #cfe0e8; font: 700 0.9rem inherit; cursor: pointer;
}
.ch-tab.active { background: linear-gradient(180deg, #e8c876, #c9a24b); color: #2a2005; }
.ch-dot { position: absolute; right: 8px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: #e05a4f; }
.ch-panel { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.ch-info { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; gap: 6px; }
.ch-info p { margin: 0; font-size: 0.86rem; line-height: 1.45; color: #cfe0e8; }
.ch-info-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ch-date { font-size: 0.8rem; color: #a9c6d4; }
.ch-info .ch-ends { color: #e2c374; font-weight: 700; }
.ch-label { margin: 4px 0 0; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: #a9c6d4; }
.ch-levels { display: flex; flex-direction: column; gap: 8px; }
.ch-level {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 2px solid rgba(250, 246, 236, 0.12); background: rgba(255, 255, 255, 0.04);
  color: #faf6ec; font: inherit; text-align: left; cursor: pointer;
}
.ch-level.active { border-color: #e2c374; background: rgba(226, 195, 116, 0.14); }
.ch-level:focus-visible { outline: 3px solid #e2c374; outline-offset: 2px; }
.ch-radio { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #e2c374; box-sizing: border-box; position: relative; }
.ch-level.active .ch-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #e2c374; }
.ch-level-text { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ch-level-name { font-weight: 700; font-size: 0.95rem; }
.ch-level-rate { font-weight: 500; font-size: 0.78rem; color: #a9c6d4; }
.ch-level-reward { font-size: 0.78rem; color: #e8dcb8; }
.ch-level-status { flex-shrink: 0; font-size: 0.75rem; font-weight: 700; color: #e8dcb8; text-align: right; max-width: 110px; }
.ch-level-status.won { color: #86e3ae; }
.ch-level-status.out { color: #ff9a96; }
.ch-level-status.muted { color: #a9c6d4; }
.ch-top { display: flex; flex-direction: column; gap: 6px; }
.ch-top-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); font-size: 0.86rem; }
.ch-top-row.me { background: rgba(226, 195, 116, 0.16); }
.ch-top-rank { width: 22px; font-weight: 800; color: #e2c374; }
.ch-top-name { flex-grow: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-top-meta { color: #a9c6d4; font-size: 0.8rem; white-space: nowrap; }
.ch-hint, .ch-points { margin: 0; font-size: 0.8rem; color: #a9c6d4; }
.ch-points { text-align: center; }
.ch-play { width: 100%; margin-top: 6px; }
.ch-later {
  padding: 22px 18px; border-radius: 12px; background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(226, 195, 116, 0.45); display: flex; flex-direction: column; gap: 8px; text-align: center;
}
.ch-later p { margin: 0; font-size: 0.86rem; line-height: 1.45; color: #cfe0e8; }
.ch-soon { align-self: center; padding: 4px 10px; border-radius: 999px; background: rgba(226, 195, 116, 0.18); color: #e2c374; font-size: 0.75rem; font-weight: 800; }
.ch-over-note { margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; background: rgba(226, 195, 116, 0.14); border: 1px solid rgba(226, 195, 116, 0.45); font-size: 0.9rem; line-height: 1.4; }
.ch-over-note.hidden { display: none; }

/* the lobby's main buttons (Izveidot istabu / Izaicinājumi / Turnīri, and the guest ones) sit 8 px
   apart — the same gap as the quick-room buttons below them */
.lobby-actions { display: flex; flex-direction: column; gap: 8px; }
.lobby-actions > .btn { margin: 0; }
#playGuestBtn, #createRoomGuestBtn, #challengeOpenGuestBtn { margin-top: 0; margin-bottom: 8px; }
#authStep .ch-open-btn { margin-top: 0; }
