/*
==========================================
9CAMPNOU - TICKET PRICES PAGE
==========================================
page-fc-barcelona-ticket-prices.php
Loaded only on that page (campnou_is_ticket_prices_page()).
==========================================
*/

.tp-page {
  --tp-primary: #a50044;
  --tp-secondary: #004d98;
  --tp-navy: #0d1b2a;
  --tp-accent: #edbb00;
  --tp-text: #18181b;
  --tp-muted: #71717a;
  --tp-line: #e4e4e7;
  --tp-bg-soft: #f4f4f5;
  --tp-up: #a50044;
  --tp-down: #15803d;

  overflow-x: hidden; /* mobile: never clip/scroll the whole page sideways */
  /* Plus Jakarta Sans joins "fi" into one glyph without the dot over the i. */
  font-variant-ligatures: no-common-ligatures;
  font-feature-settings: "liga" 0, "clig" 0;
  color: var(--tp-text);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  background: #fff;
}

/* ---------- Hero ---------- */

.tp-page .tp-hero {
  --tp-ticket-overlap: 4.5rem;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(165, 0, 68, 0.55) 0%, transparent 55%),
    linear-gradient(135deg, #003a75 0%, var(--tp-navy) 70%);
  color: #fff;
  padding: 9.5rem 0 calc(3rem + var(--tp-ticket-overlap));
}

.tp-page .tp-hero__eyebrow {
  font-family: var(--font-mono, 'Roboto Mono', monospace);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tp-accent);
  margin: 0 0 1rem;
}

.tp-page .tp-hero__title {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  color: #fff !important;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}

.tp-page .tp-hero__subtitle {
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  line-height: 1.55;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 1.25rem;
}

.tp-page .tp-hero__updated {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.tp-page .tp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex: none;
}

/* ---------- Sections ---------- */

.tp-page .tp-main {
  padding: 1rem 0 3rem;
}

.tp-page .tp-section {
  max-width: 980px;
  margin: 0 auto;
  padding: 2.5rem 0 0;
}

.tp-page .tp-section h2 {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  color: var(--tp-text);
  margin: 0 0 0.75rem;
}

.tp-page .tp-section p {
  font-size: 1.0625rem;
  line-height: 1.65;
  margin: 0 0 1rem;
}

.tp-page .tp-section a:not(.tp-buy) {
  color: var(--tp-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tp-page .tp-lead {
  color: var(--tp-muted);
}

.tp-page .tp-note {
  background: var(--tp-bg-soft);
  border-left: 3px solid var(--tp-accent);
  padding: 0.75rem 1rem;
  font-size: 0.9375rem !important;
}

.tp-page .tp-answer {
  padding-top: 3rem;
}

.tp-page .tp-answer p {
  font-size: 1.125rem;
}

/* ---------- Tables ---------- */

.tp-page .tp-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--tp-line);
  margin: 0.5rem 0 1rem;
}

.tp-page .tp-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 0;
}

.tp-page .tp-table--zones {
  min-width: 480px;
}

.tp-page .tp-table th,
.tp-page .tp-table td {
  padding: 0.85rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border: 0;
  border-bottom: 1px solid var(--tp-line);
}

.tp-page .tp-table thead th {
  background: var(--tp-bg-soft);
  font-size: 0.8125rem;
  color: var(--tp-muted);
  font-weight: 600;
  white-space: nowrap;
}

.tp-page .tp-table tbody tr:last-child th,
.tp-page .tp-table tbody tr:last-child td {
  border-bottom: 0;
}

.tp-page .tp-table tbody th {
  font-weight: 500;
}

.tp-page .tp-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tp-page .tp-from {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--tp-primary);
}

.tp-page .tp-match {
  display: block;
  font-weight: 700;
  color: var(--tp-text);
}

.tp-page .tp-meta {
  display: block;
  font-size: 0.8125rem;
  color: var(--tp-muted);
  font-weight: 400;
}

.tp-page .tp-status {
  --s: #15803d;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--tp-text);
}

.tp-page .tp-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--s);
  flex: none;
}

.tp-page .tp-status--socios_presale {
  --s: #c99700;
}

.tp-page .tp-status--sold_out {
  --s: var(--tp-primary);
}

.tp-page .tp-change {
  font-weight: 700;
}

.tp-page .tp-change--up {
  color: var(--tp-up);
}

.tp-page .tp-change--down {
  color: var(--tp-down);
}

.tp-page .tp-buy {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  background: var(--tp-secondary);
  color: #fff !important;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 150ms ease;
}

.tp-page .tp-buy:hover {
  background: #003a75;
}

.tp-page .is-sold-out th,
.tp-page .is-sold-out td {
  color: var(--tp-muted);
}

.tp-page .tp-sold {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--tp-primary);
}

.tp-page .tp-promo {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  background: var(--tp-accent);
  color: #000;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Charts ---------- */

.tp-page .tp-chart {
  position: relative;
  height: 420px;
  margin: 0.25rem 0 1rem;
}

@media (max-width: 600px) {
  .tp-page .tp-chart {
    height: 560px;
  }
}

/* ---------- Match panels ---------- */

.tp-page .tp-panel {
  border: 1px solid var(--tp-line);
  padding: 1.5rem;
  margin: 0 0 1.5rem;
  scroll-margin-top: 90px;
}

.tp-page .tp-panel__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tp-page .tp-panel__title {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.375rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
}

.tp-page .tp-panel__head .tp-meta {
  margin: 0;
}

.tp-page .tp-panel__facts {
  text-align: right;
}

.tp-page .tp-panel__facts p {
  margin: 0 0 0.35rem;
}

.tp-page .tp-panel__from {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--tp-primary);
}

.tp-page .tp-panel__from .tp-meta {
  display: inline;
  font-size: 0.875rem;
}

.tp-page .tp-panel__chart-title {
  font-size: 0.9375rem;
  color: var(--tp-text);
  font-weight: 700;
  margin: 1.25rem 0 0.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--tp-line);
}

@media (max-width: 600px) {
  .tp-page .tp-panel {
    padding: 1rem;
  }
  .tp-page .tp-panel__facts {
    text-align: left;
    width: 100%;
  }
  .tp-page .tp-panel__facts .tp-buy {
    display: block;
    text-align: center;
    padding: 0.75rem;
  }
}

.tp-page .tp-zones > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--tp-secondary);
  padding: 0.5rem 0;
}

.tp-page .tp-zones .tp-table-wrap {
  margin-top: 0.5rem;
}

.tp-page .tp-link-btn {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--tp-secondary);
  color: var(--tp-secondary) !important;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none !important;
}

.tp-page .tp-link-btn:hover {
  background: var(--tp-secondary);
  color: #fff !important;
}

/* Resale note inside a panel + general box */
.tp-page .tp-resale {
  background: #fdf8e7;
  border-left: 3px solid var(--tp-accent);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
}

.tp-page .tp-resale p {
  font-size: 0.9375rem !important;
  margin: 0 0 0.35rem !important;
}

.tp-page .tp-resale a {
  font-weight: 700;
}

.tp-page .tp-resale-box {
  border: 1px solid var(--tp-line);
  padding: 1.5rem;
  margin-top: 3rem;
}

.tp-page .tp-resale-box h2 {
  font-size: 1.375rem !important;
}

/* ---------- Ticket alerts ---------- */

.tp-page .tp-alerts {
  scroll-margin-top: 90px;
}

.tp-page .tp-alert-form {
  background: var(--tp-navy);
  color: #fff;
  padding: 1.5rem;
}

.tp-page .tp-alert-form__matches {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.tp-page .tp-alert-form__matches legend {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  padding: 0;
}

.tp-page .tp-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.7rem 0.8rem;
  cursor: pointer;
}

.tp-page .tp-check:has(input:checked) {
  border-color: var(--tp-accent);
  background: rgba(237, 187, 0, 0.08);
}

.tp-page .tp-check input,
.tp-page .tp-consent input {
  margin-top: 0.25rem;
  accent-color: var(--tp-accent);
  flex: none;
}

.tp-page .tp-alert-form .tp-match {
  color: #fff;
}

.tp-page .tp-alert-form .tp-meta {
  color: rgba(255, 255, 255, 0.65);
}

.tp-page .tp-alert-form__row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tp-page .tp-alert-form__row input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 0 !important;
  border-radius: 0 !important;
  font-size: 1rem;
  background: #fff !important;
  color: var(--tp-text) !important;
}

.tp-page .tp-alert-form__submit {
  padding: 0.8rem 1.25rem;
  background: var(--tp-accent) !important;
  color: #000 !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.tp-page .tp-alert-form__submit:disabled {
  opacity: 0.6;
}

@media (max-width: 600px) {
  .tp-page .tp-alert-form {
    padding: 1rem;
  }
  .tp-page .tp-alert-form__row {
    flex-direction: column;
  }
}

.tp-page .tp-consent {
  display: flex;
  gap: 0.6rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.75rem;
}

.tp-page .tp-consent a {
  color: var(--tp-accent) !important;
}

.tp-page .tp-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tp-page .tp-alert-form__msg {
  min-height: 1.2em;
  font-weight: 700;
  margin: 0 0 0.5rem !important;
  font-size: 0.9375rem !important;
}

.tp-page .tp-alert-form__msg.is-ok {
  color: #86efac;
}

.tp-page .tp-alert-form__msg.is-error {
  color: #fca5a5;
}

/* ---------- How prices work ---------- */

.tp-page .tp-how__grid {
  display: grid;
  gap: 0.5rem 3rem;
  grid-template-columns: 1fr;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .tp-page .tp-how__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tp-page .tp-how__item {
  padding: 1rem 0 0;
  border-top: 1px solid var(--tp-line);
}

.tp-page .tp-how__item h3 {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.125rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.tp-page .tp-how__item p {
  font-size: 1rem;
}

/* ---------- FAQ ---------- */

.tp-page .tp-faq__item {
  border-bottom: 1px solid var(--tp-line);
}

.tp-page .tp-faq__item > summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.5rem 1rem 0;
  position: relative;
}

.tp-page .tp-faq__item > summary::-webkit-details-marker {
  display: none;
}

.tp-page .tp-faq__item > summary::after {
  content: '+';
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--tp-primary);
}

.tp-page .tp-faq__item[open] > summary::after {
  content: '−';
}

.tp-page .tp-faq__item h3 {
  display: inline;
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0;
}

.tp-page .tp-faq__item p {
  padding-bottom: 0.5rem;
}

/* ---------- Method ---------- */

.tp-page .tp-method p {
  font-size: 0.9375rem;
  color: var(--tp-muted);
}

/* ---------- Ebook ---------- */

.tp-page .tp-ebook {
  background: var(--tp-bg-soft);
  padding: 3rem 0;
  text-align: center;
}

.tp-page .tp-ebook__title {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.tp-page .tp-ebook__text {
  max-width: 60ch;
  margin: 0 auto 1.5rem;
  color: var(--tp-muted);
  line-height: 1.6;
}

.tp-page .tp-ebook__banner {
  display: block;
  max-width: 980px;
  margin: 0 auto;
}

.tp-page .tp-ebook__banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Matches table → cards on phones ---------- */

@media (max-width: 720px) {
  .tp-page .tp-table-wrap:has(.tp-table--matches) {
    border: 0;
    overflow: visible;
  }
  .tp-page .tp-table--matches {
    min-width: 0;
  }
  .tp-page .tp-table--matches thead {
    display: none;
  }
  .tp-page .tp-table--matches,
  .tp-page .tp-table--matches tbody {
    display: block;
  }
  .tp-page .tp-table--matches tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    border: 1px solid var(--tp-line);
    padding: 1rem;
    margin-bottom: 0.75rem;
  }
  .tp-page .tp-table--matches th,
  .tp-page .tp-table--matches td {
    display: block;
    padding: 0;
    border: 0 !important;
    white-space: normal;
  }
  .tp-page .tp-table--matches tbody th,
  .tp-page .tp-table--matches .tp-buy-cell {
    grid-column: 1 / -1;
  }
  .tp-page .tp-table--matches td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem;
    color: var(--tp-muted);
    margin-bottom: 0.15rem;
  }
  .tp-page .tp-table--matches .tp-buy {
    display: block;
    text-align: center;
    padding: 0.75rem;
  }
}

/* ---------- GetYourGuide (affiliate) ---------- */

.tp-page .tp-gyg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  max-width: 980px;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid var(--tp-line);
  text-align: left;
}

.tp-page .tp-gyg > div {
  flex: 1 1 320px;
}

.tp-page .tp-gyg__title {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.125rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
}

.tp-page .tp-gyg__text {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--tp-muted);
  margin: 0;
}

.tp-page .tp-gyg__text a {
  color: var(--tp-secondary);
}

.tp-page .tp-gyg__cta {
  padding: 0.8rem 1.1rem;
}

.tp-page .tp-table--matches a.tp-match {
  text-decoration: none;
  color: var(--tp-text) !important;
}

.tp-page .tp-table--matches a.tp-match:hover {
  color: var(--tp-secondary) !important;
}

.tp-page .tp-alert-form p.tp-meta {
  font-size: 0.8125rem !important;
  margin: 0 !important;
}


.tp-page h1,
.tp-page h2,
.tp-page h3,
.tp-page h4 {
  font-variant-ligatures: no-common-ligatures;
  font-feature-settings: "liga" 0, "clig" 0;
}

/* ---------- Upcoming matches: rows ---------- */

.tp-page .tp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.8125rem !important;
  margin: 0 0 0.75rem !important;
  color: var(--tp-muted);
}

.tp-page .tp-legend span::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 0.4rem;
  vertical-align: middle;
  background: var(--c);
}

.tp-page .tp-rows {
  border: 1px solid var(--tp-line);
}

.tp-page .tp-rows__head,
.tp-page .tp-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 0.6fr 0.9fr 0.8fr 0.8fr 240px;
  gap: 0.75rem;
  align-items: start;
  padding: 0.9rem 1rem;
}

.tp-page .tp-rows__head {
  background: var(--tp-bg-soft);
  font-size: 0.8125rem;
  color: var(--tp-muted);
  font-weight: 600;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.tp-page .tp-row {
  border-top: 1px solid var(--tp-line);
  font-size: 0.9375rem;
}

.tp-page .tp-row--soon {
  background: #fafafa;
}

.tp-page .tp-row__soon {
  grid-column: 2 / 6;
  color: var(--tp-muted);
  align-self: center;
}

.tp-page .tp-row a.tp-match {
  text-decoration: none;
  color: var(--tp-text) !important;
}

.tp-page .tp-row a.tp-match:hover {
  color: var(--tp-secondary) !important;
}

.tp-page .tp-status--not_on_sale {
  --s: #a1a1aa;
}

.tp-page .tp-from--none {
  color: var(--tp-muted);
  font-weight: 400;
}

.tp-page .tp-row__side {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tp-page .tp-mini {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--tp-line);
  background: #fff !important;
  cursor: zoom-in;
  position: relative;
  border-radius: 0 !important;
}

.tp-page .tp-mini__canvas {
  display: block;
  width: 100% !important;
  height: 96px !important;
}

/* Magnifier in its own right-hand gutter (the mini chart reserves 44px for it in JS). */
.tp-page .tp-mini__hint {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  color: var(--tp-secondary);
  transition: color 0.15s ease, transform 0.15s ease;
}

.tp-page .tp-mini__hint svg {
  display: block;
  width: 100%;
  height: 100%;
}

.tp-page .tp-mini:hover {
  border-color: var(--tp-secondary);
}

.tp-page .tp-mini:hover .tp-mini__hint,
.tp-page .tp-mini:focus-visible .tp-mini__hint {
  color: var(--tp-primary);
  transform: translateY(-50%) scale(1.1);
}

.tp-page .tp-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.tp-page .tp-btns .tp-buy {
  text-align: center;
  padding: 0.55rem 0.4rem;
  font-size: 0.75rem;
}

.tp-page .tp-buy--alt {
  background: #fff !important;
  color: var(--tp-secondary) !important;
  box-shadow: inset 0 0 0 2px var(--tp-secondary);
}

.tp-page .tp-buy--alt:hover {
  background: var(--tp-secondary) !important;
  color: #fff !important;
}

.tp-page .tp-panel__facts .tp-btns {
  min-width: 260px;
  margin-top: 0.25rem;
}

@media (max-width: 860px) {
  .tp-page .tp-rows {
    border: 0;
  }
  .tp-page .tp-rows__head {
    display: none;
  }
  .tp-page .tp-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--tp-line);
    margin-bottom: 0.75rem;
  }
  .tp-page .tp-row__match,
  .tp-page .tp-row__side,
  .tp-page .tp-row__soon {
    grid-column: 1 / -1;
  }
  .tp-page .tp-row__cell[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem;
    color: var(--tp-muted);
    margin-bottom: 0.15rem;
  }
  .tp-page .tp-mini__canvas {
    height: 120px !important;
  }
  .tp-page .tp-btns .tp-buy {
    padding: 0.75rem 0.4rem;
    font-size: 0.8125rem;
  }
  .tp-page .tp-panel__facts .tp-btns {
    min-width: 0;
  }
}

/* ---------- Ebook banner between sections ---------- */

.tp-page .tp-ebook-inline {
  display: block;
  max-width: 980px;
  margin: 2.5rem auto 0;
}

.tp-page .tp-ebook-inline img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Enlarge link under panel charts ---------- */

.tp-page .tp-zoom-link {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  color: var(--tp-secondary) !important;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

/* ---------- Select all / Deselect all (panel charts + dialog) ---------- */

.tp-chart-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  margin: 0 0 0.75rem;
}

.tp-chart-tools[hidden] {
  display: none;
}

.tp-chart-tools button {
  background: none !important;
  border: 0 !important;
  padding: 0.25rem 0 !important;
  color: var(--tp-secondary, #004d98) !important;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.tp-chart-tools button:hover,
.tp-chart-tools button:focus-visible {
  color: var(--tp-primary, #a50044) !important;
}

.tp-chart-tools button + button {
  border-left: 1px solid #d4d4d8 !important;
  padding-left: 1rem !important;
}

.tp-modal .tp-chart-tools {
  margin: 0.75rem 0 0;
}

/* ---------- Enlarged chart dialog ---------- */

.tp-modal {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #18181b;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-variant-ligatures: no-common-ligatures;
}

.tp-modal::backdrop {
  background: rgba(13, 27, 42, 0.75);
}

.tp-modal__inner {
  padding: 1.25rem 1.25rem 1rem;
}

.tp-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.tp-modal__title {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0;
}

.tp-modal__close {
  background: none !important;
  border: 0 !important;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #18181b !important;
  padding: 0 0.25rem !important;
}

.tp-modal .tp-meta {
  font-size: 0.8125rem;
  color: #71717a;
  margin: 0.25rem 0 0.5rem;
}

.tp-modal__chart {
  position: relative;
  height: min(55vh, 460px);
}

.tp-modal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
  max-height: 22vh;
  overflow-y: auto;
}

.tp-chip {
  border: 1px solid #e4e4e7 !important;
  background: #fff !important;
  color: #18181b !important;
  border-radius: 999px !important;
  padding: 0.3rem 0.7rem 0.3rem 0.55rem !important;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tp-chip::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--c);
  background: #fff;
}

.tp-chip[aria-pressed="true"] {
  border-color: var(--c) !important;
  background: #f4f4f5 !important;
  font-weight: 700;
}

.tp-chip[aria-pressed="true"]::before {
  background: var(--c);
}

@media (max-width: 600px) {
  .tp-modal {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
  }
  .tp-modal__chart {
    height: 50vh;
  }
}

/* ---------- Socios: "?" tooltip + links ---------- */

.tp-page .tp-tip {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.35rem;
  line-height: 1;
}

.tp-page .tp-tip__btn {
  width: 18px;
  height: 18px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--tp-secondary) !important;
  color: #fff !important;
  font: 700 11px/18px var(--font-body, 'DM Sans', sans-serif) !important;
  text-align: center;
  cursor: help;
}

.tp-page .tp-tip__btn:hover,
.tp-page .tp-tip__btn:focus-visible {
  background: var(--tp-primary) !important;
}

.tp-page .tp-tip__box {
  display: none;
  position: absolute;
  z-index: 50;
  left: -0.5rem;
  top: calc(100% + 8px);
  width: 280px;
  padding: 0.75rem 0.85rem;
  background: var(--tp-navy);
  color: #fff;
  font: 400 0.8125rem/1.5 var(--font-body, 'DM Sans', sans-serif);
  text-transform: none;
  letter-spacing: normal;
  text-align: left;
  white-space: normal;
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.25);
}

.tp-page .tp-tip__box::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: -6px;
  border: 6px solid transparent;
  border-top: 0;
  border-bottom-color: var(--tp-navy);
}

.tp-page .tp-tip__box a {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--tp-accent) !important;
  font-weight: 700;
  text-decoration: underline;
}

.tp-page .tp-tip:hover .tp-tip__box,
.tp-page .tp-tip:focus-within .tp-tip__box,
.tp-page .tp-tip.is-open .tp-tip__box {
  display: block;
}

/* Phones: a bar at the bottom of the screen, so it never runs off the edge. */
@media (max-width: 600px) {
  .tp-page .tp-tip__box {
    position: fixed;
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 16px;
    width: auto;
    font-size: 0.875rem;
  }
  .tp-page .tp-tip__box::before {
    display: none;
  }
}

.tp-page a.tp-socio-link {
  color: var(--tp-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tp-page .tp-alert-form a.tp-socio-link {
  color: var(--tp-accent) !important;
}

.tp-page .tp-btns .tp-buy--wide {
  grid-column: 1 / -1;
  background: var(--tp-primary);
}

.tp-page .tp-btns .tp-buy--wide:hover {
  background: #8c003a;
}

/* ---------- Hero with photo (featured image of the page) ---------- */

.tp-page .tp-hero--photo {
  position: relative;
  overflow: hidden;
  background: var(--tp-navy);
  padding-top: 11rem;
  padding-bottom: calc(3.5rem + var(--tp-ticket-overlap));
  min-height: 600px;
  display: flex;
  align-items: flex-end;
}

.tp-page .tp-hero__bg {
  position: absolute;
  inset: 0;
}

.tp-page .tp-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  display: block;
}

/* Dark on the left (text), photo visible on the right, fades into the stats bar. */
.tp-page .tp-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(13, 27, 42, 0.55) 0%, rgba(13, 27, 42, 0) 30%, rgba(13, 27, 42, 0) 60%, rgba(13, 27, 42, 0.95) 100%),
    linear-gradient(90deg, rgba(13, 27, 42, 0.9) 0%, rgba(13, 27, 42, 0.65) 45%, rgba(13, 27, 42, 0.15) 100%);
}

.tp-page .tp-hero--photo .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.tp-page .tp-hero--photo .tp-hero__subtitle {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

@media (max-width: 600px) {
  .tp-page .tp-hero--photo {
    min-height: 0;
    padding-top: 8.5rem;
    padding-bottom: calc(2.5rem + var(--tp-ticket-overlap));
  }
  .tp-page .tp-hero__bg::after {
    background: linear-gradient(to bottom, rgba(13, 27, 42, 0.6) 0%, rgba(13, 27, 42, 0.75) 50%, rgba(13, 27, 42, 0.95) 100%);
  }
}

/* ---------- Archive: prices from earlier seasons ---------- */

.tp-page .tp-older__title {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.2;
  color: var(--tp-text);
  margin: 2.5rem 0 0.75rem;
}

.tp-page .tp-older__points {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.tp-page .tp-older__points li {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

/* One row per match, sections inside (opens like the FAQ) */
.tp-page .tp-older {
  border-top: 1px solid var(--tp-line);
}

.tp-page .tp-older__match {
  border-bottom: 1px solid var(--tp-line);
}

.tp-page .tp-older__match > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.5rem 1rem 0;
  position: relative;
}

.tp-page .tp-older__match > summary::-webkit-details-marker {
  display: none;
}

.tp-page .tp-older__match > summary::after {
  content: '+';
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--tp-primary);
}

.tp-page .tp-older__match[open] > summary::after {
  content: '\2212';
}

.tp-page .tp-older__head,
.tp-page .tp-older__price {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.tp-page .tp-older__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

/* Competition tags: one colour per kind of match */
.tp-page .tp-tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--tp-bg-soft);
  color: #52525b;
}

.tp-page .tp-tag--laliga {
  background: #fdf3cc;
  color: #6b5200;
}

.tp-page .tp-tag--ucl {
  background: var(--tp-navy);
  color: #fff;
}

.tp-page .tp-tag--copa {
  background: #f8e6ee;
  color: var(--tp-primary);
}

.tp-page .tp-tag--gamper {
  background: #e3f4e8;
  color: #166534;
}

/* Filters above the list (shown by ticket-prices.js) */
.tp-page .tp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.tp-page .tp-filters[hidden] {
  display: none;
}

.tp-page .tp-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--tp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--tp-text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.tp-page .tp-filter:hover {
  border-color: var(--tp-secondary);
}

.tp-page .tp-filter[aria-pressed="true"] {
  background: var(--tp-navy);
  border-color: var(--tp-navy);
  color: #fff;
}

.tp-page .tp-filter__n {
  font-weight: 400;
  color: var(--tp-muted);
}

.tp-page .tp-filter[aria-pressed="true"] .tp-filter__n {
  color: rgba(255, 255, 255, 0.7);
}

.tp-page .tp-older__match[hidden] {
  display: none;
}

.tp-page .tp-older__price {
  flex-shrink: 0;
  text-align: right;
}

.tp-page .tp-older__amount {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.2;
  color: var(--tp-primary);
  white-space: nowrap;
}

.tp-page .tp-older__match .tp-table-wrap {
  margin: 0 0 1rem;
}

.tp-page .tp-table--older {
  min-width: 0;
}

.tp-page .tp-table--older .tp-from {
  font-size: 1rem;
}

@media (max-width: 600px) {
  .tp-page .tp-older__match > summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .tp-page .tp-older__price {
    text-align: left;
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
  }
}

/* ---------- Today's cheapest ticket (the one bold element of the page) ----------
   A match ticket overlapping the bottom of the hero: main part with the price,
   perforated edge, stub with the supporting numbers. The notches are circles in
   the colour of whatever is behind them (hero navy on top, white below). */

.tp-page .tp-ticket-wrap {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * var(--tp-ticket-overlap, 4.5rem));
}

.tp-page .tp-ticket {
  --notch: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 24px 48px -24px rgba(13, 27, 42, 0.55);
  color: var(--tp-text);
}

.tp-page .tp-ticket p {
  margin: 0;
}

.tp-page .tp-ticket__main {
  padding: 1.75rem 2rem 1.75rem;
}

.tp-page .tp-ticket__label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--tp-secondary);
}

.tp-page .tp-ticket__price {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: clamp(4rem, 9vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--tp-primary);
  font-variant-numeric: tabular-nums;
  margin: 0.35rem 0 0.9rem !important;
}

.tp-page .tp-ticket__match {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.25;
}

.tp-page .tp-ticket__date {
  font-size: 0.9375rem;
  color: var(--tp-muted);
  margin-top: 0.2rem !important;
}

.tp-page .tp-ticket__stub {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem 1.75rem 1.5rem;
  border-left: 2px dashed #d4d4d8;
}

.tp-page .tp-ticket__stub::before,
.tp-page .tp-ticket__stub::after {
  content: '';
  position: absolute;
  left: calc(var(--notch) / -2 - 1px);
  width: var(--notch);
  height: var(--notch);
  border-radius: 50%;
}

.tp-page .tp-ticket__stub::before {
  top: calc(var(--notch) / -2);
  background: #0f1d2c;
}

.tp-page .tp-ticket__stub::after {
  bottom: calc(var(--notch) / -2);
  background: #fff;
}

.tp-page .tp-ticket__facts {
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.tp-page .tp-ticket__facts div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.tp-page .tp-ticket__facts dt {
  font-size: 0.9375rem;
  color: var(--tp-muted);
}

.tp-page .tp-ticket__facts dd {
  margin: 0;
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tp-page .tp-ticket__note {
  font-size: 0.875rem;
  color: var(--tp-muted);
}

.tp-page .tp-ticket__cta {
  margin-top: auto;
  text-align: center;
  padding: 0.8rem 1rem;
  font-size: 0.875rem;
}

.tp-page .tp-ticket__past {
  align-self: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tp-secondary) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 700px) {
  .tp-page .tp-hero {
    --tp-ticket-overlap: 3rem;
  }
  .tp-page .tp-ticket {
    grid-template-columns: 1fr;
  }
  .tp-page .tp-ticket__main {
    padding: 1.25rem 1.25rem 1.25rem;
  }
  .tp-page .tp-ticket__stub {
    padding: 1.25rem;
    border-left: 0;
    border-top: 2px dashed #d4d4d8;
  }
  /* Stacked: the tear line sits over white, where notches would not show. */
  .tp-page .tp-ticket__stub::before,
  .tp-page .tp-ticket__stub::after {
    display: none;
  }
}

@media (min-width: 701px) and (max-width: 1040px) {
  .tp-page .tp-ticket {
    grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
  }
}

/* ---------- Matches not on sale yet: compact list ---------- */

.tp-page .tp-soon__title {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.2;
  margin: 2.5rem 0 0.4rem;
}

.tp-page .tp-soon {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 3px solid var(--tp-accent);
}

.tp-page .tp-soon__item {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--tp-line);
  margin: 0;
}

/* Date as a small calendar page: navy, day in white, month in gold */
.tp-page .tp-soon__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 3.5rem;
  padding: 0.35rem 0.25rem;
  border-radius: 3px;
  background: var(--tp-secondary);
  color: #fff;
  text-align: center;
  line-height: 1.1;
}

.tp-page .tp-soon__day {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.375rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tp-page .tp-soon__month {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--tp-accent);
}

.tp-page .tp-soon__weekday {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.75);
}

.tp-page .tp-soon__date--tbc .tp-soon__weekday {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
}

.tp-page .tp-soon__alert {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff !important;
  background: var(--tp-primary);
  text-decoration: none !important;
  padding: 0.6rem 0.9rem;
  border-radius: 2px;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.tp-page .tp-soon__alert:hover {
  background: #7d0034;
  color: #fff !important;
}

.tp-page .tp-soon__resale {
  font-size: 0.9375rem !important;
  color: var(--tp-muted);
  margin-top: 0.9rem !important;
}

.tp-page .tp-soon__resale a {
  font-weight: 700;
}

@media (max-width: 600px) {
  .tp-page .tp-soon__item {
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0.6rem 0.85rem;
  }
  .tp-page .tp-soon__date {
    grid-row: span 2;
  }
  .tp-page .tp-soon__alert {
    justify-self: start;
  }
}

/* ---------- Keyboard focus ---------- */

.tp-page a:focus-visible,
.tp-page button:focus-visible,
.tp-page summary:focus-visible,
.tp-page input:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}
