/* Rewarded-video offers (portal builds, platforms/playgama/ADS.md; src/ads/*). Design pixels inside the scaled HUD layer. */

/* the wallet column stays above the CLICK TO PLAY overlay so its buttons work once the cursor is free (Esc) */
.wallet { z-index: 3; }

/* ---------- helper icon: under the queue row, top right ---------- */
.adboost { position: relative; pointer-events: auto; display: flex; align-items: center; gap: 8px; height: 50px; width: 148px; padding: 0 8px 0 4px; margin-top: 2px;
  border-radius: 26px 12px 12px 26px; color: var(--text); cursor: pointer; text-align: left; transition: transform 80ms ease-out, filter .15s, border-color .15s; }
.adboost.gone, .adrefill.gone { display: none; }
.adboost:hover { border-color: #8cc4ff; filter: brightness(1.12); }
.adboost:active { transform: translateY(1px) scale(.97); }
.adboost:focus-visible, .adrefill:focus-visible, .adbtn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.adpic { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: #12306a no-repeat; background-size: 264px 104px; background-position: -37px -2px;
  box-shadow: 0 0 0 2px rgba(140,190,255,.75); }
.adtxt { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.adtxt b { font: 800 17px 'Barlow Condensed'; letter-spacing: .03em; white-space: nowrap; }
.adtxt small { font: 800 15px 'Barlow Condensed'; letter-spacing: .04em; color: #5cf07a; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* the video badge: top-right corner (key caps are top-left, badges top-right) */
.adbadge { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font: 800 11px/1 'Barlow'; padding-left: 2px; color: #2a1f00; background: linear-gradient(180deg, #ffe066, #f2b400); box-shadow: 0 0 0 1.5px #fff6c7, 0 2px 6px rgba(0,0,0,.45); }
.adboost.is-ready { border-color: rgba(255,214,80,.85); box-shadow: 0 0 0 1px rgba(8,30,80,.6), 0 0 16px rgba(242,194,0,.35), 0 10px 30px rgba(0,0,0,.35); }
.adboost.is-ready .adpic { animation: adPulse 2.4s ease-in-out infinite; }
@keyframes adPulse { 50% { box-shadow: 0 0 0 2px #ffe066, 0 0 14px rgba(242,194,0,.7); } }
.adboost.is-off { filter: saturate(.45) brightness(.85); }
.adboost.is-off .adtxt small { color: var(--muted); }
.adboost.is-busy { cursor: progress; }
.adboost.is-busy .adtxt small { color: var(--yellow); }
/* running: the badge goes, a countdown ring wraps the portrait */
.adboost.is-on { border-color: rgba(92,240,122,.8); cursor: default; }
.adboost.is-on .adbadge { display: none; }
.adboost.is-on .adpic { box-shadow: none; }
.adboost.is-on .adpic::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(#5cf07a var(--p, 360deg), rgba(255,255,255,.18) 0);
  -webkit-mask: radial-gradient(circle, transparent 17px, #000 18px); mask: radial-gradient(circle, transparent 17px, #000 18px); }
.adboost.is-on .adtxt small { font-size: 18px; }
.layer.tablet-open .adboost { visibility: hidden; }

/* ---------- foam refill button above the tool belt ---------- */
.adrefill { position: absolute; left: 50%; bottom: 86px; transform: translateX(-50%); pointer-events: auto; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 10px;
  border-radius: 26px; color: var(--text); cursor: pointer; border-color: rgba(255,214,80,.85); box-shadow: 0 0 0 1px rgba(8,30,80,.6), 0 0 18px rgba(242,194,0,.4), 0 10px 30px rgba(0,0,0,.35);
  animation: adPulseBtn 1.6s ease-in-out infinite; }
@keyframes adPulseBtn { 50% { box-shadow: 0 0 0 1px rgba(8,30,80,.6), 0 0 26px rgba(242,194,0,.75), 0 10px 30px rgba(0,0,0,.35); } }
.adrefill:hover { filter: brightness(1.12); }
.adrefill.is-busy { cursor: progress; animation: none; filter: saturate(.6); }
.adrefill .adtxt b { font-size: 19px; }
.adrefill .adtxt small { font-size: 14px; color: var(--yellow); letter-spacing: .03em; }
.adplay { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 15px; padding-left: 3px; color: #2a1f00;
  background: linear-gradient(180deg, #ffe066, #f2b400); box-shadow: 0 0 0 1.5px #fff6c7; }
.layer.tablet-open .adrefill { visibility: hidden; }

/* ---------- tablet: video buttons (upgrade cards, employees row) ---------- */
.buy.adbtn { display: flex; align-items: center; justify-content: center; gap: 8px; color: #2a1f00; background: linear-gradient(180deg, #ffe066, #f2b400);
  box-shadow: 0 0 12px rgba(242,194,0,.4), inset 0 1px 0 rgba(255,255,255,.5); }
.buy.adbtn:hover { background: linear-gradient(180deg, #fff08a, #ffc61a); }
.buy.adbtn b { font: 800 20px/1 'Barlow Condensed'; letter-spacing: .02em; white-space: nowrap; }
.buy.adbtn .adplay { width: 24px; height: 24px; font-size: 11px; color: #fff; background: #2a1f00; box-shadow: none; }
.buy.adbtn[disabled] { cursor: progress; }
.lrow.adrow { border-color: rgba(242,194,0,.55); }
.lrow .buy.adbtn { width: auto; padding: 0 16px; height: 40px; }
.lrow .plate.equipped { height: 40px; white-space: nowrap; }
.lrow.adrow .pdesc { font-size: 13px; }

/* ---------- touch: the TABLET button moves under the helper icon ---------- */
html.is-touch .adrefill { bottom: 84px; }
html.is-touch.has-adboost .tbtn.tabletbtn { top: calc(var(--safe-t, 0px) + 192px * var(--k, 1)); }
