/* ═══════════════════════════════════════════════════════════
   SZOBÁK — /room oldal + host panel
   ═══════════════════════════════════════════════════════════ */

/* ── Csatlakozás nézet ──────────────────────────────────── */
.room-title {
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.room-lead {
    opacity: 0.75;
    max-width: 60ch;
}

.room-subtitle {
    font-size: 1.05rem;
    margin: 1.4rem 0 0.6rem;
}

.room-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.room-list-empty {
    opacity: 0.6;
    padding: 0.75rem 1rem;
    border: 1px dashed rgba(128, 128, 128, 0.4);
    border-radius: 10px;
}

.room-card {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 1rem;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(128, 128, 128, 0.35);
    border-radius: 10px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.room-card:hover {
    border-color: rgba(128, 180, 255, 0.7);
    background: rgba(128, 160, 255, 0.07);
}

.room-card-name {
    font-weight: 600;
    font-size: 1.02rem;
}

.room-card-meta {
    opacity: 0.65;
    font-size: 0.88rem;
}

.room-card-song {
    margin-left: auto;
    font-size: 0.88rem;
    opacity: 0.85;
}

.room-code-form {
    display: flex;
    gap: 0.5rem;
    max-width: 26rem;
}

.room-code-input {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 600;
    text-align: center;
}

.room-error {
    margin-top: 0.6rem;
    color: #e05555;
    font-size: 0.92rem;
}

/* ── Élő nézet ──────────────────────────────────────────── */
.room-live-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.room-live-info {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.room-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #35c26a;
    box-shadow: 0 0 0 0 rgba(53, 194, 106, 0.55);
    animation: room-pulse 1.8s infinite;
    flex-shrink: 0;
}

@keyframes room-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(53, 194, 106, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(53, 194, 106, 0); }
    100% { box-shadow: 0 0 0 0 rgba(53, 194, 106, 0); }
}

.room-live-name {
    font-weight: 700;
    font-size: 1.15rem;
}

.room-live-host {
    opacity: 0.7;
    font-size: 0.95rem;
}

.room-live-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.room-leave-btn {
    flex-shrink: 0;
}

.room-live-status {
    min-height: 1.4em;
    font-size: 0.92rem;
    opacity: 0.75;
    margin-bottom: 0.4rem;
}

.room-waiting {
    opacity: 0.6;
    padding: 2.5rem 1rem;
    text-align: center;
}

.room-waiting i {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
}

/* ── Váltó gombok (host panel megosztás-választója) ─────── */
.room-toggle-btn {
    border: 1px solid rgba(128, 128, 128, 0.4);
    background: transparent;
    color: inherit;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.88rem;
    cursor: pointer;
}

.room-toggle-btn.active {
    border-color: rgba(90, 150, 255, 0.8);
    background: rgba(90, 150, 255, 0.14);
}

/* ── Dalnézet a szobában ────────────────────────────────── */
.room-viewer {
    position: relative;
}

/* ── Host panel ─────────────────────────────────────────── */
#room-host-panel {
    position: fixed;
    inset: 0;
    z-index: 2200;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#room-host-panel[hidden] {
    display: none;
}

.room-host-card {
    width: 100%;
    max-width: 26rem;
    max-height: 90dvh;
    overflow-y: auto;
    background: var(--surface-1);
    color: var(--text);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.room-host-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.room-host-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.room-host-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
}

.room-host-close:hover { opacity: 1; }

.room-host-label {
    font-size: 0.85rem;
    opacity: 0.75;
}

.room-vis-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.room-vis-opt {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 9px;
    cursor: pointer;
}

.room-vis-opt:has(input:checked) {
    border-color: rgba(90, 150, 255, 0.8);
    background: rgba(90, 150, 255, 0.1);
}

.room-vis-opt small {
    opacity: 0.65;
    font-size: 0.8rem;
}

.room-user-results {
    display: flex;
    flex-direction: column;
    margin-top: 0.35rem;
}

.room-user-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(128, 128, 128, 0.15);
    color: inherit;
    padding: 0.4rem 0.2rem;
    cursor: pointer;
}

.room-user-row:hover { background: rgba(128, 160, 255, 0.08); }

.room-user-email {
    opacity: 0.55;
    font-size: 0.82rem;
}

.room-user-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.room-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(90, 150, 255, 0.15);
    font-size: 0.85rem;
}

.room-user-chip button {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    padding: 0;
}

.room-host-create-btn {
    width: 100%;
    justify-content: center;
    background: var(--accent-600);
    border-color: var(--accent-600);
    color: var(--white);
}

.room-host-create-btn:hover {
    background: var(--accent-500);
    border-color: var(--accent-500);
    color: var(--white);
}

.room-host-code-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.9rem 0;
}

.room-host-code {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.35em;
    text-indent: 0.35em;
    font-variant-numeric: tabular-nums;
}

.room-host-hint {
    font-size: 0.88rem;
    opacity: 0.7;
    margin-bottom: 0.9rem;
}

.room-host-actions {
    display: flex;
    gap: 0.5rem;
}

.room-host-actions .btn-tool {
    flex: 1;
    justify-content: center;
}

.room-stop-btn {
    color: #e05555;
}

/* ── Megosztás: céloldal-választó + QR ──────────────────── */
.room-share-target {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.4rem 0 0.7rem;
}

.room-share-target[hidden] {
    display: none;
}

.room-target-toggle {
    display: flex;
    gap: 0.4rem;
}

.room-qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    margin: 0.7rem 0;
    padding: 0.8rem;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.room-qr-box[hidden] {
    display: none;
}

.room-qr-img {
    padding: 0.5rem;
    background: #ffffff;
    border-radius: 8px;
    line-height: 0;
}

.room-qr-img canvas,
.room-qr-img img {
    display: block;
}

.room-qr-url {
    font-size: 0.78rem;
    opacity: 0.7;
    word-break: break-all;
    text-align: center;
}

.room-qr-fallback {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Sync hiba jelzése a Szoba gombon */
#room-btn.room-sync-error {
    border-color: var(--danger);
    color: var(--danger);
}

/* Szoba gomb a viewer toolbarban, amíg aktív a szoba */
#room-btn.hosting {
    border-color: rgba(53, 194, 106, 0.8);
    color: #35c26a;
}
