/* hydecogames.com ad spots. tools/build_ads.py links this into a page that
   carries one. A spot is a box of exact size: our own promotion fills it, and
   Google's unit sits on top. When Google has nothing, or a blocker hides its
   unit, ours shows in the same place at the same size, so the page never moves
   or shows a hole. The box sizes are in the page's own <style> (SIZE_CSS in
   tools/build_ads.py). It carries its own colours because it sits on two
   different stylesheets: the front page (front.css) and the library (hc-ui.css). */

.hcspot {
  display: block; text-align: center; margin: 34px auto 0; max-width: 970px;
  padding: 8px 0 10px; border-top: 1px solid rgba(255, 138, 40, .22);
  border-bottom: 1px solid rgba(255, 138, 40, .22);
}

/* one label row of fixed height, so changing which label shows moves nothing */
.hcspot__tags { position: relative; height: 16px; margin-bottom: 6px }
.hcspot__tag {
  position: absolute; left: 0; right: 0; top: 0;
  font: 500 12px/16px "Rubik", "Segoe UI", system-ui, sans-serif; color: #8d97b0;
}
.hcspot__tag--g { display: none }
.hcspot:has(ins[data-ad-status="filled"]) .hcspot__tag--g,
.hcspot:has(ins[data-ad-status="unfill-optimized"]) .hcspot__tag--g { display: block }
.hcspot:has(ins[data-ad-status="filled"]) .hcspot__tag--own,
.hcspot:has(ins[data-ad-status="unfill-optimized"]) .hcspot__tag--own { display: none }

/* the box holds its size from the first paint, and nothing inside can change it */
.hcspot__box { position: relative; margin: 0 auto; overflow: hidden; contain: layout paint style }
.hcspot__own { position: absolute; inset: 0; overflow: hidden }
.hcspot__box > ins { position: absolute; left: 0; top: 0 }
.hcspot__box > ins[data-ad-status="unfilled"] { display: none !important }
/* an ad's frame can be see-through: it gets a solid backing, and our layer stops painting */
.hcspot__box > ins[data-ad-status="filled"],
.hcspot__box > ins[data-ad-status="unfill-optimized"] { background: #fff }
.hcspot:has(ins[data-ad-status="filled"]) .hcspot__own,
.hcspot:has(ins[data-ad-status="unfill-optimized"]) .hcspot__own { visibility: hidden }

/* our own promotions: the real product on a dark box, lit from behind in its own colours,
   with live words and a button. A 300x250 box is the base; the other shapes follow it. */
@font-face {
  font-family: "Jersey 10"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../assets/fonts/Jersey10-Regular.ttf") format("truetype");
}
.hcown {
  position: absolute; inset: 0; display: block; overflow: hidden; text-align: left; text-decoration: none;
  background-color: #06070f; color: #f4f1e6; font-family: "Rubik", "Segoe UI", system-ui, sans-serif;
}
.hcown::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13) }
.hcown[hidden] { display: none !important }
.hcown:focus-visible { outline: 3px solid #ffc247; outline-offset: -3px }
.hcown__pic { position: absolute; display: block; background-repeat: no-repeat; background-size: 100% 100% }
.hcown__words { position: absolute; z-index: 1; display: block; left: 16px; top: 14px; right: 14px }
.hcown__name { display: block; font: 400 36px/.92 "Jersey 10", "Rubik", sans-serif; color: #f4f1e6; letter-spacing: .005em }
.hcown__line { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.3; color: #c7cde0 }
.hcown__go {
  position: absolute; z-index: 1; left: 16px; bottom: 16px; padding: 8px 14px; border-radius: 3px;
  background: #ff8a28; color: #0b0f24; font-size: 14.5px; font-weight: 700; line-height: 1.2; white-space: nowrap;
}
.hcown:hover .hcown__go, .hcown:focus-visible .hcown__go { background: #ffc247 }

/* HydeInk: the editor's window, running off the box's bottom edge */
.hcown--canvas { background-image: radial-gradient(60% 70% at 88% 12%, rgba(25, 227, 207, .35), transparent 72%), radial-gradient(60% 70% at 60% 90%, rgba(177, 77, 255, .4), transparent 72%) }
.hcown--canvas .hcown__pic {
  left: 16px; top: 78px; width: 490px; height: 264px; border-radius: 4px; background-image: url("/assets/own/canvas-1.webp");
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 30px rgba(0, 0, 0, .6);
}

/* the kits: a pile of the models they hold */
.hcown--kits { background-image: radial-gradient(70% 62% at 66% 78%, rgba(255, 138, 40, .5), transparent 72%) }
.hcown--kits .hcown__pic { left: -6px; top: 72px; width: 310px; height: 175px; background-image: url("/assets/own/props-1.webp") }
.hcown--kits .hcown__name { font-size: 40px }

/* the tower beside the shirts: 300x600 */
.hcspot--tall .hcown__words { left: 20px; top: 20px; right: auto; width: 232px }
.hcspot--tall .hcown__line { margin-top: 9px; font-size: 14.5px }
.hcspot--tall .hcown__go { left: 20px; bottom: 20px }

/* the billboard: 970x250 on a desk, a 300x250 box under 1000 wide */
@media (min-width: 1000px) {
  .hcspot--bill .hcown__words { left: 30px; top: 38px; right: auto; width: 346px }
  .hcspot--bill .hcown__name { font-size: 62px; white-space: nowrap }
  .hcspot--bill .hcown__line { margin-top: 10px; font-size: 16px }
  .hcspot--bill .hcown__go { left: 30px; bottom: 36px; padding: 9px 18px; font-size: 15px }
}

/* the library panel's box: 300x250, or 250x250 where the panel is narrower */
@media (max-width: 1200px) {
  .hcspot--box .hcown__words { left: 14px; top: 12px; right: 10px }
  .hcspot--box .hcown__name { font-size: 33px }
  .hcspot--box .hcown__line { font-size: 13px }
  .hcspot--box .hcown__go { left: 14px; bottom: 14px }
  .hcspot--box .hcown--canvas .hcown__pic { left: 14px; top: 76px; width: 430px; height: 232px }
}

/* the asset library: the foot of the side panel. Only on a desk screen tall
   enough that the details keep their room and the ad stays clear of the panel's
   download buttons; the details scroll above it. */
#side > .hcspot--box { display: none }
@media (min-width: 901px) and (min-height: 900px) {
  #side:has(> .hcspot--box) {
    --hc-pane-display: flex; display: flex; flex-direction: column; overflow: hidden; padding: 0;
  }
  #side:has(> .hcspot--box) > #sideBody { flex: 1; min-height: 0; overflow: auto; padding: 14px }
  #side > .hcspot--box {
    display: block; flex: none; margin: 0; padding: 8px 10px 10px; border-bottom: 0;
    background: var(--hc-bg-2, #14171c);
  }
}
