/* Buff Box live product photo + animated LCD (shared site-wide) */

.product-live {
  position: relative;
  display: block;
  line-height: 0;
}

.product-live > img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.bb-live-wrap {
  display: block;
  max-width: 100%;
}

.bb-live-wrap--sm {
  max-width: 240px;
}

.bb-live-wrap--md {
  max-width: 360px;
}

.bb-live-wrap--lg {
  max-width: 480px;
}

.bb-live-wrap--hero .product-live > img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(72vh, 620px);
}

.bb-live-wrap:not(.bb-live-wrap--hero) .product-live {
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid var(--blue, #1b4f7a);
  box-shadow: 4px 4px 0 var(--blue, #1b4f7a);
  background: linear-gradient(180deg, #e8eef3 0%, #cfd9e3 100%);
}

.bb-live-wrap--plain .product-live {
  border: none;
  box-shadow: none;
  border-radius: 12px;
}

/*
 * Hotspot = real LCD rect in buff-fuel-kiosk-hero / buff-box-product (864×1152).
 * Stage = fixed design canvas; JS sets --bb-scale.
 */
.bb-lcd-hotspot {
  --bb-left: 20.9%;
  --bb-top: 66.1%;
  --bb-w: 30.2%;
  --bb-h: 15.2%;
  --bb-stage-w: 300;
  --bb-stage-h: 222;
  --bb-scale: 0.35;

  position: absolute;
  left: var(--bb-left);
  top: var(--bb-top);
  width: var(--bb-w);
  height: var(--bb-h);
  overflow: hidden;
  border-radius: 2px;
  background: #0a0a0a;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 10px rgba(100, 180, 255, 0.22);
  font-family: Arial, Helvetica, sans-serif;
}

.bb-lcd-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--bb-stage-w) * 1px);
  height: calc(var(--bb-stage-h) * 1px);
  transform-origin: 0 0;
  transform: scale(var(--bb-scale));
  font-size: 11px;
  line-height: 1.15;
}

.bb-lcd-glass {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.03) 28%,
    transparent 45%,
    rgba(0, 0, 0, 0.08) 100%
  );
  border-radius: inherit;
}

.bb-frame {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  background: #fff8ed;
  z-index: 1;
  overflow: hidden;
}

.bb-frame.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.bb-frame.bb-phase-ready {
  background: #0d7a3e;
}

.bb-frame.bb-phase-fueling {
  background: #1b4f7a;
}

.bb-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1b4f7a;
  color: #fff;
  padding: 4px 8px;
  font-size: 10px;
  flex-shrink: 0;
  line-height: 1.2;
}

.bb-brand {
  font-weight: 800;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.bb-airport {
  color: #fff8ed;
  opacity: 0.95;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.bb-net {
  color: #3dce7a;
  font-weight: 700;
  font-size: 9px;
  flex-shrink: 0;
}

.bb-pricebar {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  background: #e6f0f8;
  color: #1b4f7a;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1.2;
}

.bb-pumpid {
  color: #666;
  font-weight: 600;
  font-size: 9px;
}

.bb-body {
  flex: 1;
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.bb-body.bb-center {
  align-items: center;
  text-align: center;
}

.bb-title {
  font-size: 18px;
  font-weight: 800;
  color: #1b4f7a;
  line-height: 1.1;
  margin: 0 0 4px;
}

.bb-title.white { color: #fff; }
.bb-title.left { align-self: flex-start; text-align: left; }

.bb-status-ok {
  font-size: 16px;
  font-weight: 800;
  color: #0d7a3e;
  margin: 2px 0 4px;
}

.bb-sub {
  font-size: 13px;
  font-weight: 700;
  color: #222;
  margin: 2px 0;
}

.bb-sub.white { color: #fff; }
.bb-sub.cream { color: #fff8ed; }
.bb-sub.dark { color: #222; }

.bb-fine {
  font-size: 10px;
  color: #666;
  margin: 2px 0;
  line-height: 1.25;
}

.bb-fine.dark { color: #333; }
.bb-fine.cream { color: #fff8ed; opacity: 0.95; }
.bb-fine.left { align-self: flex-start; text-align: left; }

.bb-qr {
  width: 72px;
  height: 72px;
  margin: 4px 0 0;
  background: #fff;
  border: 2px solid #fff;
  border-radius: 2px;
  image-rendering: pixelated;
  object-fit: contain;
}

.bb-pin {
  font-size: 36px;
  font-weight: 800;
  color: #e85d04;
  letter-spacing: 0.06em;
  line-height: 1;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}

.bb-gallons {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin: 2px 0;
  font-variant-numeric: tabular-nums;
}

.bb-gallons.blue {
  color: #1b4f7a;
}

.bb-total {
  font-size: 20px;
  font-weight: 800;
  color: #e85d04;
  margin: 4px 0 0;
  font-variant-numeric: tabular-nums;
}

.bb-live-caption {
  margin: 10px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue, #1b4f7a);
  line-height: 1.35;
}

.bb-live-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.bb-live-dots button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--blue, #1b4f7a);
  background: #fff;
  color: var(--blue, #1b4f7a);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.bb-live-dots button:hover {
  background: #e8f4fc;
}

.bb-live-dots button.is-active {
  background: var(--blue, #1b4f7a);
  color: #fff;
}

/* Hero overlay dots (kiosk) — white on blue bar */
.hero-overlay .bb-live-dots,
.hero-overlay .screen-demo-dots {
  margin: 0 0 16px;
}

.hero-overlay .bb-live-dots button,
.hero-overlay .screen-demo-dots button {
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.hero-overlay .bb-live-dots button:hover,
.hero-overlay .screen-demo-dots button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-overlay .bb-live-dots button.is-active,
.hero-overlay .screen-demo-dots button.is-active {
  background: #fff;
  color: var(--blue, #1b4f7a);
  border-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .bb-frame {
    transition: none;
  }
}
