/* Live events (public/events-ui.js, server/events.js): the strip on the home screen, the badges of the tiles, the sheet. */

/* the strip: as slim as the game of the day's, one row per event */
.ev-home{margin:0 0 .6rem;padding:.5rem .6rem .5rem .7rem;color:var(--fg);background:var(--btn);border:1.5px solid var(--accent-lite);border-left:6px solid #e9c46a;border-radius:var(--radius,14px)}
.col:has(.perks.compact)>.ev-home{margin-top:.7rem}
.col:has(.perks.compact)>.ev-home+.dl-home{margin-top:0}
.ev-home .ev-row+.ev-row{margin-top:.45rem;padding-top:.45rem;border-top:1px solid var(--edge,rgba(127,127,127,.25))}
.ev-home .ev-soon{opacity:.85}

/* the badges of a tile: under the entry fee, top right */
.tile .evbadges{position:absolute;top:2.05rem;right:.5rem;z-index:2;display:flex;gap:.25rem;pointer-events:none}
.tile .evb{display:inline-block;padding:.15rem .45rem;border-radius:99px;font:900 .72rem/1.2 var(--ui);white-space:nowrap}
.tile .evb.x2{color:#2a1a00;background:linear-gradient(135deg,#ffe08a,#f2b33d);box-shadow:0 0 0 2px rgba(255,224,138,.35),0 2px 6px rgba(0,0,0,.3);animation:evPulse 2.4s ease-in-out infinite}
.tile .evb.x2.later{animation:none;opacity:.85;font-weight:800}
.tile .evb.stamp{color:#fff;background:rgba(20,33,61,.82);border:1.5px dashed rgba(233,196,106,.9)}
@keyframes evPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}
@media (prefers-reduced-motion:reduce){.tile .evb.x2{animation:none}}

/* the lobby */
.ev-lobby{margin:.6rem 0 0;padding:.45rem .6rem;border-radius:8px;font-weight:700;color:#2a1a00;background:#ffe08a}

/* the sheet */
.ev-tabs{display:flex;flex-wrap:wrap;gap:.35rem;margin:.2rem 0 .5rem}
.ev-tabs button{padding:.35rem .7rem;border-radius:99px;border:1.5px solid var(--accent-lite);background:transparent;color:inherit;font:700 .82rem/1.2 var(--ui);cursor:pointer}
.ev-tabs button.on{background:var(--accent-lite);color:#111}
.ev-ends{margin:.1rem 0 .6rem}
.ev-guest{margin:.4rem 0 .8rem;padding:.55rem .7rem;border-radius:10px;background:rgba(233,196,106,.18);font-weight:600}
.ev-small{font-size:.82rem;margin:.6rem 0}
.ev-state{font-weight:700;margin:.2rem 0 .6rem}
.ev-state.live{color:#e9a20c}
.ev-won{margin:.6rem 0;padding:.45rem .6rem;border-radius:8px;background:rgba(233,196,106,.2);font-weight:700;text-align:center}

/* the passport */
.ev-cover{display:flex;flex-direction:column;align-items:center;gap:.2rem;padding:.9rem .8rem .8rem;border-radius:12px;color:#e9c46a;background:#14213d;border:3px double #e9c46a;text-align:center}
.ev-cover>span:first-child{font:700 1.3rem/1.1 Georgia,'Times New Roman',serif;letter-spacing:.12em}
.ev-cover>b{font:700 1.05rem/1.2 Georgia,'Times New Roman',serif;color:#f1e9d2}
.ev-bar,.ev-meter{display:block;width:100%;height:8px;border-radius:99px;background:rgba(127,127,127,.3);overflow:hidden}
.ev-bar{max-width:260px;margin-top:.3rem}
.ev-bar i,.ev-meter i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#e9c46a,#f2b33d)}
.ev-steps{list-style:none;margin:.7rem 0;padding:0;display:grid;gap:.3rem}
.ev-steps li{display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem .6rem;padding:.4rem .6rem;border-radius:8px;border:1px solid var(--edge,rgba(127,127,127,.3))}
.ev-steps li b{min-width:6.5rem}
.ev-steps li span{color:var(--fg2)}
.ev-steps li em{margin-left:auto;font-style:normal;font-weight:700;color:#3d8a4c}
.ev-steps li.reached,.ev-steps li.paid{border-color:#e9c46a;background:rgba(233,196,106,.12)}
.ev-stamps{list-style:none;margin:.6rem 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:.55rem .4rem}
.ev-stamp{display:flex;flex-direction:column;align-items:center;gap:.2rem;text-align:center;min-width:0}
.ev-seal{display:grid;place-items:center;width:58px;height:58px;border-radius:50%;font-size:1.5rem;color:rgba(233,196,106,.8);border:2px dashed rgba(127,127,127,.45);transform:rotate(var(--r,0deg))}
.ev-stamp.got .ev-seal{color:#fff;border:3px double rgba(255,255,255,.8);background:radial-gradient(circle at 35% 30%,var(--t1),var(--t2));box-shadow:0 2px 6px rgba(0,0,0,.3)}
.ev-stamp small{font-size:.66rem;line-height:1.15;max-width:100%;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--fg2)}
.ev-stamp.got small{color:var(--fg);font-weight:700}
.ev-pagebox{max-width:300px;margin:.8rem auto;border-radius:8px;overflow:hidden;box-shadow:0 6px 22px rgba(0,0,0,.35);transform:rotate(1deg)}
.ev-canvas{display:block;width:100%;height:auto;aspect-ratio:4/5;background:#14213d}
@media (prefers-reduced-motion:reduce){.ev-pagebox{transform:none}}

/* the happy hour's games */
.ev-games{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:.5rem;margin:.4rem 0}
.ev-game{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;padding:.7rem;border:0;border-radius:12px;color:#fff;text-align:left;background:linear-gradient(135deg,var(--t1),var(--t2));cursor:pointer;font:inherit}
.ev-game i{font-style:normal;font-size:1.6rem}
.ev-game b{font-size:.95rem}
.ev-game span{position:absolute;top:.5rem;right:.5rem;padding:.1rem .45rem;border-radius:99px;color:#2a1a00;background:#ffe08a;font-weight:900;font-size:.75rem}
.ev-games+.ev-won{margin-top:.2rem}

/* the challenges */
.ev-chs{list-style:none;margin:.4rem 0;padding:0;display:grid;gap:.45rem}
.ev-ch{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.3rem .6rem;padding:.55rem .65rem;border-radius:10px;border:1px solid var(--edge,rgba(127,127,127,.3))}
.ev-ch>div{grid-column:1/-1;display:flex;flex-wrap:wrap;justify-content:space-between;gap:.2rem .6rem}
.ev-ch>div span{color:var(--fg2);font-size:.85rem}
.ev-ch>em{font-style:normal;font-weight:800;font-size:.85rem}
.ev-ch.done,.ev-ch.paid{border-color:#e9c46a;background:rgba(233,196,106,.12)}
.ev-ch.all{border-style:dashed}
.ev-kinds{grid-column:1/-1;margin:0;display:flex;flex-wrap:wrap;gap:.3rem}
.ev-kinds span{padding:.1rem .45rem;border-radius:99px;font-size:.75rem;border:1px solid rgba(127,127,127,.4);opacity:.6}
.ev-kinds span.on{opacity:1;border-color:#e9c46a;background:rgba(233,196,106,.2);font-weight:700}

/* the league */
.ev-table{width:100%;border-collapse:collapse;margin:.4rem 0}
.ev-table td,.ev-table th{padding:.35rem .4rem;border-bottom:1px solid var(--edge,rgba(127,127,127,.25));text-align:left}
.ev-table td:last-child{text-align:right;font-weight:700;white-space:nowrap}
.ev-table tr.me{background:rgba(233,196,106,.16)}
