/*
 * Pokerzz cash-table profile
 *
 * This file deliberately contains no table, seat, card, action-bar or
 * animation geometry.  Those visuals continue to come exclusively from the
 * upstream PokerTH Web Client stylesheet so desktop and mobile stay on the
 * same responsive layout system.
 */

html.cash-only [data-cash-feature="disabled"],
html.cash-only #login-step1,
html.cash-only #login-step2 > .login-back,
html.cash-only #cl-links-connect,
html.cash-only #gchat-fab,
html.cash-only [id^="forum-btn-"],
html.cash-only [id^="ranking-btn-"],
html.cash-only [id^="tableranking-btn-"],
html.cash-only [id^="music-toggle-"],
html.cash-only #music-panel,
html.cash-only #forum-modal,
html.cash-only #ranking-modal,
html.cash-only #tableranking-modal,
html.cash-only #avatar-gallery-modal,
html.cash-only #blinds-up-toast,
html.cash-only #gip-tab-stats,
html.cash-only #g-stats-body,
html.cash-only #hud-layer,
html.cash-only #range-modal {
  display: none !important;
}

/* The table's styled #chat-toggle-btn remains the chat entry. The legacy
   body-level FAB above has no upstream visibility/positioning rules. */

/* Fixed cash blinds are a read-only value, not a tournament schedule link. */
html.cash-only .blinds-next {
  cursor: default;
}

/* Do not generate settings carets while their dialog is closed. The native
   fold controls and their original arrows remain intact when it is opened. */
html.cash-only #adv-modal[style*="display:none"] details.adv-fold > summary.adv-sec::before,
html.cash-only #adv-modal[style*="display: none"] details.adv-fold > summary.adv-sec::before {
  content: none;
}

/* Cash SitOut keeps the normal inactive seat treatment, while a public hand
   can remain fully legible through settlement. Put the status on the avatar
   itself so it never covers either hole card. */
html.cash-only .seat.seat-out .seat-plate,
html.cash-only .seat.seat-out .seat-foot {
  opacity: 1;
  filter: none;
}
html.cash-only .seat.seat-out .seat-avatar > :not(.cash-seat-status),
html.cash-only .seat.seat-out .seat-info,
html.cash-only .seat.seat-out .seat-foot > :not(.seat-foot-cards) {
  opacity: 0.4;
  filter: grayscale(0.6);
}
html.cash-only .seat.seat-out::after {
  content: none;
}
html.cash-only .seat .cash-seat-status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 20;
  transform: translate(-50%, -50%) rotate(-10deg);
  max-width: calc(100% - 2px);
  box-sizing: border-box;
  padding: 1px 4px;
  overflow: hidden;
  color: #fff;
  background: var(--red);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.45);
  font-family: var(--ff-display);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
  pointer-events: none;
}

/* Entry and room policy only; the upstream table layout is untouched. */
html.cash-only .cash-editable-name { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 5px; }
html.cash-only .cash-editable-name:focus-visible { outline: 2px solid var(--gold); }
html.cash-only #cash-profile-name { display:block; width:100%; min-width:0; box-sizing:border-box; margin:0; padding:0;
  border:0; border-bottom:1px solid currentColor; border-radius:0; background:transparent; color:inherit;
  font:inherit; line-height:inherit; letter-spacing:inherit; text-align:center; outline:none; }
html.cash-only #cash-profile-name[aria-invalid="true"] { border-bottom-color:var(--red); }

html.cash-only #conn-adv-btn,
html.cash-only #conn-advanced,
html.cash-only #tls-row,
html.cash-only #guest-mode-row,
html.cash-only #f-pass,
html.cash-only #f-user-pass,
html.cash-only #register-link-row,
html.cash-only #forgot-pw-link,
html.cash-only #cf-name-row,
html.cash-only #cf-gtype-row,
html.cash-only #cf-use-password-row,
html.cash-only #cf-password-row,
html.cash-only #cf-vorlage-row,
html.cash-only.cash-owner-route #cash-room-field,
html.cash-only.cash-room-link #cash-room-field,
html.cash-only:not(.cash-owner) #create-toggle-btn,
html.cash-only:not(.cash-owner) .lfb-create,
html.cash-only:not(.cash-owner) #btn-autojoin,
html.cash-only:not(.cash-owner) #quick-create-dialog {
  display: none !important;
}

/* Keep the upstream login artwork independent of the saved table theme.
   The bundled image is the original PokerTH backdrop; no table, card or
   login-card geometry is changed here. A relative URL also works when this
   client is served from a subdirectory. */
html.cash-only #s-connect {
  background-color: #10141c;
  background-image:
    linear-gradient(rgba(8,10,14,0.10), rgba(8,10,14,0.15)),
    url("./img/pokerth-login-bg.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Credits and source access remain available from the settings About entry;
   the entry screen itself has no social, build or credits footer. */
html.cash-only #s-connect .connect-footer {
  display: none !important;
}

html.cash-only #cash-history-entry {
  display: block;
  margin: 8px auto 0;
  color: var(--text);
  background: transparent;
  border-color: transparent;
}

/* There is only one product mode, so the upstream mode chooser is bypassed.
   Keep the official PokerTH connection card and logo, but open its private
   server form directly. */
html.cash-only #login-step2 {
  display: flex !important;
}

/* Preserve the upstream column spacing and separate the primary action from
   the nickname field without changing the PokerTH table UI. */
html.cash-only #login-step2 > .btn-primary[data-i18n="connect"] {
  align-self: center;
  margin-top: 8px;
}

/* A stale saved state must never reveal a disabled overlay on reload. */
html.cash-only #music-panel[style],
html.cash-only #forum-modal[style],
html.cash-only #ranking-modal[style],
html.cash-only #tableranking-modal[style] {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* The header sound menu owns game volume and the independent room call. */
.sound-pop.has-cash-voice { width: min(300px, calc(100vw - 16px)); overflow-y: auto; overscroll-behavior: contain; }
.cash-voice-game-label { font-size: 12px; opacity: .75; }
.cash-voice-panel { border-top: 1px solid var(--border); padding-top: 10px; display: grid; gap: 8px; font-size: 13px; }
.cash-voice-panel [hidden] { display: none !important; }
.cash-voice-panel button { min-height: 40px; padding: 7px 10px; border: 1px solid var(--border-hi); border-radius: 8px; background: var(--field-bg); color: var(--text); cursor: pointer; font: inherit; }
.cash-voice-panel button:disabled { opacity: .5; cursor: default; }
.cash-voice-controls [data-voice-mic][aria-pressed="true"],
.cash-voice-controls [data-voice-mute][aria-pressed="false"] { border-color: #48b77c; background: #23764a; color: white; }
.cash-voice-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cash-voice-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; }
.cash-voice-controls button.is-pending { opacity: .6; }
.cash-voice-controls .cash-voice-mic-icon { width: 24px; height: 24px; flex-basis: 24px; }
.cash-voice-speaker-icon { width: 24px; height: 24px; }
.cash-voice-speaker-slash { display: none; }
[data-voice-mute][aria-pressed="true"] .cash-voice-speaker-slash { display: block; }
[data-voice-mute][aria-pressed="true"] .cash-voice-speaker-icon { opacity: .55; }
[data-voice-mute][aria-pressed="true"] .cash-voice-speaker-waves { display: none; }
.cash-voice-panel ul { list-style: none; padding: 0; margin: 0; max-height: 144px; overflow-y: auto; }
.cash-voice-panel li { display: flex; align-items: center; gap: 8px; min-height: 27px; padding: 2px 4px; border-radius: 4px; }
.cash-voice-panel li > span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cash-voice-peer-state { flex: 0 0 auto; font-size: 12px; opacity: .8; }
.cash-voice-peer-mic { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; opacity: 1; color: var(--text); }
.cash-voice-mic-icon { flex: 0 0 22px; width: 22px; height: 22px; }
.cash-voice-mic-slash { display: none; }
[data-voice-mic-state="off"] .cash-voice-mic-icon { opacity: .55; }
[data-voice-mic-state="off"] .cash-voice-mic-slash { display: block; }
[data-voice-mic-state="off"] .cash-voice-mic-fill { visibility: hidden; }
.cash-voice-panel li.is-speaking .cash-voice-mic-icon { color: #35b96b; }
.cash-voice-panel li.is-speaking { background: rgba(56, 173, 105, .22); }
.cash-voice-panel p { margin: 0; line-height: 1.5; color: var(--gold); }
.cash-voice-panel p:empty { display: none; }
.cash-voice-panel small { font-size: 11px; opacity: .7; }
#sound-toggle-btn[data-cash-voice] { position: relative; }
#sound-toggle-btn[data-cash-voice]::after { content: ''; position: absolute; right: 1px; bottom: 2px; width: 7px; height: 7px; border-radius: 50%; background: #6daccf; border: 1px solid var(--panel); }
#sound-toggle-btn[data-cash-voice="mic"]::after { background: #42d985; box-shadow: 0 0 4px #42d985; }
