/* After Hours changes the board styling while sharing the standard tickers and event animations. */
.preset-preview.after-hours {
  background: repeating-linear-gradient(180deg, transparent 0 17px, #294039 17px 18px), #080f12;
  box-shadow: inset 0 -2px #79aa94;
}

.after-hours-brand { display: none; }

body .theme-tv-preview.theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down) {
  padding: 0 !important;
  background: radial-gradient(ellipse at 48% 90%, rgba(44, 87, 65, 0.1), transparent 65%), var(--theme-background-color, #080f12) !important;
  box-shadow: inset 0 -1px var(--theme-accent-color, #79aa94);
}

body .theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down) .after-hours-brand {
  display: block;
  position: absolute;
  top: 9%;
  left: 3.4%;
  color: #fff;
  font: 700 clamp(18px, 2.5vw, 64px)/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.025em;
  text-align: left;
}

body .theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down) .board-title {
  position: absolute !important;
  inset: 20% 3.4% auto auto !important;
  width: 54% !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--board-title-color, #fff) !important;
  font-family: var(--board-title-font, Arial, Helvetica, sans-serif) !important;
  font-size: clamp(14px, 1.6vw, 40px) !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.14em !important;
  text-align: right !important;
  text-shadow: none !important;
  background: none !important;
}

body .theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down) .board-title :is(.board-title-main, .board-title-sub) {
  display: inline !important;
  font: inherit !important;
  color: inherit !important;
  letter-spacing: inherit !important;
  text-shadow: none !important;
  margin: 0 !important;
}
body .theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down) .board-title-sub::before { content: " "; }

body .theme-tv-preview.theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down):not(.layout-large-tiles):not(.layout-boxes) .price-board {
  position: absolute !important;
  inset: 26% 3.4% auto !important;
  display: grid !important;
  grid-template-columns: repeat(var(--theme-product-columns, 2), minmax(0, 1fr) minmax(5em, auto)) !important;
  grid-template-rows: none !important;
  grid-auto-rows: min(12vh, calc(52vh / var(--theme-product-rows, 6))) !important;
  align-content: start !important;
  gap: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

body .theme-tv-preview.theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down):not(.layout-large-tiles):not(.layout-boxes) .price-board > :is(span, strong):not(.category-header) {
  display: flex !important;
  align-items: center !important;
  grid-row: var(--theme-card-row, auto) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(121, 170, 148, 0.2) !important;
  border-radius: 0 !important;
  font-family: var(--theme-body-font, Arial, Helvetica, sans-serif) !important;
  font-size: clamp(16px, calc(3.7vw / var(--theme-product-columns, 2)), 48px) !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  text-shadow: none !important;
}
body .theme-tv-preview.theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down):not(.layout-large-tiles):not(.layout-boxes) .price-board > span:not(.category-header) {
  grid-column: calc(var(--theme-item-col, 1) * 2 - 1) !important;
  color: var(--theme-text-color, #a3aca9) !important;
  overflow-wrap: anywhere;
}
body .theme-tv-preview.theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down):not(.layout-large-tiles):not(.layout-boxes) .price-board > strong {
  grid-column: calc(var(--theme-item-col, 1) * 2) !important;
  justify-content: flex-end !important;
  gap: 0.3em !important;
  color: var(--theme-accent-color, #79aa94) !important;
  font-variant-numeric: tabular-nums;
}
body .theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down) .price-board > :is(.category-header, .price-board-page-marker) { display: none !important; }
body .theme-tv-preview.theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down):not(.layout-large-tiles):not(.layout-boxes) .price-board > strong > em {
  display: inline-flex !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: inherit !important;
  font-size: 0 !important;
  box-shadow: none !important;
}
body .theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down) .price-board > strong > em::before {
  font-size: clamp(16px, calc(3.7vw / var(--theme-product-columns, 2)), 48px) !important;
  margin: 0 !important;
}
body .theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down) .price-board > .price-up > em::before { content: "↑"; }
body .theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down) .price-board > .price-down > em::before { content: "↓"; }
body .theme-tv-preview.theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down) .price-board > strong.price-crashed { color: var(--theme-crash-color, #ef8984) !important; }

/* Leave a clean gutter between product columns without wrapping each live price row. */
body .theme-tv-preview.theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down):not(.layout-large-tiles):not(.layout-boxes) .price-board > strong:not(.category-header) {
  margin-right: clamp(0px, calc((var(--theme-product-columns, 2) - var(--theme-item-col, 1)) * 4.5vw), 4.5vw) !important;
}

/* Keep ordinary rows simple; shared crash, mover and cheapest-item highlights remain intact. */
body .theme-tv-preview.theme-preset-after-hours.event-open:not(.market-crashing):not(.market-opening):not(.opening-countdown):not(.opening-now):not(.crash-imminent):not(.crash-counting-down):not(.layout-large-tiles):not(.layout-boxes) .price-board > :is(span, strong):not(.category-header):not(.price-crashed):not(.mover-spotlight-row):not(.cheapest-row) {
  background: none !important;
  box-shadow: none !important;
}
