/* Phone blackjack: an oval table that fills the screen, my cards large at the bottom, a fixed button area */
.bjm{flex:1;min-height:0;display:flex;flex-direction:column;background:#0b0408;direction:rtl}
.bjm .bj-table{flex:1;min-height:0;position:relative;container-type:size;margin:4px}
.bjm .bj-table::before{content:"";position:absolute;inset:3% 2% 1%;border-radius:48%/32%;background:radial-gradient(ellipse at 50% 30%,#1b6b4c,#0a3526 62%,#051c13);border:7px solid #2b2b33;box-shadow:0 0 0 2px #e8b422aa,inset 0 0 50px #000b}
.bjm .pc{--cw:var(--bjcw,40px);filter:drop-shadow(0 2px 3px #000a)}.bjm .pc-inner{filter:none}

.bjm .bj-limits{position:absolute;top:2px;left:2px;z-index:4;font-size:9.5px;line-height:1.35;text-align:center;background:#000a;border:1px solid #e8b42255;border-radius:8px;padding:2px 6px}
.bjm .bj-shoe{position:absolute;top:4px;right:6px;left:auto;z-index:4}
.bjm .bj-shoe .box{width:32px;height:19px;margin:0;border-radius:4px;background:#000;border:1.5px solid #e8b422;position:relative;overflow:hidden}
.bjm .bj-shoe .cnt{display:none}
.bjm .bj-tray{position:absolute;top:60px;left:8px;width:20px;height:14px;opacity:0;pointer-events:none}

/* the dealer: a round portrait, her bubble beside it */
.bjm .pk-dealerbox{position:absolute;left:50%;top:1%;transform:translateX(-50%);width:min(64px,12cqh);height:min(64px,12cqh);z-index:6}
.bjm .pk-dealer{width:100%;height:100%;border-radius:50%;overflow:hidden;border:3px solid var(--gold);background:#2a0a12;filter:none}
.bjm .pk-dealer svg{width:138%;margin:-9% -19% 0}
.bjm .pk-say{left:100%;top:2px;margin-left:8px;width:max-content;min-width:0;max-width:calc(50cqw - 56px);border-radius:12px;padding:3px 8px;font-size:11.5px;line-height:1.25}
.bjm .pk-say::before{border-width:6px;border-right-width:6px;top:8px}
.bjm .pk-nameplate{position:absolute;left:50%;top:calc(1% + min(64px,12cqh) + 4px);font-size:10px;padding:0 8px;border-radius:6px;white-space:nowrap;z-index:5}

.bjm .bj-dealer{position:absolute;left:50%;top:31%;transform:translate(-50%,-50%);z-index:4;text-align:center;--bjcw:min(50px,9cqh)}
.bjm .bj-cards{min-height:0}
.bjm .bj-tag{font-size:11px;min-width:30px;padding:0 6px;white-space:nowrap}
.bjm .bj-banner{position:absolute;left:50%;top:47%;font-size:min(17px,3.8cqh);padding:1px 14px;border-radius:14px;background:#000b;border:1px solid var(--gold);z-index:4}
.bjm .bj-banner .bj-cd{background:none;padding:0}
.bjm .bj-banner:empty{display:none}
.bjm .bj-bar{position:absolute;top:calc(47% + min(17px,3.8cqh));width:34%;height:4px}
.bjm .bj-ann{font-size:26px;top:38%}

/* other players: small, on the two sides */
.bjm .bj-seat.small{--bjcw:min(32px,6cqh);z-index:3}
.bjm .bj-seat.small .bj-plate{position:absolute;left:0;top:-18px;transform:translateX(-50%);display:flex}
.bjm .bj-seat.small .bj-av{width:min(36px,7cqh);height:min(36px,7cqh);min-width:0;min-height:0;font-size:15px;border-width:2px}
.bjm .bj-seat.small .bj-nm{margin-top:-4px;min-width:56px;max-width:84px;font-size:11px;line-height:1.35;padding:0 6px;position:relative;z-index:2}
.bjm .bj-seat.small .bj-hands{bottom:20px;gap:2px}
.bjm .bj-seat.small .bj-hands:has(.bj-hand:nth-child(2)){--bjcw:min(24px,4.6cqh)}
.bjm .bj-seat.small .bj-hand .bj-tag{font-size:9.5px;padding:0 4px;min-width:20px}
.bjm .bj-seat.small .bj-spot{position:absolute;left:0;top:calc(min(36px,7cqh) - 6px);width:auto;height:auto;transform:translateX(-50%);border:0;background:none;box-shadow:none;animation:none;outline:0;opacity:1}
.bjm .bj-seat.small .bj-spot .bjs{display:none}
.bjm .bj-seat.small .bj-amt{position:static;transform:none;display:block;font-size:11px;padding:0 6px}
.bjm .bj-seat.small .bj-amt:empty{display:none}
.bjm .bj-seat.small .bj-pp{display:none}
.bjm .bj-seat.small.empty{opacity:.4}
.bjm .bj-seat.small.empty .bj-av::after{content:"+";font-size:18px}
.bjm .bj-seat.small.empty .bj-nm::after{content:"פנוי"}
.bjm .bj-seat.small.turn .bj-av{box-shadow:0 0 0 3px #7CFC8A,0 0 14px #7CFC8A}

/* my seat */
.bjm .bj-seat.me{top:calc(100% - min(46px,9cqh));z-index:5;--bjcw:min(78px,15cqh)}
.bjm .bj-seat.me .bj-plate{display:none}
.bjm .bj-seat.me .bj-spot{left:-28px;top:-24px;width:56px;height:56px}
.bjm .bj-table[data-ph=betting] .bj-seat.me .bj-spot{left:-38px;top:-52px;width:76px;height:76px;border-width:3px}
.bjm .bj-seat.me .bj-amt{font-size:13px;white-space:nowrap}
.bjm .bj-amt:empty{background:none;padding:0}
.bjm .bj-table[data-ph=betting] .bj-seat.me .bj-spot .bj-amt:empty{position:absolute;inset:0;transform:none;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.2}
.bjm .bj-table[data-ph=betting] .bj-seat.me .bj-spot .bj-amt:empty::after{content:"ההימור שלי";display:block;width:52px;white-space:normal;font-size:11px;font-weight:500}
.bjm .bj-seat.me .bj-pp{left:36px;top:-8px;width:36px;height:36px}
.bjm .bj-table[data-ph=betting] .bj-seat.me .bj-pp{left:52px;top:-34px;width:40px;height:40px}
.bjm .bj-table:not([data-ph=betting]) .bj-pp:not(:has(.bj-amt:not(:empty))){display:none}
.bjm .bj-seat.me .bj-hands{bottom:36px;gap:6px}
.bjm .bj-seat.me .bj-hand .bj-tag{font-size:13px;padding:0 10px}
.bjm .bj-seat.me .bj-hands:has(.bj-hand:nth-child(2)){--bjcw:min(54px,10.5cqh)}
.bjm .bj-seat.me .bj-hands:has(.bj-hand:nth-child(3)){--bjcw:min(40px,8cqh);gap:3px}
.bjm .bj-seat.me .bj-hands:has(.bj-hand:nth-child(4)){--bjcw:min(32px,7cqh)}

/* buttons: the same height in every phase, so the table never jumps */
.bjm .bj-ctl{flex:none;height:170px;min-height:0;max-width:none;margin:0;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:6px;padding:6px 8px calc(env(safe-area-inset-bottom) + 6px);box-sizing:content-box;background:linear-gradient(#1a0a10,#0b0408);border-top:2px solid var(--gold2)}
.bjm .bj-bet{display:flex;flex-direction:column;gap:6px}
.bjm .bj-ctl .row{margin:0;min-height:0}
.bjm .bj-bet .row:nth-child(1){flex-wrap:nowrap;justify-content:space-around;gap:2px;direction:ltr}
body.phone .bjm .bj-chip{padding:0}.bjm .bj-chip svg{width:48px;height:48px;display:block}
.bjm .bj-bet .row:nth-child(2){display:grid;grid-template-columns:repeat(5,1fr);gap:5px}
.bjm .bj-bet .row:nth-child(3){display:grid;grid-template-columns:1fr 1fr 2fr 1fr;gap:5px}
body.phone .bjm .bj-bet .row:nth-child(2) button{height:34px;padding:0;font-size:13px;white-space:nowrap}
body.phone .bjm .bj-bet .row:nth-child(3) button{height:44px;padding:0;font-size:13px;white-space:nowrap}
body.phone .bjm .bj-bet .bj-big{font-size:16px}
body.phone .bjm [data-bj=target].on{border-color:var(--gold);color:var(--gold);box-shadow:inset 0 0 0 1px var(--gold)}
.bjm .bj-play{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
body.phone .bjm .bj-play button{height:58px;font-size:19px;font-family:var(--display);padding:0}
.bjm .bj-ins{justify-content:center;gap:8px;text-align:center;font-size:14px}.bjm .bj-ins span{flex-basis:100%}
body.phone .bjm .bj-ins button{flex:1;height:50px;font-size:17px}
.bjm .bj-info{text-align:center;font-size:14px;line-height:1.4}
.bjm .bj-bet:not([hidden])~.bj-info,.bjm .bj-play:not([hidden])~.bj-info,.bjm .bj-ins:not([hidden])~.bj-info{display:none}

@media(max-height:680px){
  .bjm .bj-ctl{height:134px;gap:4px;padding-block:4px}
  .bjm .bj-bet{gap:4px}
  .bjm .bj-chip svg{width:40px;height:40px}
  body.phone .bjm .bj-bet .row:nth-child(2) button{height:30px}
  body.phone .bjm .bj-bet .row:nth-child(3) button{height:36px}
  body.phone .bjm .bj-play button{height:46px;font-size:17px}
  .bjm .bj-limits{font-size:8.5px}
}
