/* วงเหล้า shared: menu/sub-hub shell, action button, and the picker-input/list/chip
   trio reused by ไพ่สุ่ม's custom-prompt input (tools/wonglao-randomcard.css). Load
   before other wonglao-*.css so those overrides win where needed. */

.wl-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Single-row tab strip, always visible above the active game — replaces the old
   grid-of-icons picker page and each game's own header/back button. Tabs never
   wrap to a 2nd row: on overflow the row itself scrolls, nudged by the arrow
   buttons either side (see wonglao-core.js scrollBy calls). */
.wl-tabbar-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 8px 6px;
  border-bottom: 1px solid var(--hairline);
  max-height: 60px;
  overflow: hidden;
  transition: max-height var(--duration-base) ease, opacity var(--duration-base) ease, padding var(--duration-base) ease;
}

.wl-tabbar-row.hidden {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  border-bottom-color: transparent;
}

.wl-tab-nudge {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--card-hi);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.wl-tabbar {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.wl-tabbar::-webkit-scrollbar {
  display: none;
}

.wl-tab {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: none;
  border-radius: var(--radius-pill);
  color: var(--sub);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.wl-tab.active {
  background: var(--accent);
  color: #fff;
}

.wl-tab-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.wl-tabbar-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.wl-tabbar-toggle {
  background: none;
  border: none;
  color: var(--sub);
  font-size: 11px;
  padding: 4px;
  cursor: pointer;
}

.wl-game-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 16px calc(var(--safe-bottom) + 20px);
}

/* Full-screen "show all" overlay — see showWongLaoAllOverlay in wonglao-core.js */
.wl-all-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 1000;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--duration-base) ease;
  padding: 24px;
}

.wl-all-overlay.show {
  opacity: 1;
}

.wl-all-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: min(90vw, 420px);
  cursor: default;
}

.wl-all-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--card);
  border: none;
  border-radius: var(--radius-lg);
  color: var(--text);
  padding: 22px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.wl-all-tile.active {
  background: var(--accent);
  color: #fff;
}

.wl-all-tile-icon {
  font-size: 28px;
}

.wl-all-tile-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.wl-all-hint {
  color: var(--sub);
  font-size: 13px;
}

.wl-action-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 14px;
  cursor: pointer;
}

.wl-action-btn:disabled {
  background: var(--card);
  color: var(--sub);
  cursor: not-allowed;
}

.wl-action-btn:active:not(:disabled) {
  transform: scale(0.97);
}

/* .picker-input-row/.picker-list/.name-chip below are shared — reused by wonglao-randomcard.js's
   custom-item input UI (see CLAUDE.md's file map). Keep them even though the สุ่มคน sub-game
   that originally introduced them (.picker-wrap/.picker-result, removed) is gone. */

.picker-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.picker-input-row input {
  flex: 1;
  background: var(--card);
  border: none;
  border-radius: 10px;
  color: var(--text);
  padding: 12px;
  font-size: 15px;
}

.picker-input-row button {
  background: var(--card-hi);
  border: none;
  color: var(--text);
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  cursor: pointer;
}

.picker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.name-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border-radius: 999px;
  padding: 6px 6px 6px 14px;
  font-size: 14px;
}

.name-chip button {
  background: none;
  border: none;
  color: var(--sub);
  font-size: 16px;
  width: 22px;
  height: 22px;
  cursor: pointer;
}
