/* TennisLeo Deal Cards: styles for the site and the block editor */
.tl-dc-section, .tl-dc-grid, .tl-dc-card {
  --tl-dc-navy: #0f1b2d; --tl-dc-night: #0a1322; --tl-dc-ball: #e2bd2c;
  --tl-dc-border: #dbe3f0; --tl-dc-muted: rgba(128,128,128,.95);
  --tl-dc-blue: var(--theme-button-background-initial-color, var(--theme-palette-color-1, #2872fa));
  --tl-dc-blue-hover: var(--theme-button-background-hover-color, var(--theme-palette-color-2, #1559ed));
}
.tl-dc-section, .tl-dc-section * , .tl-dc-card, .tl-dc-card * { box-sizing: border-box; }

/* ---------- Section ---------- */
.tl-dc-section {
  width: min(var(--theme-normal-container-max-width, 1290px), var(--theme-container-edge-spacing, 90vw), calc(100% - 32px));
  max-width: none !important;
  margin: 64px auto 0 !important;
  font-family: var(--theme-font-family, inherit);
  scroll-margin-top: 90px;
}
.tl-dc-section > * { margin-left: auto !important; margin-right: auto !important; max-width: none !important; }
.tl-dc-kicker { margin: 0 !important; text-align: center; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tl-dc-blue); }
.tl-dc-section .tl-dc-title { margin: 8px 0 0 !important; text-align: center; font-size: clamp(24px, 3vw, 34px); font-weight: 800; line-height: 1.15; }
.tl-dc-intro { max-width: 660px !important; margin: 10px auto 28px !important; text-align: center; font-size: 16px; line-height: 1.55; color: var(--tl-dc-muted); }
.tl-dc-note { margin: 18px 0 0 !important; text-align: center; font-size: 13px; color: var(--tl-dc-muted); }

.tl-dc-strip { margin: 20px 0 0 !important; border: 2px solid var(--tl-dc-border); border-radius: 14px; padding: 16px 22px !important; scroll-margin-top: 90px; }
.tl-dc-strip > p { margin: 0 !important; font-size: 15px; line-height: 1.9; text-align: center; }
.tl-dc-strip a { font-weight: 700; text-decoration: none; white-space: nowrap; }
.tl-dc-strip a:hover { text-decoration: underline; }

/* ---------- Grid ---------- */
.tl-dc-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tl-dc-grid.tl-dc-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tl-dc-grid.tl-dc-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tl-dc-grid > * { margin: 0 !important; max-width: none !important; width: auto !important; }

/* ---------- Card ---------- */
.tl-dc-card {
  position: relative; display: flex !important; flex-direction: column; gap: 10px;
  border: 2px solid var(--tl-dc-border); border-radius: 14px; padding: 22px 20px 20px !important;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tl-dc-card > * { margin: 0 !important; max-width: none !important; }
.tl-dc-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.08); border-color: var(--tl-dc-ball); }

.tl-dc-top { display: flex !important; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-dc-top > * { margin: 0 !important; }
.tl-dc-region { align-self: flex-start; font-size: 12px; font-weight: 700; line-height: 1.4; border: 1px solid var(--tl-dc-border); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.tl-dc-top .tl-dc-region { align-self: auto; }
.tl-dc-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #1f7a3e; white-space: nowrap; }
.tl-dc-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2ea85a; }

.tl-dc-store { font-size: 20px; font-weight: 800; line-height: 1.2; }
.tl-dc-deal { font-size: 15px; line-height: 1.5; color: var(--tl-dc-muted); }

/* Ledger line: LABEL ········ value */
.tl-dc-ledger { display: flex !important; align-items: baseline; gap: 8px; font-size: 14px; }
.tl-dc-ledger > p { margin: 0 !important; }
.tl-dc-ledger > p:first-child { flex: 1; display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tl-dc-muted); white-space: nowrap; }
.tl-dc-ledger > p:first-child::after { content: ""; flex: 1; min-width: 16px; border-bottom: 2px dotted var(--tl-dc-border); transform: translateY(-3px); }
.tl-dc-ledger > p:last-child { font-weight: 800; white-space: nowrap; }

/* Price list (bundles) */
.tl-dc-prices { display: flex !important; flex-direction: column; gap: 8px; }
.tl-dc-prices > * { margin: 0 !important; }
.tl-dc-prices .tl-dc-ledger > p:first-child { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 700; color: inherit; white-space: normal; }
.tl-dc-prices .tl-dc-ledger > p:last-child { font-size: 16px; font-variant-numeric: tabular-nums; }

/* Code box (Copy button added by deal-cards.js on the site) */
.tl-dc-code { display: flex !important; align-items: stretch; border: 2px dashed var(--tl-dc-border); border-radius: 10px; overflow: hidden; transition: border-color .25s ease; }
.tl-dc-code > p { flex: 1; display: flex; align-items: center; margin: 0 !important; padding: 9px 12px; font-size: 16px; font-weight: 700; letter-spacing: .04em; overflow-wrap: anywhere; }
.tl-dc-copy { border: 0; border-left: 2px dashed var(--tl-dc-border); background: transparent; color: inherit; padding: 0 14px; min-height: 42px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; transition: border-color .25s ease; }
.tl-dc-copy:hover { background: rgba(128,128,128,.1); }
.tl-dc-card:hover .tl-dc-code, .tl-dc-card:hover .tl-dc-copy { border-color: var(--tl-dc-ball); }

/* Button */
.tl-dc-card .wp-block-buttons { margin-top: auto !important; display: block; }
.tl-dc-card .wp-block-button { width: 100%; margin: 0; }
.tl-dc-card .wp-block-button__link { display: block; width: 100%; text-align: center; background: var(--tl-dc-blue) !important; color: #fff !important; font-size: 15px; font-weight: 700; border-radius: 10px !important; padding: 11px 14px !important; text-decoration: none !important; border: 0 !important; transition: background .2s ease; }
.tl-dc-card .wp-block-button__link:hover { background: var(--tl-dc-blue-hover) !important; }
.tl-dc-sublink { text-align: center; font-size: 14px; font-weight: 700; }
.tl-dc-sublink a { text-decoration: none; }
.tl-dc-sublink a:hover { text-decoration: underline; }

/* ---------- Exclusive code card (navy) ---------- */
.tl-dc-card.is-excl { background: var(--tl-dc-navy); border-color: var(--tl-dc-navy); }
.tl-dc-card.is-excl, .tl-dc-card.is-excl p, .tl-dc-card.is-excl h3 { color: #fff; }
.tl-dc-card.is-excl:hover { border-color: var(--tl-dc-ball); }
.tl-dc-card.is-excl .tl-dc-deal { color: rgba(255,255,255,.75); }
.tl-dc-card.is-excl .tl-dc-region { border-color: rgba(255,255,255,.3); }
.tl-dc-card.is-excl .tl-dc-ledger > p:first-child { color: rgba(255,255,255,.6); }
.tl-dc-card.is-excl .tl-dc-ledger > p:first-child::after { border-color: rgba(255,255,255,.25); }
.tl-dc-card.is-excl .tl-dc-ledger > p:last-child { color: var(--tl-dc-ball); }
.tl-dc-card.is-excl .tl-dc-code, .tl-dc-card.is-excl .tl-dc-copy { border-color: rgba(255,255,255,.35); color: #fff; }
.tl-dc-card.is-excl:hover .tl-dc-code, .tl-dc-card.is-excl:hover .tl-dc-copy { border-color: var(--tl-dc-ball); }

/* ---------- Black Friday section: night-navy buttons ---------- */
.tl-dc-section.is-bf .tl-dc-card:not(.is-excl):hover { border-color: var(--tl-dc-night); }
.tl-dc-section.is-bf .tl-dc-card:not(.is-excl):hover .tl-dc-code,
.tl-dc-section.is-bf .tl-dc-card:not(.is-excl):hover .tl-dc-copy { border-color: var(--tl-dc-night); }
.tl-dc-section.is-bf .tl-dc-card:not(.is-excl) .wp-block-button__link { background: var(--tl-dc-night) !important; }
.tl-dc-section.is-bf .tl-dc-card:not(.is-excl) .wp-block-button__link:hover { background: var(--tl-dc-blue) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .tl-dc-grid, .tl-dc-grid.tl-dc-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .tl-dc-section { margin-top: 44px !important; }
  .tl-dc-grid, .tl-dc-grid.tl-dc-two, .tl-dc-grid.tl-dc-four { grid-template-columns: 1fr; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-dc-card { transition: none; }
  .tl-dc-card:hover { transform: none; }
}
