/* Banker's Offer. All classes use the bo- prefix. */

.bo-screen { padding: 0; display: grid; grid-template-columns: 210px minmax(0, 1fr) 210px; height: clamp(640px, calc(100vh - 176px), 760px); min-height: 0; }

/* values boards */
.bo-vals { padding: 14px 16px; border-right: 1px solid var(--s-line); display: flex; flex-direction: column; min-height: 0; }
.bo-vals.hi { border-right: 0; border-left: 1px solid var(--s-line); }
.bo-vh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--s-dim); }
.bo-vh b { font-size: 12px; color: var(--s-text); letter-spacing: 0; }
.bo-vl { flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(13, minmax(0, 1fr)); gap: 6px; }
.bo-v { position: relative; display: flex; align-items: center; justify-content: flex-end; padding: 0 12px; border-radius: 8px; font: 800 15.5px Inter, sans-serif; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: #d8e6ff; background: linear-gradient(90deg, #172338, #22385a); border: 1px solid #2d4468; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); transition: background .5s, color .5s, border-color .5s; overflow: hidden; }
.bo-v::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #5d8ad6; }
.hi .bo-v { color: #ffe1a1; background: linear-gradient(90deg, #2e2008, #57400f); border-color: #6e5016; }
.hi .bo-v::before { background: var(--you); }
.bo-v.out { color: var(--s-faint); background: var(--s-panel); border-color: var(--s-line); box-shadow: none; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.bo-v.out::before { background: var(--s-line); }
.bo-v.hit { animation: boHit 1.1s ease-out; }
@keyframes boHit { 0% { background: var(--down); color: #fff; transform: scale(1.04); } 60% { background: color-mix(in srgb, var(--down) 35%, var(--s-panel)); } }
.bo-v.final { outline: 2px solid var(--up); outline-offset: 1px; color: #fff; text-decoration: none; }

/* center */
.bo-center { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 14px 20px 16px; gap: 12px; }
.bo-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.bo-prompt small { display: block; font: 600 11px 'IBM Plex Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--you); }
.bo-prompt b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.bo-rounds { display: flex; gap: 4px; }
.bo-rounds span { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 34px; height: 36px; border-radius: 7px; border: 1px solid var(--s-line); background: var(--s-panel); font: 600 9px 'IBM Plex Mono', monospace; color: var(--s-faint); line-height: 1.15; }
.bo-rounds span b { font-size: 13px; color: var(--s-dim); }
.bo-rounds span.done { opacity: .42; border-style: dashed; }
.bo-rounds span.done b { color: var(--s-dim); }
.bo-rounds span.on { border-color: var(--you); background: color-mix(in srgb, var(--you) 14%, var(--s-panel)); color: var(--you); }
.bo-rounds span.on b { color: var(--s-text); }

.bo-grid-wrap { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.bo-grid { width: 100%; max-width: 900px; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); column-gap: 12px; row-gap: 14px; transition: opacity .4s, filter .4s; }
.bo-grid.wait { opacity: .55; filter: saturate(.5); pointer-events: none; }
.bo-call { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 14px; background: rgba(12,13,17,.92); border: 1px solid var(--s-line); box-shadow: 0 18px 50px rgba(0,0,0,.5); font-size: 17px; white-space: nowrap; }
.bo-call.on { display: flex; animation: boPop .35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes boPop { from { opacity: 0; transform: translate(-50%, -40%); } }
.bo-ring { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--you); }
.bo-ring::before, .bo-ring::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--you); animation: boRing 1.1s infinite; }
.bo-ring::after { animation-delay: .4s; }
@keyframes boRing { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* the case */
.bo-case { position: relative; appearance: none; border: 0; background: none; padding: 0; cursor: pointer; aspect-ratio: 1.42; color: #111; font-family: Inter, sans-serif; perspective: 500px; }
.bo-case:disabled { cursor: default; }
.bo-handle { position: absolute; left: 50%; top: 0; width: 34%; height: 15%; transform: translateX(-50%); border: 3.5px solid #8e949d; border-bottom: 0; border-radius: 9px 9px 0 0; background: none; }
.bo-shell { position: absolute; left: 0; right: 0; top: 12%; bottom: 0; border-radius: 7px; transform-origin: 50% 0; transition: transform .45s cubic-bezier(.5,0,.7,.4), opacity .45s, box-shadow .2s;
  background:
    linear-gradient(180deg, transparent 37%, rgba(0,0,0,.28) 37%, rgba(0,0,0,.28) 39.5%, rgba(255,255,255,.55) 39.5%, rgba(255,255,255,.55) 41%, transparent 41%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #eef1f4 0%, #c3c8cf 40%, #a7adb6 41%, #c8cdd4 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -3px 0 rgba(0,0,0,.22), inset 0 0 0 1px rgba(0,0,0,.25), 0 8px 16px -8px rgba(0,0,0,.9); }
.bo-latch { position: absolute; top: 31%; width: 13%; height: 19%; border-radius: 3px; background: linear-gradient(180deg, #6a7079, #2b2f35); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.bo-latch.l { left: 12%; } .bo-latch.r { right: 12%; }
.bo-num { position: absolute; left: 50%; top: 68%; transform: translate(-50%, -50%); min-width: 42%; padding: 1px 6px; text-align: center; border-radius: 5px; background: #fbfaf5; box-shadow: inset 0 0 0 1.5px #1a1a1a, 0 1px 2px rgba(0,0,0,.4); font: 900 clamp(12px, 1.35vw, 19px) Inter, sans-serif; letter-spacing: -.02em; color: #111; }
.bo-case:not(:disabled):hover .bo-shell { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -3px 0 rgba(0,0,0,.22), inset 0 0 0 1px rgba(0,0,0,.25), 0 0 0 2px var(--you), 0 14px 20px -8px rgba(0,0,0,.9); }
.bo-case:not(:disabled):hover .bo-handle { transform: translate(-50%, -3px); }
.bo-val { position: absolute; left: 0; right: 0; top: 12%; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 7px; background: #0f1116; border: 1px solid var(--s-line); opacity: 0; transform: scale(.85); transition: opacity .3s .25s, transform .35s .25s cubic-bezier(.2,.9,.3,1.3); }
.bo-val small { position: absolute; left: 7px; top: 4px; font: 600 9.5px 'IBM Plex Mono', monospace; color: var(--s-faint); }
.bo-val b { font: 800 clamp(11px, 1.15vw, 16px) Inter, sans-serif; letter-spacing: -.02em; color: #b9d0ff; font-variant-numeric: tabular-nums; }
.bo-val.hi b { color: var(--you); }
.bo-case.open .bo-shell { transform: rotateX(78deg) translateY(-6px); opacity: 0; }
.bo-case.open .bo-handle { opacity: 0; transition: opacity .2s; }
.bo-case.open .bo-val { opacity: 1; transform: none; }
.bo-case.open.old .bo-val { opacity: .55; }
.bo-case.mine .bo-shell, .bo-case.mine .bo-handle { opacity: 0; }
.bo-case.mine::after { content: 'Yours'; position: absolute; left: 0; right: 0; top: 12%; bottom: 0; display: flex; align-items: center; justify-content: center; border: 1.5px dashed #4a5163; border-radius: 7px; font: 600 11px 'IBM Plex Mono', monospace; color: var(--s-faint); }

/* bottom deck */
.bo-deck { flex: none; display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 300px); gap: 12px; min-height: 178px; }
.bo-mine { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 12px; padding: 12px; }
.bo-mine-case { width: 128px; }
.bo-mine-case .bo-case { width: 100%; display: block; }
.bo-mine-case .bo-num { font-size: 26px; background: var(--you); box-shadow: inset 0 0 0 1.5px #3a2600, 0 1px 2px rgba(0,0,0,.4); }
.bo-mine-case .bo-val b { font-size: 19px; }
.bo-mine-empty { width: 128px; aspect-ratio: 1.42; border: 1.5px dashed #4a5163; border-radius: 9px; display: flex; align-items: center; justify-content: center; font: 600 11px 'IBM Plex Mono', monospace; color: var(--s-faint); text-align: center; padding: 8px; }
.bo-mine small { font: 600 11px 'IBM Plex Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--s-dim); }
.bo-pop { animation: boIn .5s cubic-bezier(.2,.9,.3,1.25); }
@keyframes boIn { from { opacity: 0; transform: translateY(18px) scale(.8); } }

.bo-offer { position: relative; display: flex; flex-direction: column; justify-content: center; background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 12px; padding: 14px 18px; transition: border-color .3s, box-shadow .3s; }
.bo-offer.live { border-color: var(--you); box-shadow: inset 0 0 0 1px var(--you); }
.bo-offer .lbl { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--s-dim); }
.bo-offer .amt { font-size: 42px; font-weight: 800; letter-spacing: -.035em; line-height: 1.08; font-variant-numeric: tabular-nums; margin: 2px 0 2px; }
.bo-offer .sub { font-size: 12.5px; color: var(--s-dim); }
.bo-offer .sub b { color: var(--s-text); font-family: 'IBM Plex Mono', monospace; font-weight: 600; }
.bo-offer .acts { display: flex; gap: 8px; margin-top: 12px; }
.bo-offer .acts .s-btn { flex: 1; padding: 12px 14px; font-size: 14.5px; }
.bo-offer .idle { font-size: 13px; color: var(--s-dim); line-height: 1.5; }
.bo-offer .idle b { display: block; color: var(--s-text); font-size: 17px; margin-bottom: 4px; }
.bo-offer .res-up { color: var(--up); } .bo-offer .res-down { color: var(--down); }

.bo-hist { background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 12px; padding: 10px 12px 8px; display: flex; flex-direction: column; min-width: 0; }
.bo-hh { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--s-dim); }
.bo-hh span:first-child { font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.bo-hh span:last-child { font-size: 10.5px; color: var(--s-faint); }
.bo-bars { flex: 1; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; align-items: end; margin-top: 8px; min-height: 100px; }
.bo-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; min-width: 0; }
.bo-bar em { font: 600 9px 'IBM Plex Mono', monospace; font-style: normal; color: var(--s-dim); white-space: nowrap; }
.bo-bar i { display: block; width: 100%; max-width: 22px; border-radius: 3px 3px 0 0; background: #3a4152; transition: height .6s cubic-bezier(.2,.9,.3,1); min-height: 2px; }
.bo-bar.cur i { background: var(--you); }
.bo-bar.took i { background: var(--up); }
.bo-bar span { font: 600 9px 'IBM Plex Mono', monospace; color: var(--s-faint); }
.bo-bar.empty i { background: transparent; border: 1px dashed var(--s-line); border-bottom: 0; height: 10px; }

/* TV wall */
.bo-stage:fullscreen .bo-screen { height: calc(100vh - 98px); }
body.dk-embed .bo-screen { height: calc(100vh - 98px); max-height: none; }

@media (max-width: 1180px) {
  .bo-screen { grid-template-columns: 170px minmax(0, 1fr) 170px; }
  .bo-v { font-size: 13.5px; padding: 0 9px; }
  .bo-deck { grid-template-columns: 150px minmax(0, 1fr); }
  .bo-hist { grid-column: 1 / -1; }
  .bo-screen { height: auto; }
  .bo-vl { grid-template-rows: none; grid-auto-rows: 40px; }
  .bo-grid-wrap { min-height: 380px; }
}
@media (max-width: 760px) {
  .bo-screen { grid-template-columns: 1fr 1fr; }
  .bo-center { grid-column: 1 / -1; grid-row: 1; padding: 12px 12px 14px; }
  .bo-vals { border-top: 1px solid var(--s-line); padding: 12px; }
  .bo-vals.hi { border-left: 1px solid var(--s-line); }
  .bo-vl { grid-auto-rows: 34px; gap: 5px; }
  .bo-v { font-size: 13px; }
  .bo-top { flex-direction: column; align-items: stretch; gap: 10px; }
  .bo-prompt b { font-size: 18px; }
  .bo-rounds span { flex: 1; width: auto; }
  .bo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 8px; row-gap: 10px; }
  .bo-grid .bo-case { grid-column: auto !important; }
  .bo-num { font-size: 15px; }
  .bo-val b { font-size: 11.5px; }
  .bo-grid-wrap { min-height: 0; }
  .bo-deck { grid-template-columns: 1fr; }
  .bo-mine { flex-direction: row; justify-content: flex-start; gap: 14px; }
  .bo-mine-case, .bo-mine-empty { width: 100px; }
  .bo-offer .amt { font-size: 34px; }
}
