/* ============================================================
   Community Draws — Themed Draw Core (shared across ALL packs)
   File: /wp-content/themes/martfury-child/css/cd-themed-draw-core.css
   Scope: ONLY themed draws (body.cd-theme-product)
   Purpose:
   - Global structural polish
   - Remove legacy Martfury clutter (price, separators)
   - Universal "How to Play" accordion UI
   - Countdown card wrapper + FORCE one-row layout
   - CTA zone (Participate + Free Postal Entry) — final, stable (DOM-shape proof)
   ============================================================ */


/* ============================================================
   1) REMOVE HERO SEPARATORS (TOP + BOTTOM)
============================================================ */

body.cd-theme-product .mf-entry-product-header{
  border-bottom: 0 !important;
}

body.cd-theme-product .mf-product-detail hr,
body.cd-theme-product .mf-product-detail .entry-summary hr,
body.cd-theme-product hr{
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}


/* ============================================================
   1.5) REMOVE MARTFURY "FAKE HR" DIVIDERS
============================================================ */

body.cd-theme-product .summary.entry-summary .mf-summary-header{
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body.cd-theme-product .summary.entry-summary
.woocommerce-product-details__short-description > h4{
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body.cd-theme-product .summary.entry-summary
.woocommerce-product-details__short-description{
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.cd-theme-product .summary.entry-summary
.woocommerce-product-details__short-description::before,
body.cd-theme-product .summary.entry-summary
.woocommerce-product-details__short-description::after{
  content: none !important;
  border: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* ============================================================
   2) REMOVE PRICE DISPLAY (£2.00)
============================================================ */

body.cd-theme-product .summary.entry-summary p.price,
body.cd-theme-product .summary.entry-summary .price,
body.cd-theme-product .mf-summary-header .price,
body.cd-theme-product p.price,
body.cd-theme-product .price{
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* ============================================================
   2.5) VERTICAL RHYTHM — HERO → DESCRIPTION → HOWTO → COUNTDOWN
============================================================ */

body.cd-theme-product .cd-theme-hero{
  margin: 0 0 18px !important;
}

body.cd-theme-product .summary.entry-summary
.woocommerce-product-details__short-description{
  padding: 0 !important;
  margin: 0 0 18px !important;
}

body.cd-theme-product .summary.entry-summary
.woocommerce-product-details__short-description,
body.cd-theme-product .summary.entry-summary
.woocommerce-product-details__short-description p{
  text-align: center !important;
}

body.cd-theme-product .cd-howto{
  margin: 10px 0 12px !important;
}

body.cd-theme-product .mf-product-detail .product-countdown,
body.cd-theme-product .mf-product-detail .countdown,
body.cd-theme-product .mf-product-detail .mf-countdown,
body.cd-theme-product .mf-product-detail .woocommerce-product-countdown,
body.cd-theme-product .mf-product-detail .mf-product-countdown{
  margin-top: 0 !important;
}

@media (max-width: 768px){
  body.cd-theme-product .cd-theme-hero{
    margin-bottom: 14px !important;
  }

  body.cd-theme-product .summary.entry-summary
  .woocommerce-product-details__short-description{
    margin-bottom: 14px !important;
  }

  body.cd-theme-product .cd-howto{
    margin-top: 8px !important;
  }
}


/* ============================================================
   3) UNIVERSAL "HOW TO PLAY" ACCORDION
============================================================ */

body.cd-theme-product .cd-howto{
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.10);
}

body.cd-theme-product .cd-howto__toggle{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  text-align: left;
}

body.cd-theme-product .cd-howto__title{
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

body.cd-theme-product .cd-howto__chev{
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255,255,255,.85);
  border-bottom: 2px solid rgba(255,255,255,.85);
  transform: rotate(45deg);
  transition: transform .15s ease;
}

body.cd-theme-product .cd-howto[data-open="1"] .cd-howto__chev{
  transform: rotate(-135deg);
}

body.cd-theme-product .cd-howto__panel{
  padding: 0 16px 14px;
}

body.cd-theme-product .cd-howto[data-open="0"] .cd-howto__panel{
  display: none;
}


/* ============================================================
   HOW TO PLAY — Clean bullets, calm rhythm
============================================================ */

body.cd-theme-product .cd-howto__list{
  list-style: none !important;
  padding: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

body.cd-theme-product .cd-howto__list li{
  position: relative;
  padding-left: 22px;
  margin: 12px 0;
}

body.cd-theme-product .cd-howto__list li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6cc46f;
}

body.cd-theme-product .cd-howto__foot,
body.cd-theme-product .cd-howto__foot strong{
  font-weight: 400 !important;
}

body.cd-theme-product .cd-howto__foot{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.85;
}

body.cd-theme-product .cd-howto__foot a{
  color: #6cc46f;
  text-decoration: underline;
}


/* ============================================================
   COUNTDOWN — single status card (text + ticker together)
============================================================ */

body.cd-theme-product .cd-countdown-card{
  margin: 12px 0 16px !important;
  padding: 16px 18px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  background: rgba(0,0,0,.10) !important;
}

body.cd-theme-product .cd-countdown-card__text{
  text-align: center !important;
  font-weight: 800 !important;
  color: #fff !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
  margin: 0 0 12px !important;
}

body.cd-theme-product .cd-countdown-card__content{
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

body.cd-theme-product .cd-countdown-card__content > :first-child{
  width: 100% !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 22px !important;
  text-align: center !important;
}

body.cd-theme-product .cd-countdown-card__content > :first-child > *{
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.cd-theme-product .cd-countdown-card__content h1,
body.cd-theme-product .cd-countdown-card__content h2,
body.cd-theme-product .cd-countdown-card__content h3,
body.cd-theme-product .cd-countdown-card__content h4,
body.cd-theme-product .cd-countdown-card__content h5,
body.cd-theme-product .cd-countdown-card__content h6,
body.cd-theme-product .cd-countdown-card__content .countdown-period,
body.cd-theme-product .cd-countdown-card__content .countdown-label,
body.cd-theme-product .cd-countdown-card__content .label,
body.cd-theme-product .cd-countdown-card__content .period,
body.cd-theme-product .cd-countdown-card__content .count-title{
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  margin: 10px 0 0 !important;
}

body.cd-theme-product .cd-countdown-card__content ul,
body.cd-theme-product .cd-countdown-card__content ol{
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 22px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.cd-theme-product .cd-countdown-card__content li{
  margin: 0 !important;
  padding: 0 !important;
}

/* Mobile: keep the countdown 1-row */
@media (max-width: 768px){
  body.cd-theme-product .cd-countdown-card{
    padding: 14px 14px !important;
  }

  body.cd-theme-product .cd-countdown-card__text{
    font-size: 16px !important;
    margin-bottom: 10px !important;
  }

  body.cd-theme-product .cd-countdown-card__content > :first-child,
  body.cd-theme-product .cd-countdown-card__content ul,
  body.cd-theme-product .cd-countdown-card__content ol{
    gap: 10px !important;
  }

  body.cd-theme-product .cd-countdown-card__content h1,
  body.cd-theme-product .cd-countdown-card__content h2,
  body.cd-theme-product .cd-countdown-card__content h3,
  body.cd-theme-product .cd-countdown-card__content h4,
  body.cd-theme-product .cd-countdown-card__content h5,
  body.cd-theme-product .cd-countdown-card__content h6,
  body.cd-theme-product .cd-countdown-card__content .countdown-period,
  body.cd-theme-product .cd-countdown-card__content .countdown-label,
  body.cd-theme-product .cd-countdown-card__content .label,
  body.cd-theme-product .cd-countdown-card__content .period,
  body.cd-theme-product .cd-countdown-card__content .count-title{
    font-size: 12px !important;
    margin-top: 8px !important;
  }
}

/* Desktop: keep countdown stacked (text above timer) */
@media (min-width: 769px){
  body.cd-theme-product .cd-countdown-card{
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 12px !important;
  }

  body.cd-theme-product .cd-countdown-card__text{
    text-align: center !important;
    max-width: none !important;
    margin: 0 !important;
  }

  body.cd-theme-product .cd-countdown-card__content{
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
}


/* ============================================================
   THEMED DRAWS — CTA ZONE (FINAL, DOM-SHAPE PROOF)
============================================================ */

body.cd-theme-product form.cart.pick-number{
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

body.cd-theme-product form.cart.pick-number #wc-lottery-pn{
  margin-bottom: 18px !important;
}

@media (min-width: 769px){
  body.cd-theme-product form.cart.pick-number #wc-lottery-pn{
    margin-bottom: 28px !important;
  }
}

body.cd-theme-product form.cart.pick-number{
  gap: 8px !important;
}

@media (min-width: 769px){
  body.cd-theme-product form.cart.pick-number{
    gap: 6px !important;
  }
}

body.cd-theme-product form.cart.pick-number .single_add_to_cart_button,
body.cd-theme-product form.cart.pick-number .actions-button a.free-entry-button,
body.cd-theme-product form.cart.pick-number .actions-button a.button.free-entry-button,
body.cd-theme-product form.cart.pick-number .actions-button + a.free-entry-button,
body.cd-theme-product form.cart.pick-number .actions-button + a.button.free-entry-button{
  margin: 0 !important;
  padding: 14px 30px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  border: none !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  height: 50px !important;
  min-height: 50px !important;
  box-sizing: border-box !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;

  width: 100% !important;
  max-width: 100% !important;
}

body.cd-theme-product form.cart.pick-number .single_add_to_cart_button{
  background-color: #398b42 !important;
  color: #ffffff !important;
}

body.cd-theme-product form.cart.pick-number .actions-button{
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;

  background-color: #223a43 !important;
  border-radius: 3px !important;
  height: 50px !important;
  min-height: 50px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.cd-theme-product form.cart.pick-number .actions-button:empty{
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

body.cd-theme-product form.cart.pick-number .actions-button a.free-entry-button,
body.cd-theme-product form.cart.pick-number .actions-button a.button.free-entry-button{
  background: transparent !important;
  color: #4bb17c !important;
}

body.cd-theme-product form.cart.pick-number .actions-button + a.free-entry-button,
body.cd-theme-product form.cart.pick-number .actions-button + a.button.free-entry-button{
  background-color: #223a43 !important;
  color: #4bb17c !important;
}

body.cd-theme-product form.cart.pick-number .single_add_to_cart_button:hover,
body.cd-theme-product form.cart.pick-number .actions-button:hover,
body.cd-theme-product form.cart.pick-number .actions-button + a.free-entry-button:hover,
body.cd-theme-product form.cart.pick-number .actions-button + a.button.free-entry-button:hover{
  filter: brightness(0.92) !important;
}


/* ============================================================
   MOBILE ONLY — remove Fundraiser Information block (tabs area)
============================================================ */

@media (max-width: 768px){
  body.cd-theme-product .mf-product-summary .mf-woo-tabs.wc-tabs-wrapper,
  body.cd-theme-product .mf-product-summary .woocommerce-tabs,
  body.cd-theme-product .mf-product-summary .wc-tabs-wrapper{
    display: none !important;
  }
}


/* ============================================================
   CD — Fix Martfury Sticky Add To Cart vs Mobile Nav
   Scope: ONLY themed draw products
============================================================ */

:root{
  --cd-mobile-nav-height: 68px; /* tweak if needed */
}

body.cd-theme-product .mobile-version.mf-add-to-cart-fixed div.product:not(.qv-modal) .cart .single_add_to_cart_button,
body.cd-theme-product .mobile-version.mf-add-to-cart-fixed div.product:not(.qv-modal) .cart .buy_now_button{
  bottom: calc(var(--cd-mobile-nav-height) + env(safe-area-inset-bottom)) !important;
  z-index: 99999 !important;
}

/* Prevent content being hidden behind sticky elements */
body.cd-theme-product{
  padding-bottom: calc(var(--cd-mobile-nav-height) + 120px) !important;
}

/* Optional: single slab */
@media (max-width: 768px){
  body.cd-theme-product.mobile-version.mf-add-to-cart-fixed
  div.product:not(.qv-modal) .cart .single_add_to_cart_button,
  body.cd-theme-product.mobile-version.mf-add-to-cart-fixed
  div.product:not(.qv-modal) .cart .buy_now_button{
    border-radius: 0 !important;
    left: 0 !important;
    width: 100% !important;
    padding: 0 10px !important;
    height: 56px !important;
    line-height: 56px !important;
  }
}


/* ============================================================
   CD THEMED DRAW — Kill ghost pseudo-element slab (SCOPED SAFELY)
============================================================ */

body.cd-theme-product::before,
body.cd-theme-product::after{
  content: none !important;
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
}


/* ============================================================
   CD FIX — “Footer Slab” ghost height (SCOPED)
============================================================ */

body.cd-theme-product {
  margin-bottom: 0 !important;
  /* DO NOT hard-zero padding-bottom here (sticky ATC uses it) */
}

body.cd-theme-product #page,
body.cd-theme-product .site,
body.cd-theme-product .site-content,
body.cd-theme-product .mf-site,
body.cd-theme-product .mf-page,
body.cd-theme-product .mf-content,
body.cd-theme-product .mf-container,
body.cd-theme-product .content-area,
body.cd-theme-product .site-main {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  min-height: 0 !important;
}

body.cd-theme-product footer,
body.cd-theme-product .site-footer,
body.cd-theme-product .mf-footer,
body.cd-theme-product #colophon {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
/* ============================================================
   THEMED DRAWS — Remove “slab” below footer (sticky footer)
   Scope: all themed draw pages
   ============================================================ */

html, body {
  height: 100%;
}

/* Use cd-theme-product if that's your universal themed body class */
body.cd-theme-product #page,
body.cd-rugby-grid-product #page,
body.cd-football-grid-product #page {
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Main content should expand to fill remaining height */
body.cd-theme-product #content,
body.cd-rugby-grid-product #content,
body.cd-football-grid-product #content {
  flex: 1 0 auto !important;
}

/* Footer sits at bottom, eliminating the “slab” */
body.cd-theme-product #colophon,
body.cd-theme-product .site-footer,
body.cd-rugby-grid-product #colophon,
body.cd-rugby-grid-product .site-footer,
body.cd-football-grid-product #colophon,
body.cd-football-grid-product .site-footer {
  margin-top: auto !important;
}

/* Safety: remove any theme padding that can create fake bottom space */
body.cd-theme-product,
body.cd-rugby-grid-product,
body.cd-football-grid-product {
  padding-bottom: 0 !important;
}
