/*
 * Single competition page: back link, gallery, title and price, countdown,
 * progress, detail panels, two-column desktop layout, the sold-out state and
 * the buy box (quantity, presets, ticket picker trigger, skill question, total,
 * Enter now, bottom bar). Enter now colours live with the shared interaction
 * rules in child-brand.css; the ticket dialog is styled separately.
 */

body.single-product #primary {
  max-width: 640px;
  margin-inline: auto;
  padding: 8px 16px 40px;
  color: var(--pl-black);
}

body.single-product #primary > .product {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

body.single-product #primary > .product > * {
  margin-block: 0;
}

/* Back link */
.pl-pdp-back__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--pl-gold-ink);
  text-decoration: none;
  transition: color 200ms ease;
}

.pl-pdp-back__link .material-symbols-outlined {
  font-size: 18px;
}

.pl-pdp-back__link:hover {
  color: var(--pl-black);
}

/* Main grid: strip the parent card shells so sections sit on the page */
body.single-product #primary .product > section:first-of-type > div > .grid {
  gap: 28px;
}

body.single-product #primary .product > section:first-of-type .order-1,
body.single-product #primary .product > section:first-of-type .order-3,
body.single-product #primary .product > section:first-of-type .order-2 > div {
  padding: 0;
  margin-top: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.single-product #primary .product > section:first-of-type .order-2 > div > div:is(:has(h1), :has(> .lty-lottery-countdown-timer), :has(> .ncs-progress), .pl-pdp__soldout-action) {
  padding: 0;
}

body.single-product #primary .product > section:first-of-type .order-2 > div {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Gallery */
.single-product .product-gallery-main-frame {
  border: 1px solid var(--pl-champagne);
  border-radius: 18px;
  background: var(--pl-tint-deep);
  box-shadow: none;
}

.single-product .product-gallery-main-frame [data-gallery-main] {
  aspect-ratio: 4 / 5;
}

.single-product .product-gallery-main-frame [data-gallery-main] img {
  object-fit: cover;
}

.single-product .product-gallery .mt-4 {
  margin-top: 10px;
}

/* Four equal thumbnails across the gallery width. The parent fixes the width with a
   layered !important utility, so min/max-width set the size instead. */
.single-product .product-gallery .gallery-thumbs-swiper .swiper-slide {
  min-width: calc((100% - 36px) / 4);
  max-width: calc((100% - 36px) / 4);
}

.single-product .product-gallery .thumb-border {
  border: 1px solid var(--pl-champagne);
  border-radius: 12px;
  background: var(--pl-tint);
}

.single-product .product-gallery .swiper-slide-thumb-active .thumb-border {
  border-color: var(--pl-black);
}

.pl-pdp__chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 6px 10px;
  border: 1px solid var(--pl-champagne);
  border-radius: 18px;
  background: var(--pl-ground);
  color: var(--pl-black);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Sold out: label over the dimmed photo */
.pl-pdp__soldout {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--pl-ground) 70%, transparent);
  pointer-events: none;
}

.pl-pdp__soldout-label {
  padding: 12px 28px;
  border-block: 1px solid var(--pl-gold);
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pl-black);
}

.pl-pdp__frame--soldout [data-gallery-main] {
  filter: saturate(0.6);
}

.pl-pdp__soldout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 16px 20px;
  border: 0;
  border-radius: 4px;
  background-color: var(--pl-surface);
  box-shadow: inset 0 0 0 1px var(--pl-line-strong);
  color: var(--pl-ink);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: not-allowed;
}

/* Title and price */
body.single-product #primary .order-2 h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.04;
  color: var(--pl-black);
}

/* The sold-out state shows on the photo, not as a pill beside the title */
body.single-product #primary .order-2 h1 + span {
  display: none;
}

.pl-pdp__price {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--pl-ink);
}

.pl-pdp__price-amount {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 600;
  color: var(--pl-black);
}

/* Countdown */
body.single-product #primary .order-2 div:has(> .lty-lottery-countdown-timer) {
  padding-top: 20px;
  border-top: 1px solid var(--pl-champagne);
}

body.single-product #primary .order-2 div:has(> .lty-lottery-countdown-timer) > .flex:first-child {
  margin-bottom: 14px;
}

body.single-product #primary .order-2 div:has(> .lty-lottery-countdown-timer) > .flex:first-child .material-symbols-outlined {
  display: none;
}

body.single-product #primary .order-2 div:has(> .lty-lottery-countdown-timer) > .flex:first-child span {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--pl-gold-ink);
}

body.single-product .lty-lottery-countdown-timer {
  gap: 8px;
}

body.single-product .lty-lottery-countdown-timer > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  border: 1px solid var(--pl-line);
  border-radius: 18px;
  background: var(--pl-surface);
}

body.single-product .lty-lottery-countdown-timer > div > div {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

/* Parent forces white digits through var(--color-white) */
body.single-product .lty-lottery-countdown-timer .lty-lottery-timer-content {
  --color-white: var(--pl-black);
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

body.single-product .lty-lottery-countdown-timer > div > span {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--pl-ink);
}

/* Progress */
body.single-product #primary .order-2 div:has(> .ncs-progress) {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pl-champagne);
}

.pl-progress .ncs-progress__track {
  height: 4px;
  border-radius: 999px;
  background: var(--pl-tint);
  box-shadow: none;
}

.pl-progress .ncs-progress__fill {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pl-champagne), var(--pl-gold));
}

.pl-progress__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--pl-ink);
}

.pl-progress__low {
  margin-top: 8px;
  font-size: 14px;
  color: var(--pl-gold-ink);
}

/* Detail panels */
.pl-acc {
  border-top: 1px solid var(--pl-champagne);
}

.pl-acc__item {
  border-bottom: 1px solid var(--pl-champagne);
}

.pl-acc__heading {
  margin: 0;
}

.pl-acc__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pl-black);
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.pl-acc__icon {
  color: var(--pl-gold-ink);
  transition: transform 200ms ease;
}

.pl-acc__btn[aria-expanded="true"] .pl-acc__icon {
  transform: rotate(180deg);
}

.pl-acc__panel {
  padding-bottom: 18px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--pl-ink);
}

.pl-acc__panel .prose {
  font-size: 15px;
  line-height: 1.7;
  color: var(--pl-ink);
}

/* Related strip */
body.single-product #primary .product > section:has(.related-competitions) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.single-product .related-competitions h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--pl-black);
}

body.single-product .related-competitions > .text-center:first-child {
  margin-bottom: 18px;
}

body.single-product .pl-related--soldout > .text-center:first-child {
  text-align: left;
}

@media (prefers-reduced-motion: reduce) {
  .pl-acc__icon {
    transition: none;
  }
}

/* Desktop: gallery left (sticky), details right */
@media (min-width: 1024px) {
  body.single-product #primary {
    max-width: 1200px;
    padding-bottom: 64px;
  }

  body.single-product #primary .product > section:first-of-type > div > .grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    column-gap: 56px;
    row-gap: 28px;
    align-items: start;
  }

  body.single-product #primary .product > section:first-of-type > div > .grid > div:has(> .order-1) {
    display: contents;
  }

  body.single-product #primary .product > section:first-of-type .order-1 {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: 120px;
    align-self: start;
  }

  body.single-product #primary .product > section:first-of-type .order-2 {
    grid-column: 2;
    grid-row: 1;
  }

  body.single-product #primary .product > section:first-of-type .order-3 {
    grid-column: 2;
    grid-row: 2;
  }
}

/* ---------------------------------------------------------------------------
   Buy box: 'Choose your tickets' card
   --------------------------------------------------------------------------- */
.pl-buy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--pl-line);
  border-radius: 18px;
  background: var(--pl-surface);
  color: var(--pl-black);
}

/* The parent pads each section 24px; the card owns the padding */
.pl-buy > div {
  padding: 0;
}

.pl-buy__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pl-buy__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--pl-black);
}

.pl-buy__meta {
  margin: 0;
  font-size: 14px;
  color: var(--pl-ink);
}

/* Price row: the price sits under the title and the total above Enter now */
.pl-buy .ncs-ticket-price {
  display: none;
}

/* Quantity block: stepper first, presets under it */
.pl-buy > div:has(> [data-quantity-control], > .nera-ticket-picker-wrap) {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pl-buy [data-quantity-control] {
  order: -1;
}

.pl-buy [data-quantity-control] > .flex {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

/* Stepper */
.pl-buy [data-quantity-control] > .flex > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--pl-line);
  border-radius: 18px;
  background: var(--pl-surface);
  overflow: visible;
}

.pl-buy [data-quantity-minus],
.pl-buy [data-quantity-plus] {
  flex: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--pl-line-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--pl-black);
  transition: background-color 160ms ease, border-color 160ms ease;
}

.pl-buy [data-quantity-control] .qty {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  background: transparent;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  color: var(--pl-black);
  -moz-appearance: textfield;
  appearance: textfield;
}

.pl-buy [data-quantity-control] .qty::-webkit-outer-spin-button,
.pl-buy [data-quantity-control] .qty::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

/* Presets: pack pills (5, 10, 25, 50) and the parent's quick-add pills */
.pl-buy .pl-presets__heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pl-buy .pl-presets__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pl-buy .pl-presets__item {
  margin: 0;
  padding: 0;
}

.pl-buy [data-quantity-control] > .flex > div:last-child:has([data-quantity-add]) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

/* A product with packs uses them as its presets, so the quick-add pills would repeat them */
.pl-buy > div:has(> [data-ticket-bundles]) [data-quantity-control] > .flex > div:last-child:has([data-quantity-add]) {
  display: none;
}

.pl-buy .pl-presets__btn,
.pl-buy [data-quantity-add] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  height: auto;
  padding: 0 8px;
  border: 1px solid var(--pl-line-strong);
  border-radius: 18px;
  background: var(--pl-surface);
  color: var(--pl-black);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.pl-buy .pl-presets__btn[aria-pressed="true"] {
  border-color: var(--pl-black);
  background: var(--pl-black);
  color: var(--pl-ground);
}

.pl-buy .pl-presets__badge {
  position: absolute;
  top: -8px;
  right: -4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--pl-gold);
  color: var(--pl-black);
  font-size: 11px;
}

/* Ticket picker trigger (manual-number products): the Lucky Dip style ghost button */
.pl-buy .nera-ticket-trigger {
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--pl-gold);
  border-radius: 12px;
  background: var(--pl-tint);
  color: var(--pl-black);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  transform: none;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.pl-buy .nera-ticket-trigger > div {
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* The arrow repeats the button's meaning; the count shows once tickets are picked */
.pl-buy .nera-ticket-trigger__arrow,
.pl-buy .nera-ticket-picker__count-badge:not([data-has-selection="true"]) {
  display: none;
}

.pl-buy .nera-ticket-trigger .font-semibold {
  font-size: inherit;
  font-weight: 400;
}

.pl-buy .nera-ticket-trigger__icon,
.pl-buy .nera-ticket-trigger__arrow {
  color: var(--pl-black);
}

.pl-buy .nera-ticket-picker__count-badge {
  letter-spacing: normal;
  text-transform: none;
}

/* Hover = warm gold, focus and press = champagne (shared interaction rules) */
@media (hover: hover) and (pointer: fine) {
  .pl-buy .nera-ticket-trigger:hover {
    border-color: var(--pl-gold);
    background: var(--pl-gold);
    transform: none;
  }

  .pl-buy .nera-ticket-trigger:hover .nera-ticket-trigger__arrow {
    transform: none;
  }

  .pl-buy [data-quantity-minus]:not(:disabled):hover,
  .pl-buy [data-quantity-plus]:not(:disabled):hover,
  .pl-buy .pl-presets__btn:hover,
  .pl-buy [data-quantity-add]:hover {
    border-color: var(--pl-gold);
    color: var(--pl-black);
  }
}

.pl-buy .nera-ticket-trigger:focus-visible,
.pl-buy .nera-ticket-trigger:active,
.pl-buy [data-quantity-minus]:not(:disabled):active,
.pl-buy [data-quantity-plus]:not(:disabled):active,
.pl-buy .pl-presets__btn:not([aria-pressed="true"]):active,
.pl-buy [data-quantity-add]:active {
  border-color: var(--pl-gold);
  background: var(--pl-champagne);
  color: var(--pl-black);
  transform: none;
}

/* Skill question: option cards */
.pl-buy .skill-challenge-wrapper {
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pl-buy .skill-challenge-wrapper h4 {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--pl-gold-ink);
}

.pl-buy .skill-challenge-wrapper .material-symbols-outlined {
  color: var(--pl-gold-ink);
}

.pl-buy .skill-challenge-wrapper .bg-primary\/10 {
  background: var(--pl-tint);
}

.pl-buy .nera-contest-question {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--pl-black);
}

.pl-buy .nera-contest-answers {
  gap: 8px;
}

.pl-buy .nera-contest-answers li > div {
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--pl-line-strong);
  border-radius: 12px;
  background: var(--pl-surface);
  box-shadow: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.pl-buy .nera-contest-answers li > div.border-primary {
  border-color: var(--pl-black);
  background: var(--pl-tint);
}

.pl-buy .nera-contest-answers li > div > div:first-child {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  border-width: 1px;
}

.pl-buy .nera-contest-answers li > div > div:first-child.bg-primary {
  border-color: var(--pl-black);
  background: var(--pl-black);
}

.pl-buy .nera-contest-answers li span {
  font-size: 15px;
  font-weight: 400;
  color: var(--pl-black);
}

@media (hover: hover) and (pointer: fine) {
  .pl-buy .nera-contest-answers li:hover > div {
    border-color: var(--pl-gold);
  }
}

/* Running total and Enter now */
.pl-buy__main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pl-buy__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--pl-line);
}

.pl-buy__calc {
  font-size: 14px;
  color: var(--pl-ink);
}

.pl-buy__sum {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 600;
  color: var(--pl-black);
}

.pl-enter__spinner {
  font-size: 20px;
  animation: pl-spin 900ms linear infinite;
}

@keyframes pl-spin {
  to { transform: rotate(360deg); }
}

/* Postal entry line and trust row */
.pl-buy > div > .border-t {
  border: 0;
}

.pl-buy > div > .border-t p {
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--pl-ink);
}

.pl-buy > div > .border-t button {
  font-weight: 500;
  color: var(--pl-gold-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pl-buy > div > .border-t button:hover {
  color: var(--pl-black);
}

/* Bottom bar: total and Enter now stay in reach below 1100px */
.pl-buy__bar {
  display: none;
}

@media (max-width: 1099.98px) {
  .pl-buy__bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: block;
    padding: 12px 16px;
    border-top: 1px solid var(--pl-champagne);
    background: color-mix(in srgb, var(--pl-ground) 97%, transparent);
  }

  .pl-buy__bar-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 640px;
    margin: 0 auto;
  }

  .pl-buy__bar-total {
    display: flex;
    flex-direction: column;
    min-width: 92px;
  }

  .pl-buy__bar-total .pl-buy__calc {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .pl-buy__bar-total .pl-buy__sum {
    font-size: 24px;
    line-height: 1.1;
  }

  body.single-product .pl-buy__bar .pl-buy__bar-btn {
    flex: 1;
    width: auto;
    min-width: 0;
    padding-inline: 12px;
    font-size: 16px;
    letter-spacing: 0.04em;
  }

  body.single-product:has(.pl-buy__bar) {
    padding-bottom: 80px;
  }

  body.single-product:has(.pl-buy__bar) #nera-scroll-top {
    bottom: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pl-enter__spinner {
    animation: none;
  }
}
