/* Additions for the WebSocket client. Loaded after poker.css. */

[hidden] { display: none !important; }

/* Footer action panel wraps the original buttons + raise controls */
#action-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Reconnect banner */
.conn-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 2000;
    background: #e67e22;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
}

/* Toast for errors and short notices (replaces alert()) */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--footer-height) + 70px);
    transform: translateX(-50%);
    z-index: 1500;
    background: rgba(20, 20, 30, 0.95);
    color: #fff;
    border: 1px solid #e74c3c;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    max-width: 90vw;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.toast.info { border-color: #3498db; }

/* Busted badge */
.status-badge.busted { background: #7f8c8d; }

/* Leave button confirm state */
.btn-leave.confirm { background: #c0392b; animation: pulse 0.6s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 1; } to { opacity: 0.6; } }

/* Winner overlay with multiple winners */
.winner-overlay .winner-line { white-space: nowrap; }

/* Join modal cancel button */
.modal-cancel {
    background: transparent !important;
    color: #aaa !important;
    border: 1px solid #555 !important;
    margin-top: 6px;
}

/* Disabled controls read as disabled on touch devices */
.bet-btn:disabled, .preset-btn:disabled, .raise-slider:disabled, .raise-input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Cards that are still face-down at showdown for folded players should not render */
.player-cards:empty { display: none; }

/* Hand description shown under a revealed hand at showdown */
.hand-desc {
    font-size: 9px;
    color: #f1c40f;
    text-align: center;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
@media (max-width: 768px) { .hand-desc { font-size: 7px; } }

/* ---------- sign-in ---------- */
.signin-form { max-width: 380px; width: 92vw; }
.signin-form h2 { margin-bottom: 6px; }
.signin-sub { color: #bbb; font-size: 13px; margin: 0 0 14px; line-height: 1.4; }
.signin-hint { color: #999; font-size: 12px; margin: 8px 0; line-height: 1.4; }
.signin-status { color: #ffd700; font-size: 13px; min-height: 18px; margin-top: 8px; }
.signin-form input[type="text"] { width: 100%; }
.signin-form button, .launch-btn {
    display: block; width: 100%; box-sizing: border-box; text-align: center;
    text-decoration: none; margin-top: 8px;
}
.launch-btn { background: #ffd700; color: #222; font-weight: 700; padding: 14px; border-radius: 8px; font-size: 16px; }
.signin-stuck { color: #bbb; font-size: 12px; margin-top: 10px; line-height: 1.5; }
.link-btn { display: inline !important; width: auto !important; background: none !important; color: #ffd700 !important;
    border: none !important; padding: 0 !important; margin: 0 !important; font-size: 12px !important; text-decoration: underline; cursor: pointer; }
#signin-code-input { letter-spacing: 4px; text-align: center; font-size: 20px; }
.prompt-code { font-size: 34px; letter-spacing: 6px; font-weight: 700; color: #ffd700; text-align: center; margin: 10px 0 14px; }
.prompt-actions button { margin-top: 8px; }
.account-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,215,0,0.35); border-radius: 14px; padding: 3px 10px; font-size: 12px; color: #ffd700; font-family: ui-monospace, Menlo, monospace; }
.account-chip .admin { color: #2ecc71; font-size: 10px; font-family: system-ui, sans-serif; }
.header-btn.btn-signin { background: #ffd700; color: #222; font-weight: 700; }
.header-btn.btn-signout { background: transparent; border: 1px solid #555; color: #aaa; }

/* ---------- login gate ---------- */
body.gated .app { display: none !important; }
body:not(.gated) .gate { display: none !important; }
.gate {
    position: fixed; inset: 0; z-index: 150;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow-y: auto;
}
.gate-card {
    position: relative;
    width: 100%; max-width: 400px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,215,0,0.35);
    border-radius: 14px;
    padding: 26px 22px 22px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.gate-logo { color: #ffd700; font-weight: 800; letter-spacing: 1px; font-size: 20px; margin-bottom: 14px; text-align: center; }
.gate-card h2 { font-size: 18px; margin: 0 0 6px; }
.gate-card input[type="text"] {
    width: 100%; box-sizing: border-box; padding: 12px; border-radius: 8px;
    border: 1px solid #555; background: #111; color: #fff; font-size: 15px; margin-top: 8px;
}
.gate-card button, .gate-card .launch-btn {
    display: block; width: 100%; box-sizing: border-box; text-align: center; text-decoration: none;
    margin-top: 10px; padding: 13px; border-radius: 8px; border: none; font-size: 15px; font-weight: 600; cursor: pointer;
    background: #ffd700; color: #222;
}
.gate-card .modal-cancel { background: transparent !important; color: #aaa !important; border: 1px solid #555 !important; font-weight: 400; }
.gate-card .link-btn { display: inline !important; width: auto !important; padding: 0 !important; margin: 0 !important; }
.gate-help { position: absolute; top: 10px; right: 10px; }
.gate-card .error-message { min-height: 18px; margin-top: 8px; }
.account-chip.clickable { cursor: pointer; }
.account-chip .acct-name { color: #fff; font-family: system-ui, sans-serif; font-weight: 600; }
