/* Voice Room styles. Reuses the sitewide CSS variables from mainStyle.css and
   mirrors the .act-btn look from the holdem game (those button styles are local
   to each game, not shared).

   This page is a fullscreen "play space": the site header/nav and the normal
   .page/.markdown-body article chrome are suppressed in favor of a canvas that
   fills the viewport, with a slide-out menu for navigation + settings. */

.site-header { display: none !important; }

html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

.page {
    padding: 0;
    margin: 0;
    max-width: none;
    height: 100vh;
}

/* --- buttons (mirrors holdem) --- */
.act-btn {
    padding: 12px 26px;
    border-radius: 10px;
    border: 2px solid var(--borderColor-default);
    background: var(--bgColor-elevated);
    color: var(--fgColor-default);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 2px 6px var(--shadowColor);
    transition: background 0.15s, transform 0.05s, filter 0.15s;
}
.act-btn:hover { filter: brightness(1.08); }
.act-btn:active { transform: translateY(1px); }
.act-btn:disabled { opacity: 0.55; cursor: default; }
.act-btn.fold { background: #c0564f; border-color: #c0564f; color: #fff; }
.act-btn.raise { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.act-btn.muted { background: #c0564f; border-color: #c0564f; color: #fff; }
.act-btn.small { padding: 8px 14px; font-size: 0.9rem; }

/* --- fullscreen house canvas (the play space) --- */
.canvas-wrap {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bgColor-default);
    touch-action: none;
    z-index: 0;
}
#house-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* --- menu button --- */
.menu-btn {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    left: max(16px, env(safe-area-inset-left));
    z-index: 1010;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 2px solid var(--borderColor-default);
    background: var(--bgColor-elevated);
    color: var(--fgColor-default);
    box-shadow: 0 2px 10px var(--shadowColor);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    line-height: 1;
}
.menu-btn:hover { filter: brightness(1.08); }

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1005;
}
.menu-backdrop.hidden { display: none; }

/* --- side menu (nav + all settings) --- */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(360px, 88vw);
    background: var(--bgColor-elevated);
    border-right: 2px solid var(--borderColor-default);
    box-shadow: 4px 0 24px var(--shadowColor);
    z-index: 1008;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
}
.side-menu.open { transform: translateX(0); }
.side-menu__inner { padding: 20px 18px 40px; }

.menu-home-link {
    display: inline-block;
    color: var(--fgColor-muted);
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 14px;
}
.menu-home-link:hover { color: var(--fgColor-default); }

.menu-title {
    margin: 0 0 6px;
    font-size: 1.4rem;
}

.status-banner {
    font-weight: 700;
    color: var(--fgColor-muted);
    min-height: 1.4em;
    margin: 0 0 16px;
}

/* --- self bar --- */
.self-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid var(--borderColor-default);
    border-radius: 14px;
    background: var(--bgColor-default);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.self-meta { flex: 1; min-width: 100px; }
.self-name { font-weight: 800; display: block; margin-bottom: 6px; }
.self-name::after { content: " (you)"; color: var(--fgColor-subtle); font-weight: 600; }

.level-track {
    height: 8px;
    border-radius: 6px;
    background: var(--bgColor-neutral-muted);
    overflow: hidden;
}
.level-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    transition: width 0.08s linear;
}

/* --- settings sections inside the menu --- */
.settings-section {
    padding: 14px 0;
    border-bottom: 1px solid var(--borderColor-default);
}
.settings-section:last-of-type { border-bottom: none; }
.settings-section h3 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fgColor-muted);
}
.settings-hint {
    color: var(--fgColor-muted);
    font-size: 0.88rem;
    margin: 0 0 10px;
}
.settings-msg {
    min-height: 1.2em;
    font-size: 0.85rem;
    color: var(--fgColor-muted);
    margin: 6px 0 0;
}

#settings-name {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 1rem;
    border-radius: 10px;
    border: 2px solid var(--borderColor-default);
    background: var(--bgColor-default);
    color: var(--fgColor-default);
}

.token-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.token-row input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-size: 0.85rem;
    border-radius: 10px;
    border: 2px solid var(--borderColor-default);
    background: var(--bgColor-default);
    color: var(--fgColor-default);
    font-family: var(--mono, monospace);
}

.color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.color-row.centered { justify-content: center; margin: 4px 0 14px; }
.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 4px var(--shadowColor);
}
.color-swatch.selected { border-color: var(--fgColor-default); }
.color-swatch.small {
    width: 18px;
    height: 18px;
    flex: none;
    display: inline-block;
    border: 2px solid rgba(0,0,0,0.2);
}

.peer-volume-list { display: flex; flex-direction: column; gap: 10px; }
.peer-vol-row { display: flex; align-items: center; gap: 10px; }
.peer-vol-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vol-slider { flex: 2; min-width: 0; accent-color: var(--accent-strong); }
.vol-val {
    flex: none;
    width: 3.2em;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--fgColor-muted);
    font-weight: 700;
}

.room-hint {
    color: var(--fgColor-muted);
    font-size: 0.9rem;
    margin-top: 1.25rem;
}
.room-hint em { color: var(--fgColor-default); font-style: italic; }

#how-it-works { margin-top: 1rem; font-size: 0.9rem; }
#how-it-works summary { cursor: pointer; font-weight: 700; }
#how-it-works p { color: var(--fgColor-muted); }

/* --- name overlay --- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.overlay.hidden { display: none; }
.overlay-card {
    background: var(--bgColor-elevated);
    border: 2px solid var(--borderColor-default);
    border-radius: 16px;
    padding: 28px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    text-align: center;
}
.overlay-card h2 { margin-top: 0; }
.overlay-card input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 1.1rem;
    border-radius: 10px;
    border: 2px solid var(--borderColor-default);
    background: var(--bgColor-default);
    color: var(--fgColor-default);
    margin: 8px 0 14px;
}
.name-actions { display: flex; justify-content: center; }
.name-error {
    color: #c0564f;
    font-weight: 700;
    margin-bottom: 10px;
}

.hidden { display: none !important; }

@media (max-width: 520px) {
    .side-menu { width: 100vw; }
}
