/* ===========================================================
   COMMUNITY DRAWS — FOOTBALL GRID THEME (SCOPED)
   Applies ONLY when body has .cd-football-grid-product
   File: /wp-content/themes/martfury-child/css/cd-football-grid.css
   Goal: Match the FINAL Rugby mobile + Path B behaviour 1:1
   =========================================================== */

/* ------------------------------------
   1) PAGE BACKGROUND + HEADER
------------------------------------ */

body.cd-football-grid-product {
  background: #0e3031 !important;
}

body.cd-football-grid-product #mf-header,
body.cd-football-grid-product .site-header {
  background-color: #0e3031 !important;
}

/* ------------------------------------
   2) GLOBAL TEXT + LINKS
------------------------------------ */

body.cd-football-grid-product .mf-product-detail,
body.cd-football-grid-product .mf-product-detail * {
  color: #ffffff !important;
}

body.cd-football-grid-product .mf-product-detail a {
  color: #20b27a !important;
}
body.cd-football-grid-product .mf-product-detail a:hover {
  color: #35e0a0 !important;
}

/* ------------------------------------
   3) GRID LAYOUT
------------------------------------ */

body.cd-football-grid-product #wc-lottery-pn,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  column-gap: 16px !important;
  row-gap: 16px !important;
  list-style: none !important;
}

@media (max-width: 768px) {
  body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 14px !important;
    row-gap: 14px !important;
  }
}

@media (max-width: 480px) {
  body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers {
    column-gap: 10px !important;
    row-gap: 10px !important;
  }
}

/* ------------------------------------
   4) TILE BASE (SQUARE CARDS)
------------------------------------ */

body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  min-height: 0 !important;
  float: none !important;

  background: #145046 !important;
  border-radius: 18px !important;
  border: none !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.35) !important;

  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  overflow: hidden !important;
  cursor: pointer;
  box-sizing: border-box;

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

  transition:
    background-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn::before,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn::after {
  content: none !important;
}

/* Hover */
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn:not(.taken):not(.selected):hover {
  background: #196657 !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.4) !important;
}

/* Selected */
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.selected,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.chosen,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.is-selected {
  background: #20b27a !important;
  box-shadow: 0 12px 26px rgba(32,178,122,0.6) !important;
  transform: translateY(-2px);
}

body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.selected .cd-football-label,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.chosen .cd-football-label,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.is-selected .cd-football-label {
  color: #0b201c !important;
}

/* Taken / Sold */
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.taken,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.disabled,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.sold,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.unavailable {
  background: #253d39 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.taken .cd-football-img,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.disabled .cd-football-img,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.sold .cd-football-img,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.unavailable .cd-football-img {
  opacity: 0.35;
  filter: grayscale(1);
}

body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.taken::after,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.disabled::after,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.sold::after,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers > li.tn.unavailable::after {
  content: "TAKEN";
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  font-family: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #ffffff;
  background: #ef771b;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.30);
}

/* ------------------------------------
   5) TILE INNER + CONTENT
------------------------------------ */

body.cd-football-grid-product .cd-football-tile {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 10px 8px 34px;
}

body.cd-football-grid-product .cd-football-img {
  max-width: 98%;
  max-height: 98%;
  object-fit: contain;
  display: block;
  z-index: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.40));
}

body.cd-football-grid-product .cd-football-label {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 8px;
  font-family: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  text-align: center;
  color: #fdfdfd;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;

  padding: 0 4px;
  min-height: 2.6em;
}

/* ------------------------------------
   6) PATH B — PRIVATE DRAW LANDING PAGE MODE (FOOTBALL)
   THIS is where your white slab is coming from.
   We must kill the left column + gallery *aggressively*.
------------------------------------ */

/* A) Hide all image/gallery blocks (belt + braces) */
body.cd-football-grid-product .woocommerce div.product div.images,
body.cd-football-grid-product .woocommerce div.product .woocommerce-product-gallery,
body.cd-football-grid-product .woocommerce-product-gallery,
body.cd-football-grid-product .mf-product-images,
body.cd-football-grid-product .mf-product-detail .mf-product-images,
body.cd-football-grid-product .mf-product-detail .product-images,
body.cd-football-grid-product .mf-product-detail .entry-left,
body.cd-football-grid-product .mf-product-detail .entry-left * {
  display: none !important;
}

/* B) Hide WC title + header strip (we use our hero/JS instead) */
body.cd-football-grid-product .mf-entry-product-header,
body.cd-football-grid-product h1.product_title,
body.cd-football-grid-product .product_title {
  display: none !important;
}

/* C) Remove theme "white panel" wrappers */
body.cd-football-grid-product .mf-product-detail,
body.cd-football-grid-product .mf-product-detail .mf-product-content,
body.cd-football-grid-product .mf-product-detail .mf-product-inner,
body.cd-football-grid-product .mf-product-detail .mf-product-summary,
body.cd-football-grid-product .mf-product-detail .mf-product-summary-wrap,
body.cd-football-grid-product .mf-product-detail .mf-product-summary-inner,
body.cd-football-grid-product .woocommerce div.product,
body.cd-football-grid-product .woocommerce div.product .summary,
body.cd-football-grid-product .woocommerce div.product .entry-summary,
body.cd-football-grid-product form.cart {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
}

/* D) Force single column (right column takes full width) */
body.cd-football-grid-product .mf-product-detail .entry-summary,
body.cd-football-grid-product .mf-product-detail .summary,
body.cd-football-grid-product .mf-product-detail .entry-right,
body.cd-football-grid-product .mf-product-detail .mf-product-summary,
body.cd-football-grid-product .mf-product-detail .mf-product-summary-wrap {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
}

/* E) Flatten any flex/grid wrappers that try to keep 2 columns alive */
body.cd-football-grid-product .mf-product-detail .mf-product-detail-inner,
body.cd-football-grid-product .mf-product-detail .mf-entry-product-header,
body.cd-football-grid-product .mf-product-detail .mf-entry-product-header .entry-header {
  display: block !important;
}

/* F) Remove top spacing so hero sits immediately after header */
body.cd-football-grid-product .site-content,
body.cd-football-grid-product .content-area,
body.cd-football-grid-product .mf-main-content-inner,
body.cd-football-grid-product .mf-product-detail {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ------------------------------------
   7) CONTAINER RESTORE (same approach as Rugby)
------------------------------------ */

/* Keep background full-bleed */
body.cd-football-grid-product .site-content,
body.cd-football-grid-product #content,
body.cd-football-grid-product .site-content .container,
body.cd-football-grid-product .site-content .mf-container,
body.cd-football-grid-product .site-content .container-fluid {
  width: 100% !important;
  max-width: 100% !important;
}

/* Constrain the main content area */
body.cd-football-grid-product .mf-product-detail,
body.cd-football-grid-product .mf-product-detail .entry-summary,
body.cd-football-grid-product .mf-product-detail .summary,
body.cd-football-grid-product .mf-product-detail .entry-right,
body.cd-football-grid-product .mf-product-detail .mf-product-summary,
body.cd-football-grid-product .mf-product-detail .mf-product-summary-wrap {
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* Grid respects the same container */
body.cd-football-grid-product #wc-lottery-pn,
body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers {
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  body.cd-football-grid-product .mf-product-detail,
  body.cd-football-grid-product .mf-product-detail .entry-summary,
  body.cd-football-grid-product .mf-product-detail .summary,
  body.cd-football-grid-product .mf-product-detail .entry-right,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary-wrap,
  body.cd-football-grid-product #wc-lottery-pn,
  body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 480px) {
  body.cd-football-grid-product .mf-product-detail,
  body.cd-football-grid-product .mf-product-detail .entry-summary,
  body.cd-football-grid-product .mf-product-detail .summary,
  body.cd-football-grid-product .mf-product-detail .entry-right,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary-wrap,
  body.cd-football-grid-product #wc-lottery-pn,
  body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* ------------------------------------
   8) MOBILE GUTTER OVERRIDES (copied from Rugby “final” behaviour)
   This prevents rogue Martfury mobile wrappers adding/removing padding.
------------------------------------ */

@media (max-width: 768px) {

  /* Nuke outer offenders */
  body.cd-football-grid-product.mobile-version.mobile-nav-enable,
  body.cd-football-grid-product.mobile-version.mobile-nav-enable #page,
  body.cd-football-grid-product.mobile-version.mobile-nav-enable #content,
  body.cd-football-grid-product.mobile-version.mobile-nav-enable .site-content,
  body.cd-football-grid-product.mobile-version.mobile-nav-enable .site-content .container,
  body.cd-football-grid-product.mobile-version.mobile-nav-enable .site-content .mf-container,
  body.cd-football-grid-product.mobile-version.mobile-nav-enable .content-area,
  body.cd-football-grid-product.mobile-version.mobile-nav-enable #primary,
  body.cd-football-grid-product.mobile-version.mobile-nav-enable #main {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Re-apply intentional gutters only where we want them */
  body.cd-football-grid-product .mf-product-detail,
  body.cd-football-grid-product .mf-product-detail .entry-summary,
  body.cd-football-grid-product .mf-product-detail .summary,
  body.cd-football-grid-product .mf-product-detail .entry-right,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary-wrap {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
  }

  body.cd-football-grid-product #wc-lottery-pn,
  body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  body.cd-football-grid-product .mf-product-detail,
  body.cd-football-grid-product .mf-product-detail .entry-summary,
  body.cd-football-grid-product .mf-product-detail .summary,
  body.cd-football-grid-product .mf-product-detail .entry-right,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary-wrap,
  body.cd-football-grid-product #wc-lottery-pn,
  body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* ------------------------------------
   9) Tabs/content forced to pure white (avoid Martfury grey)
------------------------------------ */

body.cd-football-grid-product .mf-product-summary,
body.cd-football-grid-product .mf-product-summary *,
body.cd-football-grid-product .mf-product-summary .mf-woo-tabs,
body.cd-football-grid-product .mf-product-summary .mf-woo-tabs *,
body.cd-football-grid-product .mf-product-summary .woocommerce-tabs,
body.cd-football-grid-product .mf-product-summary .woocommerce-tabs *,
body.cd-football-grid-product .mf-product-summary .mf-Tabs-panel,
body.cd-football-grid-product .mf-product-summary .mf-Tabs-panel *,
body.cd-football-grid-product .mf-product-summary .tab-content-wrapper,
body.cd-football-grid-product .mf-product-summary .tab-content-wrapper * {
  color: #ffffff !important;
}

body.cd-football-grid-product .mf-product-summary a,
body.cd-football-grid-product .mf-product-summary a * {
  color: #20b27a !important;
}
body.cd-football-grid-product .mf-product-summary a:hover,
body.cd-football-grid-product .mf-product-summary a:hover * {
  color: #35e0a0 !important;
}
/* ============================================================
   FOOTBALL GRID — MOBILE GUTTER FIX (match Rugby)
   Problem: grid area is getting double side-padding on mobile
   Fix: keep page gutters, but remove padding from the ticket grid wrapper
   Append at VERY END of cd-football-grid.css
   ============================================================ */

@media (max-width: 768px) {

  /* Keep gutters for normal content (how-to, countdown, headings etc.) */
  body.cd-football-grid-product .mf-product-detail,
  body.cd-football-grid-product .mf-product-detail .entry-summary,
  body.cd-football-grid-product .mf-product-detail .summary,
  body.cd-football-grid-product .mf-product-detail .entry-right,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary-wrap {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
  }

  /* BUT: remove padding from the grid itself (prevents “double gutter”) */
  body.cd-football-grid-product #wc-lottery-pn,
  body.cd-football-grid-product #wc-lottery-pn ul.tickets_numbers {
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  /* Slightly tighter overall gutter for small phones */
  body.cd-football-grid-product .mf-product-detail,
  body.cd-football-grid-product .mf-product-detail .entry-summary,
  body.cd-football-grid-product .mf-product-detail .summary,
  body.cd-football-grid-product .mf-product-detail .entry-right,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary,
  body.cd-football-grid-product .mf-product-detail .mf-product-summary-wrap {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}
/* =========================================================
   Football Grid — Card Label Formatting
   Match Rugby layout: centre + bracket on new line
   ========================================================= */

body.cd-football-grid-product .cd-grid-card__label {
  text-align: center;
  line-height: 1.25;
}

/* Force bracketed text onto its own row */
body.cd-football-grid-product .cd-grid-card__label span {
  display: block;
}

/* Style the bracket line (secondary emphasis) */
body.cd-football-grid-product .cd-grid-card__label span:last-child {
  margin-top: 4px;
  font-size: 0.85em;
  opacity: 0.8;
}
/* =========================================================
   Football Grid — label 2-line formatting (match Rugby)
   Supports the <span class="cd-football-caption"> injected by JS
   ========================================================= */

body.cd-football-grid-product .cd-football-label {
  text-align: center;
}

body.cd-football-grid-product .cd-football-label .cd-football-caption {
  display: block;
  margin-top: 2px;
  font-size: 0.9em;
  opacity: 0.85;
}
