/* style-groups.css - the DESIGN of the bar's groups (owner list + QR sheet + "My group" sheet). Function: js/11e-bar-groups.js. */
.grp-new { background: #1C1C1E; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.grp-kinds { display: flex; gap: 6px; }
.grp-kinds button { flex: 1 1 0; min-width: 0; }
.grp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.grp-card { background: #1C1C1E; border-radius: 14px; padding: 10px 12px; }
.grp-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.grp-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-arrow { width: 18px; text-align: center; color: #9A9A9A; }
.grp-total { font-weight: 700; }
.grp-payer { color: #9A9A9A; font-size: 13px; margin: 4px 0 6px 26px; }
.grp-members { list-style: none; margin: 4px 0 8px 18px; padding: 0 0 0 8px; border-left: 2px solid #34c759; display: flex; flex-direction: column; gap: 6px; }
.grp-member { display: flex; align-items: center; gap: 8px; }
.grp-mname { flex: 1; min-width: 0; }
.grp-sub { font-size: 14px; }
.grp-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.grp-qr { display: block; margin: 12px auto; width: min(70vw, 280px); height: auto; background: #fff; padding: 10px; border-radius: 12px; }
.grp-link { word-break: break-all; text-align: center; }

/* Groups, redesign 2026-11-04 (Kuma): "+ New group" button, small-but-roomy cards, everything else in a big pop-up with a round X that stays on top. */
.grp-page { padding-top: 8px; }
.grp-newbtn { width: 100%; margin-bottom: 12px; font-size: 17px; padding: 13px; }
.grp-card { cursor: pointer; padding: 14px 16px; border: 1px solid #2C2C2E; }
.grp-card:active { background: #26262A; }
.grp-card-top { display: flex; align-items: center; gap: 10px; }
.grp-card-name { flex: 1; min-width: 0; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-card-total { font-size: 19px; font-weight: 800; }
.grp-card-line { color: #B5B5BA; font-size: 15px; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bar-sheet-inner:has(#grp-pop) { min-height: 70vh; max-height: 92vh; }
.grp-pop-sum { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 20px; margin: 2px 0 4px; }
#bar-sheet .grp-members { margin: 6px 0 10px; padding: 0; border-left: 0; gap: 10px; }
#bar-sheet .grp-member { align-items: flex-start; }
.grp-mname { overflow-wrap: anywhere; }
.grp-mname .grp-sub { color: #9A9A9A; margin-top: 2px; }
.grp-mbtns { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
#bar-sheet .grp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.grp-pname { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
/* The game button in the group chat's top bar: a clear green circle so it looks tappable (Kuma 2026-11-04) */
#btn-chat-games { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 2px solid #34c759; background: rgba(52,199,89,.18); font-size: 19px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; margin: 0 4px; flex-shrink: 0; }
#btn-chat-games:active { background: rgba(52,199,89,.4); }

/* Interactive games (Kuma 2026-11-04) */
.game-q { margin: 10px 0 4px; font-weight: 700; }
.game-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.game-opt { flex: 1 1 0; min-width: 84px; background: #2C2C2E; color: #EDEDED; border: 2px solid transparent; }
.game-opt.on { background: #123D22; border-color: #34C759; color: #fff; }
.game-wheel-wrap { position: relative; width: min(78vw, 300px); margin: 6px auto 12px; }
.game-pointer { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 28px; color: #FFD60A; z-index: 2; text-shadow: 0 1px 3px #000; }
.game-wheel { width: 100%; height: auto; border-radius: 50%; box-shadow: 0 0 0 4px #FFD60A, 0 6px 18px #000a; }
.game-dice { display: flex; justify-content: center; gap: 22px; font-size: 96px; line-height: 1; margin: 6px 0 12px; }
.game-dice .shake { transform: rotate(14deg) scale(1.08); } .game-dice span { transition: transform .08s; display: inline-block; }
.game-players { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-direction: column; gap: 4px; }
.game-players li { display: flex; justify-content: space-between; gap: 8px; background: #26262A; border-radius: 10px; padding: 7px 10px; overflow-wrap: anywhere; }
.game-cards { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.game-card { background: #26262A; border-radius: 12px; padding: 10px 12px; border: 1px solid #34C75955; }
.game-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 17px; }
.game-landed { text-align: center; font-size: 26px; font-weight: 800; color: #FFD60A; margin: 4px 0 8px; }

/* Winner / loser screens */
.game-result { border-radius: 16px; padding: 16px; text-align: center; margin-bottom: 10px; border: 3px solid; }
.game-result.win { background: #0F3320; border-color: #2FDE76; } .game-result.win h2 { color: #2FDE76; }
.game-result.lose { background: #3A1512; border-color: #FF6B60; } .game-result.lose h2 { color: #FF6B60; }
.game-result h2 { font-size: 30px; margin: 2px 0 6px; } .game-big { font-size: 64px; line-height: 1.1; }
.game-who { font-size: 17px; margin-bottom: 10px; }
.game-wl { display: flex; gap: 10px; } .game-wl > div { flex: 1; background: #00000044; border-radius: 12px; padding: 8px; overflow-wrap: anywhere; }
.game-scores li b { font-size: 18px; }

/* Trivia */
.tri-topics .game-opt { min-width: 110px; }
.tri-bar { height: 10px; background: #2C2C2E; border-radius: 6px; overflow: hidden; margin: 4px 0 10px; }
.tri-bar i { display: block; height: 100%; width: 100%; background: #34C759; transition: width .2s linear; } .tri-bar i.low { background: #FF6B60; }
.tri-q { font-size: 20px; font-weight: 700; margin: 6px 0 10px; overflow-wrap: anywhere; }
.tri-answers { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.tri-ans { text-align: left; background: #2C2C2E; color: #EDEDED; border: 2px solid #4a4a4e; font-size: 17px; padding: 12px 14px; overflow-wrap: anywhere; }
.tri-ans.right { background: #123D22; border-color: #34C759; } .tri-ans.wrong { background: #3A1512; border-color: #FF6B60; }
.tri-ask { background: #3A2A10; border: 2px solid #FFB547; border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.tri-life { margin-bottom: 8px; }

/* Guess Who */
.gw-turn { text-align: center; margin: 6px 0 10px; }
.gw-clock { font-size: 64px; font-weight: 800; font-variant-numeric: tabular-nums; color: #34C759; line-height: 1.1; } .gw-clock.low { color: #FF6B60; }

.gw-name { font-size: 30px; font-weight: 800; margin: 8px 0; overflow-wrap: anywhere; color: #FFD60A; }

/* Guess Who, the others' screen: the portrait photo fills the phone, the clock and the name sit ON the picture, the button stays visible below */
#bar-sheet-inner.gw-full { padding: 8px; max-height: 100dvh; }
.gw-stage { position: relative; border-radius: 14px; overflow: hidden; background: #26262A; margin-bottom: 8px; }
.gw-photo { display: block; width: 100%; height: auto; max-height: 66dvh; object-fit: cover; object-position: center 22%; }
.gw-stage.nophoto { min-height: 40dvh; display: flex; align-items: center; justify-content: center; }
.gw-over { position: absolute; z-index: 2; text-shadow: 0 1px 4px #000, 0 0 8px #000; }
.gw-clock.gw-over { top: 6px; left: 10px; font-size: 40px; background: rgba(0,0,0,.45); border-radius: 10px; padding: 0 10px; }
.gw-name.gw-over { left: 0; right: 0; bottom: 0; margin: 0; padding: 26px 8px 8px; text-align: center; font-size: 28px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.gw-stage.nophoto .gw-name.gw-over { position: static; background: none; }
.gw-stage.nophoto .gw-clock.gw-over { position: absolute; }
.gw-hide { display: none; } .gw-credit { display: block; text-align: center; color: #8E8E93; font-size: 11px; margin-bottom: 6px; }

/* Guess Who picture manager (admin) */
.pic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.pic-cell { background: #1C1C1E; border-radius: 10px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.pic-cell b { font-size: 12px; overflow-wrap: anywhere; } .pic-cell small { font-size: 11px; color: #9A9A9A; overflow-wrap: anywhere; }
.pic-img { aspect-ratio: 3 / 4; background: #26262A; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pic-img img { width: 100%; height: 100%; object-fit: cover; }
.pic-big { display: block; width: min(60vw, 240px); margin: 4px auto 8px; border-radius: 12px; }

.map-box { height: 46dvh; min-height: 260px; border-radius: 12px; overflow: hidden; margin: 6px 0; background: #26262A; }

.kp-inbox { list-style: none; padding: 0; margin: 4px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.kp-msg { background: #26262A; border-radius: 12px; padding: 10px; overflow-wrap: anywhere; } .kp-msg.new { border: 2px solid #FFB547; }
.kp-msg textarea { margin: 6px 0; }

/* Drink If... */
.di-card { border-radius: 18px; padding: 24px 16px; margin: 8px 0 12px; text-align: center; border: 3px solid; background: #1C1C1E; }
.di-card.di-mild { border-color: #34C759; } .di-card.di-spicy { border-color: #FF9F0A; } .di-card.di-wild { border-color: #FF3B30; }
.di-text { font-size: 24px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.di-clock { text-align: center; font-size: 28px; font-weight: 800; color: #FFB547; font-variant-numeric: tabular-nums; }
.di-btns button { flex: 1 1 0; min-height: 60px; font-size: 18px; } .di-btns button.on { outline: 3px solid #fff; }
.di-reveal { text-align: center; font-size: 20px; margin: 6px 0; } .di-names { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0; } .di-names span { background: #3A2A10; border: 1px solid #FFB547; border-radius: 16px; padding: 5px 12px; }
.di-foot { text-align: center; opacity: .8; font-size: 12px; }

/* Prize drink picker: drinks only, with pictures */
.prize-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; } .prize-tabs button { flex: 0 0 auto; }
.prize-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0 10px; }
.prize-item { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 0 0 8px; text-align: left; background: #26262A; color: #EDEDED; border: 2px solid #3A3A3C; border-radius: 14px; overflow: hidden; }
.prize-item img, .prize-ph { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 54px; background: #1C1C1E; }
.prize-item b, .prize-item small, .prize-price { padding: 0 10px; overflow-wrap: anywhere; } .prize-item b { font-size: 15px; } .prize-item small { color: #9A9A9A; font-size: 12px; } .prize-price { font-weight: 800; color: #FFB547; }
.prize-item:active { border-color: #FFB547; }

/* "Join the running game": grey when nothing runs, green when a game is on (Kuma 2026-11-05) */
.game-running { width: 100%; background: #3A3A3C !important; color: #8E8E93 !important; } .game-running:disabled { opacity: .7; cursor: default; }
.game-running.on { background: #34C759 !important; color: #06210E !important; font-weight: 800; animation: runPulse 1.6s ease-in-out infinite; } @keyframes runPulse { 50% { box-shadow: 0 0 0 4px rgba(52,199,89,.35); } }

/* platform fees */
.pf-tag { margin-left: 6px; padding: 1px 7px; border-radius: 10px; background: #FFB547; color: #1b1100; font-weight: 800; font-size: 12px; }
.pf-code { text-align: center; margin: 10px 0; } .pf-code b { display: block; font-size: 44px; letter-spacing: 8px; font-family: monospace; color: #FFD60A; } .pf-code.small b { font-size: 24px; letter-spacing: 4px; }
.pf-list { list-style: none; padding: 0; margin: 4px 0 10px; display: flex; flex-direction: column; gap: 8px; } .pf-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #1C1C1E; border-radius: 10px; padding: 8px 10px; flex-wrap: wrap; }
.pf-wait { border: 2px solid #FFB547; } .bar-chip.pf-confirmed { background: #1b5e2e; } .bar-chip.pf-rejected, .bar-chip.pf-expired { background: #5e1b1b; }
