/* Pop Market shares the live board data and event lifecycle with the other themes. */
#branding .theme-preset-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.preset-preview.pop {
  background: linear-gradient(180deg, #244ad9 0 32%, transparent 32%),
    linear-gradient(90deg, #ffe76b 0 33%, #ffd3c6 33% 66%, #f5f0e4 66%);
}

[data-pop-hide][hidden] { display: none !important; }

body .theme-tv-preview.theme-preset-pop {
  --pop-paper: var(--theme-background-color, #f5f0e4);
  --pop-ink: var(--theme-text-color, #191919);
  --pop-blue: var(--theme-accent-color, #244ad9);
  --pop-coral: var(--theme-crash-color, #ff704e);
  container-type: inline-size;
  isolation: isolate;
  padding: 0 !important;
  background: var(--pop-paper) !important;
  color: var(--pop-ink);
  box-shadow: none;
  font-family: Arial, Helvetica, sans-serif;
  transition: none !important;
}

body .theme-tv-preview.theme-preset-pop::before,
body .theme-tv-preview.theme-preset-pop::after,
body .theme-tv-preview.theme-preset-pop .animated-market-bg,
body .theme-tv-preview.theme-preset-pop .market-signal-panel,
body .theme-tv-preview.theme-preset-pop .market-mover-spotlight,
body .theme-tv-preview.theme-preset-pop .cheapest-callout,
body .theme-tv-preview.theme-preset-pop .boxes-drink-icon {
  display: none !important;
}

body .theme-tv-preview.theme-preset-pop .ticker {
  position: absolute !important;
  inset: 0 0 auto !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0.7cqw 3cqw !important;
  border: 0;
  background: var(--pop-blue) !important;
  color: #fff !important;
  font-size: clamp(9px, 1.1cqw, 25px) !important;
  box-shadow: none !important;
  animation: none !important;
}

body .theme-tv-preview.theme-preset-pop .ticker-track,
body .theme-tv-preview.theme-preset-pop .instruction-track {
  color: inherit !important;
  text-shadow: none !important;
  animation: tickerScroll 38s linear infinite;
}

body .theme-tv-preview.theme-preset-pop.event-open .board-title {
  position: absolute !important;
  inset: 4.5% 0 auto !important;
  display: flex !important;
  align-items: center;
  gap: 0.3em;
  width: 100% !important;
  height: 18%;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 1cqw 3cqw !important;
  box-sizing: border-box;
  background: var(--pop-blue);
  color: var(--board-title-color, #fff) !important;
  font-family: var(--board-title-font, 'Arial Black', Arial, sans-serif) !important;
  font-size: var(--pop-title-fit-size, clamp(24px, 7cqw, 180px)) !important;
  font-weight: 900;
  line-height: 0.95 !important;
  letter-spacing: -0.035em !important;
  text-align: left;
  text-shadow: none !important;
  transform: none !important;
  overflow: hidden;
  white-space: nowrap;
}

body .theme-tv-preview.theme-preset-pop.event-open .board-title span {
  display: inline !important;
  padding: 0 !important;
  font: inherit !important;
  color: inherit !important;
  letter-spacing: inherit !important;
  text-shadow: none !important;
  transform: none !important;
}

body .theme-tv-preview.theme-preset-pop.event-open .price-board.boxes-tile-board {
  position: absolute !important;
  inset: 25% 3cqw 13% !important;
  display: grid !important;
  grid-template-columns: repeat(var(--theme-product-columns, 3), minmax(0, 1fr)) !important;
  grid-template-rows: repeat(var(--pop-active-rows, var(--theme-product-rows, 4)), minmax(0, 1fr)) !important;
  grid-auto-columns: auto !important;
  grid-auto-rows: minmax(0, 1fr);
  align-content: stretch;
  gap: 1cqw !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}

body .theme-tv-preview.theme-preset-pop .price-board > .boxes-board-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  grid-column: var(--theme-item-col, auto);
  grid-row: var(--theme-card-row, auto);
  min-width: 0;
  min-height: 0;
  padding: 0.6cqw 1cqw;
  border: max(1px, 0.13cqw) solid var(--pop-ink);
  border-radius: 0;
  background: #ffe76b;
  color: var(--pop-ink);
  box-shadow: 0.3cqw 0.3cqw 0 var(--pop-ink);
  overflow: hidden;
  animation: none !important;
  filter: none !important;
  transform: none !important;
}

body .theme-tv-preview.theme-preset-pop .price-board > .boxes-board-tile[hidden] { display: none; }
body .theme-tv-preview.theme-preset-pop .boxes-board-tile:nth-child(3n + 2) { background: #ffd3c6; }
body .theme-tv-preview.theme-preset-pop .boxes-board-tile:nth-child(3n) { background: var(--pop-paper); }
body .theme-tv-preview.theme-preset-pop .is-paged .boxes-board-tile:nth-child(3n + 2) { background: #ffe76b; }
body .theme-tv-preview.theme-preset-pop .is-paged .boxes-board-tile:nth-child(3n) { background: #ffd3c6; }
body .theme-tv-preview.theme-preset-pop .is-paged .boxes-board-tile:nth-child(3n + 1) { background: var(--pop-paper); }

body .theme-tv-preview.theme-preset-pop :is(.ticker, .board-title, .price-board, .instruction-scroller, .crash-takeover, .market-open-takeover, .cheapest-takeover) {
  transition: none !important;
  filter: none !important;
}

body .theme-tv-preview.theme-preset-pop .price-board-page-marker {
  background: var(--pop-ink);
  color: var(--pop-paper);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font: 700 clamp(9px, 0.9cqw, 22px)/1 Arial, sans-serif;
}

body .theme-tv-preview.theme-preset-pop .boxes-board-product {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  line-height: 1;
}

body .theme-tv-preview.theme-preset-pop .boxes-product-name {
  display: block;
  font-family: var(--theme-product-font, Arial, sans-serif);
  font-size: clamp(10px, 1.35cqw, 32px);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

body .theme-tv-preview.theme-preset-pop .boxes-board-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15cqw;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pop-ink);
  font-family: var(--theme-price-font, 'Arial Black', Arial, sans-serif);
  font-size: clamp(16px, calc(var(--theme-price-size, 42px) * 0.25 + 2.1cqw), 96px);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-shadow: none;
  white-space: nowrap;
  animation: none !important;
  filter: none !important;
  transform: none !important;
}

body .theme-tv-preview.theme-preset-pop .boxes-board-price em {
  display: block;
  margin: 0;
  padding: 0;
  color: inherit;
  font: 700 clamp(8px, 0.85cqw, 22px)/1.1 Arial, sans-serif;
  letter-spacing: 0;
  text-shadow: none;
}

body .theme-tv-preview.theme-preset-pop .price-up .boxes-board-price em::before { content: '↑ '; }
body .theme-tv-preview.theme-preset-pop :is(.price-down, .price-crashed) .boxes-board-price em::before { content: '↓ '; }
body .theme-tv-preview.theme-preset-pop .price-flat .boxes-board-price em::before { content: '— '; }

body .theme-tv-preview.theme-preset-pop .instruction-scroller {
  position: absolute !important;
  inset: auto 0 0 !important;
  width: 100% !important;
  padding: 0.8cqw 3cqw !important;
  margin: 0 !important;
  border: 0;
  background: var(--pop-ink) !important;
  color: var(--pop-paper) !important;
  font-size: clamp(9px, 1cqw, 24px) !important;
  box-shadow: none !important;
  animation: none !important;
}

body .theme-tv-preview.theme-preset-pop .crash-countdown {
  position: absolute !important;
  inset: auto 3cqw 6% auto !important;
  display: flex;
  align-items: center;
  gap: 1cqw;
  padding: 0.6cqw 1cqw !important;
  margin: 0;
  min-width: 0 !important;
  border: max(1px, 0.13cqw) solid var(--pop-ink) !important;
  border-radius: 0 !important;
  background: var(--pop-paper) !important;
  color: var(--pop-ink) !important;
  box-shadow: 0.2cqw 0.2cqw 0 var(--pop-ink) !important;
  text-shadow: none !important;
}

body .theme-tv-preview.theme-preset-pop .crash-countdown span {
  color: inherit !important;
  font: 900 clamp(9px, 0.9cqw, 22px)/1 Arial, sans-serif !important;
  letter-spacing: 0;
}

body .theme-tv-preview.theme-preset-pop .crash-countdown strong {
  color: inherit !important;
  font: 900 clamp(12px, 1.3cqw, 32px)/1 Arial, sans-serif !important;
  text-shadow: none !important;
}

body .theme-tv-preview.theme-preset-pop :is(.crash-takeover, .market-open-takeover, .cheapest-takeover) {
  inset: 0 !important;
  padding: 3cqw;
  gap: 1.5cqw;
  background: var(--pop-coral) !important;
  color: var(--pop-ink) !important;
  text-shadow: none !important;
  box-shadow: none !important;
  animation: none !important;
}

body .theme-tv-preview.theme-preset-pop .market-open-takeover {
  background: var(--pop-blue) !important;
  color: #fff !important;
}

body .theme-tv-preview.theme-preset-pop .cheapest-takeover { background: #ffe76b !important; }

body .theme-tv-preview.theme-preset-pop :is(.crash-takeover, .market-open-takeover, .cheapest-takeover) :is(span, strong, b) {
  color: inherit !important;
  font-family: 'Arial Black', Arial, sans-serif !important;
  text-shadow: none !important;
  line-height: 0.95 !important;
  letter-spacing: -0.025em;
}

body .theme-tv-preview.theme-preset-pop :is(.crash-takeover, .market-open-takeover, .cheapest-takeover) strong {
  max-width: 90%;
  font-size: clamp(32px, 9cqw, 220px) !important;
}

body .theme-tv-preview.theme-preset-pop :is(.crash-takeover, .market-open-takeover, .cheapest-takeover) :is(span, b) {
  font-size: clamp(11px, 1.8cqw, 42px) !important;
}

body .theme-tv-preview.theme-preset-pop:is(.market-crashing, .preview-crashing) .crash-takeover::before {
  content: 'PRICE DROP!';
  font: 950 clamp(38px, 11cqw, 240px)/0.95 'Arial Black', Arial, sans-serif;
  letter-spacing: -0.055em;
}

body .theme-tv-preview.theme-preset-pop:is(.market-crashing, .preview-crashing) .crash-takeover strong { display: none; }
body .theme-tv-preview.theme-preset-pop:is(.market-crashing, .preview-crashing) { animation: none !important; }

body .theme-tv-preview.theme-preset-pop:is(.event-closed, .event-scheduled) .board-title {
  background: var(--pop-paper) !important;
  text-shadow: none !important;
  animation: none !important;
}

body .theme-tv-preview.theme-preset-pop:is(.event-closed, .event-scheduled) .board-title::before {
  color: var(--pop-blue) !important;
  background: none !important;
  filter: none !important;
  transform: none !important;
  font: 950 clamp(30px, 10cqw, 200px)/0.95 'Arial Black', Arial, sans-serif;
  letter-spacing: -0.05em;
}

body .theme-tv-preview.theme-preset-pop .market-open-countdown {
  color: var(--pop-ink);
  border-color: var(--pop-ink);
  background: var(--pop-paper);
  box-shadow: none;
}

body .theme-tv-preview.theme-preset-pop .market-open-countdown :is(span, strong, b) {
  color: var(--pop-ink) !important;
  text-shadow: none !important;
}

body .theme-tv-preview.theme-preset-pop .market-animal-signal {
  background: color-mix(in srgb, var(--pop-paper) 80%, transparent);
}

body .theme-tv-preview.theme-preset-pop .market-animal-signal::after {
  color: var(--pop-ink);
  text-shadow: none;
}

body .theme-tv-preview.theme-preset-pop .market-animal-signal > div {
  border: 2px solid var(--pop-ink);
  border-radius: 0;
  background: var(--pop-paper);
  color: var(--pop-ink);
  box-shadow: 0.4cqw 0.4cqw 0 var(--pop-ink);
  text-shadow: none;
}

body .theme-tv-preview.theme-preset-pop .market-animal-signal > div::before { display: none; }
body .theme-tv-preview.theme-preset-pop .market-animal-signal > div :is(strong, b) {
  color: var(--pop-ink);
  text-shadow: none;
  font-family: 'Arial Black', Arial, sans-serif;
}

@media (max-width: 980px) {
  #branding .theme-preset-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  #branding .theme-preset-list { grid-template-columns: minmax(0, 1fr); }
  #branding .theme-tv-preview.theme-preset-pop {
    display: block !important;
    aspect-ratio: 4 / 5;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .theme-tv-preview.theme-preset-pop :is(.ticker-track, .instruction-track) { animation: none !important; }
}
