/* Table polish: win banner, bet placement, low-time warning and motion helpers.
   Loaded last so it can refine the table without touching the layout rules. */

/* --- Win banner: once the pot is paid, the centre names the winner. --- */
.game-room .pot.pot-result>span{display:block;font-size:11px;letter-spacing:1.6px;color:#e3cf9c;text-transform:uppercase}
.game-room .pot.pot-result strong{font-size:30px;padding:4px 20px;color:#f3e3b4;border-color:#d2b46c;background:linear-gradient(180deg,#3a5136,#17301f);box-shadow:inset 0 1px 0 #f0dfae30,0 3px 10px #0007,0 0 22px #d2b46c2e}
.game-room .pot.pot-result .pot-coin{color:#e7c97f}
.game-room .pot.pot-result .pot-hand{display:block;margin-top:5px;font:600 13px/1.2 Outfit,system-ui,sans-serif;font-style:normal;letter-spacing:.3px;color:var(--cream,#f0eee5);text-shadow:0 1px 3px #000a}
.game-room .pot.pot-result{translate:0 -22px}
.game-room .game-stage-frame .pot.pot-result strong{font-size:clamp(22px,3cqw,36px)}
.mobile-room .pot.pot-result{translate:0 -16px}
.mobile-room .pot.pot-result>span{display:block;font-size:9px}
.mobile-room .pot.pot-result strong{font-size:clamp(22px,7cqh,30px)}
.mobile-room .pot.pot-result .pot-hand{font-size:12px;margin-top:4px}

/* The seat tag repeats the amount at a readable size and contrast. */
.game-room .seat .seat-award,.game-room .game-stage-frame .seat .seat-award{font-size:13px;font-weight:700;color:#f3e3b4;text-shadow:0 1px 3px #000c}
.game-room .seat .winner-hand-description,.game-room .game-stage-frame .seat .winner-hand-description{font-size:11px;font-weight:500;color:var(--cream,#f0eee5)}
.mobile-room .seat .seat-award{font-size:12px}
.mobile-room .seat .winner-hand-description{font-size:10px}

/* Next-hand countdown sits on the status line under the board. */
.game-room .hand-status .next-hand-countdown{font-weight:700;color:#e3cf9c}
.game-room .hand-status .next-hand-countdown:not(:empty)::before{content:" · "}
.game-room .hand-status:has(.next-hand-countdown:not(:empty)),
.game-room .game-stage-frame .hand-status:has(.next-hand-countdown:not(:empty)){display:block;font-size:11px}

/* --- Bets sit on the line from the seat to the middle of the table. --- */
.game-room .poker-table .felt-wager.felt-wager-0,
.game-room .game-stage-frame .poker-table .felt-wager.felt-wager-0{left:50%;top:73.5%}
.game-room .poker-table .felt-wager.felt-wager-3,
.game-room .game-stage-frame .poker-table .felt-wager.felt-wager-3{left:50%;top:20%}

/* --- Turn timer: warn from eight seconds, before the time bank starts. --- */
.seat .avatar>span.avatar-countdown.timer-low{color:#ff9c7d}
.seat-time-fill.timer-low{background:#e0694f}
.seat .avatar>span.avatar-countdown.timer-low.timer-urgent{color:#ff7d5c}
@media(prefers-reduced-motion:no-preference){
 .seat .avatar>span.avatar-countdown.timer-low{animation:timer-low-beat 1s ease-in-out infinite}
}
@keyframes timer-low-beat{0%,100%{scale:1}50%{scale:1.1}}

/* --- Motion helpers. --- */
.game-room .seat-stack-value.fx-stack-count{position:relative;color:transparent}
.game-room .seat-stack-value.fx-stack-count::after{content:var(--fx-stack);position:absolute;inset:0;color:var(--cream,#f0eee5);white-space:nowrap}
.game-room .degen-effects-host .fx-particle.fx-game-allin-ring{
 position:absolute;left:var(--fx-x);top:var(--fx-y);z-index:11;display:block;margin:0;padding:0;box-sizing:border-box;
 width:var(--fx-size,20px);height:var(--fx-size,20px);border:2px solid #e7c97f;border-radius:50%;
 background:transparent;box-shadow:0 0 12px #e7c97f66,inset 0 0 8px #e7c97f40;pointer-events:none;opacity:0;animation:none!important;
}
@media(prefers-reduced-motion:reduce){.game-room .fx-game-allin-ring{display:none!important}}

/* --- Tall phones: let the portrait table grow into the spare height instead of
   leaving empty bands above and below it. Short phones keep the 0.74 canvas. --- */
@media(max-width:700px) and (orientation:portrait){
 .game-room .game-stage-frame>.poker-stage{
  aspect-ratio:auto;
  height:min(100cqh,calc(min(100cqw,74cqh) / .6));
 }
}

/* Phones: keep each bet beside its own seat, and let the countdown replace the
   hand reference so the status line stays clear of revealed cards. */
@media(max-width:700px) and (orientation:portrait){
 .game-room .poker-table .felt-wager.felt-wager-0,
 /* The player's cards keep their size while the table shrinks, so on short phones
    the bet is also held a fixed distance above the table's lower edge, clear of the cards. */
 .game-room .game-stage-frame .poker-table .felt-wager.felt-wager-0{left:50%;top:min(79%,calc(100% - 110px))}
 .game-room .game-stage-frame .poker-table .felt-wager.felt-wager-1{left:29%;top:62%}
 .game-room .game-stage-frame .poker-table .felt-wager.felt-wager-5{left:71%;top:62%}
 .game-room .hand-status:has(.next-hand-countdown:not(:empty)) .hand-status-text{display:none}
 .game-room .hand-status .next-hand-countdown:not(:empty)::before{content:none}
 .game-room .hand-status:has(.next-hand-countdown:not(:empty)),
 .game-room .game-stage-frame .hand-status:has(.next-hand-countdown:not(:empty)){font-size:10px}
}

/* --- Lobby cards: the table name sits above the blinds as a small tagline, and
   the buy-in mirrors it as a small label above its amount. Each card is one
   compact row: name/blinds, game tag, buy-in, seats, chevron. --- */
.lobby-tables .lobby-table-card{grid-template-columns:minmax(0,1fr) 76px 16px;grid-template-rows:auto;gap:12px;align-items:center;min-height:0;padding:12px 16px}
.lobby-tables .lobby-table-summary{display:grid;grid-template-columns:max-content max-content minmax(0,1fr) max-content;grid-template-areas:"name name name buyin" "stakes game . buyin";align-items:center;column-gap:8px;row-gap:3px;min-width:0}
.lobby-tables .lobby-table-name{grid-area:name;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:1.3;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:#87939a}
.lobby-tables .lobby-table-card h3.lobby-table-stakes{grid-area:stakes;margin:0;font-size:19px;line-height:1.25;font-weight:650;color:#ecdfc0;font-variant-numeric:tabular-nums;white-space:nowrap}
.lobby-tables .lobby-table-game{grid-area:game;justify-self:start;padding:2px 6px;border:1px solid #353d42;border-radius:4px;background:none;color:#a8b3b7;font-size:10px;line-height:1.3;font-weight:600;letter-spacing:.6px}
.lobby-tables .lobby-table-buyin{grid-area:buyin;display:grid;gap:3px;align-content:center;min-width:78px;margin-left:8px;white-space:nowrap}
.lobby-tables .lobby-table-buyin>small{margin:0;font-size:10px;line-height:1.3;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:#87939a}
.lobby-tables .lobby-table-buyin>strong{font-size:15px;line-height:1.585;font-weight:550;color:#c9ccc8;font-variant-numeric:tabular-nums}
.lobby-tables .lobby-table-visual{transform:none}
@media(max-width:850px){
 .lobby-tables .lobby-table-card{grid-template-columns:minmax(0,1fr) 60px 14px;gap:8px;padding:11px 12px 11px 14px}
 .lobby-tables .lobby-table-card h3.lobby-table-stakes{font-size:17px}
 .lobby-tables .lobby-table-summary{column-gap:6px}
 .lobby-tables .lobby-table-buyin{min-width:66px;margin-left:4px}
 .lobby-tables .lobby-table-buyin>strong{font-size:14px;line-height:1.52}
 .lobby-tables .lobby-table-occupancy{width:60px;height:41px}
 .lobby-tables .lobby-table-occupancy>span{font-size:11px}
 .lobby-tables .lobby-table-occupancy b{font-size:14px}
}

/* Bet sizing sits on the table during the player's turn: presets, the amount with
   fine steps, and a slider. The gold action button carries the chosen amount. */
.game-room .action-panel .action-buttons,
.game-room .mobile-table-layout .action-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}
.game-room .action-panel .raise-button>.raise-verb{font-style:normal}
/* The row floats just above the action buttons, over the table's empty edge, so the
   table never resizes when a turn starts. */
.game-room .game-control-dock:has(.sizing-row:not([hidden])){position:relative;z-index:8;overflow:visible}
.game-room .action-panel:has(.sizing-row:not([hidden])),.game-room .bet-controls:has(>.sizing-row:not([hidden])){overflow:visible}
.game-room .bet-controls{position:relative}
.game-room .sizing-row{position:absolute;left:0;right:0;bottom:calc(100% + 8px);display:flex;align-items:center;gap:8px;min-width:0;box-sizing:border-box}
.game-room .sizing-row[hidden]{display:none}
.game-room .sizing-presets{display:flex;flex:none;gap:4px;min-width:0}
.game-room .sizing-presets>button{flex:none;height:34px;min-height:0;padding:0 9px;border:1px solid #53605d;border-radius:8px;background:#242d31;color:#cdd1c8;box-shadow:none;font:600 13px/1 Outfit,system-ui,sans-serif;white-space:nowrap;cursor:pointer}
.game-room .sizing-presets>button[aria-pressed=true]{border-color:#d5b577;background:#39341f;color:#ecd294}
.game-room .sizing-presets>button:disabled{opacity:.38;cursor:default}
.game-room .sizing-amount{display:flex;flex:none;align-items:center;height:34px;border:1px solid #394542;border-radius:8px;background:#11191b;overflow:hidden}
.game-room .sizing-amount>button{width:28px;height:100%;min-height:0;padding:0;border:0;background:transparent;color:#cdd1c8;box-shadow:none;font:600 17px/1 Outfit,system-ui,sans-serif;cursor:pointer}
.game-room .sizing-amount>button:disabled{opacity:.38;cursor:default}
.game-room .sizing-amount>strong{min-width:58px;padding:0 2px;text-align:center;color:#d6b876;font:600 15px/1 Outfit,system-ui,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}
.game-room .sizing-row>input[type=range]{flex:1 1 90px;min-width:70px;width:auto;height:34px;margin:0;background:transparent;accent-color:#c6a568}
.game-room .sizing-row>input[type=range]::-webkit-slider-runnable-track{height:4px;background:#46524e;border-radius:4px}
.game-room .sizing-row>input[type=range]::-webkit-slider-thumb{width:18px;height:18px;margin-top:-7px}
.game-room .sizing-row>input[type=range]::-moz-range-track{height:4px;background:#46524e;border-radius:4px}
@media(hover:hover){.game-room .sizing-presets>button:hover:not(:disabled),.game-room .sizing-amount>button:hover:not(:disabled){border-color:#97815b;color:#ecd294}}
/* Fraction glyphs come from the system face; the brand face draws them too small. */
.game-room .sizing-presets>button>b{font:600 15px/1 system-ui,-apple-system,"Segoe UI",sans-serif}
/* Phones: one compact line with the short preset set, so the player's own seat
   stays readable. Fine steps are left to the slider. */
@media(max-width:700px),(orientation:landscape) and (max-height:560px){
 .game-room .sizing-row{gap:5px;padding:4px;border:1px solid #33403d;border-radius:11px;background:#141c1fee;bottom:calc(100% + 4px)}
 .game-room .sizing-presets{gap:4px}
 .game-room .sizing-presets>button{height:36px;min-width:40px;padding:0 7px;font-size:13px}
 .game-room .sizing-presets>.sizing-wide,.game-room .sizing-presets>button>span,.game-room .sizing-amount>button{display:none}
 .game-room .sizing-presets>button>b{font-size:17px}
 .game-room .sizing-amount{height:36px}
 .game-room .sizing-amount>strong{min-width:54px;padding:0 6px;font-size:14px}
 .game-room .sizing-row>input[type=range]{flex:1 1 60px;min-width:56px;height:36px}
}
@media(orientation:landscape) and (max-height:560px){.game-room .sizing-row{flex-wrap:wrap}}

/* Phones in portrait: the table grows into any height the controls give up, so the
   sizing row gets its own reserved strip above the action buttons. Without it the
   row lands on the player's own seat. Short phones also get slimmer buttons, which
   pays for the strip. */
@media(orientation:portrait){
 .game-room .mobile-table-layout .game-scene{grid-template-rows:minmax(0,1fr) 84px 48px}
 .game-room .mobile-table-layout .action-panel{display:flex;flex-direction:column;justify-content:flex-end}
 .game-room .mobile-table-layout .bet-controls{height:auto}
 .game-room .mobile-table-layout .sizing-row{padding:3px;bottom:calc(100% + 3px)}
 .game-room .mobile-table-layout :is(.sizing-presets>button,.sizing-amount,.sizing-row>input[type=range]){height:30px}
}
/* Desktop: a taller control area keeps clear space between the player's seat, the
   sizing row and the action buttons. (The phone rules above must not reach a tall,
   narrow desktop window, which is also "portrait".) */
.game-room .desktop-table-layout .game-scene{grid-template-rows:minmax(0,1fr) 112px}
.game-room .desktop-table-layout .action-panel{display:flex;flex-direction:column;justify-content:flex-end}
.game-room .desktop-table-layout .bet-controls{height:auto}
.game-room .desktop-table-layout .sizing-row{bottom:calc(100% + 12px)}
@media(max-height:600px){.game-room .desktop-table-layout .game-scene{grid-template-rows:minmax(0,1fr) 110px}}
@media(orientation:landscape) and (max-height:560px){.game-room .desktop-table-layout .game-scene{grid-template-rows:minmax(0,1fr)}}
@media(orientation:portrait) and (max-height:700px){
 .game-room .mobile-table-layout .game-scene{grid-template-rows:minmax(0,1fr) 87px 40px}
 .game-room .mobile-table-layout .action-buttons>button{height:44px;min-height:44px;font-size:15px}
 .game-room .mobile-table-layout .action-buttons>button>span{margin-top:2px}
 .game-room .mobile-table-layout .game-tools{height:40px}
 .game-room .mobile-table-layout .game-tools>button{height:40px;min-height:40px;gap:1px;padding:3px 1px}
 .game-room .mobile-table-layout .game-tools>button svg{width:16px;height:16px}
}

/* Showdown: an opponent's revealed cards are a quarter larger, with heavier ranks
   and suits. They grow upward from the seat, so the seat plate and the win label
   below stay clear. Four-card hands grow less to keep from crowding neighbours. */
.game-room .in-table .seat .revealed-hole{scale:1.25;transform-origin:50% 100%}
.game-room .in-table .plo-stage .seat .revealed-hole{scale:1.12}
.game-room .in-table .seat .revealed-hole .card .card-corner{font-weight:800}
.game-room .in-table .seat .revealed-hole .card .card-suit{font-weight:700;-webkit-text-stroke:.4px currentColor}
.game-room .in-table .seat .revealed-hole .card{box-shadow:0 3px 8px #0007,0 0 0 1px #0002}

/* Seat badges: the SB/BB marker and the player-level number are a size smaller, so
   they sit beside the avatar without competing with it. */
.game-room .seat .avatar>.seat-blind{width:20px;height:16px;border-radius:5px;font-size:8px!important}
.game-room .seat .avatar.has-avatar-level>.avatar-level-badge,
.game-room .seat.is-current>.avatar.has-avatar-level>.avatar-level-badge{min-width:14px;height:12px;padding:0 2px;border-radius:4px;font-size:9px;line-height:1}
