/* "Spil"-sektionen: overblik (/spil/), kategori-sider (/spil/kategori/{slug}/)
   og odds-siden (/spil/odds/) - se archive.php/archive-render.php/
   archive-template.php. Genbruger samme farve-CSS-custom-properties-mønster
   som betting-header/footer-blokkene (--cb-bg/--cb-text/--cb-accent). */

.cbs-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* Header-bjælke + faner opfører sig som ét samlet, afrundet kort - den
   mørkegrønne badge-del har kun runde hjørner foroven, fane-linjen kun
   forneden, ligesom betting-footer + disclaimer (blocks/betting-blocks.css). */
.cbs-topbar {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border-subtle, #ebeeee);
  margin-bottom: 28px;
}

.cbs-header {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-brand-headline, #1c2b12);
  color: #fff;
  padding: 20px 24px;
}

.cbs-header__badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #a8e063;
}
.cbs-header__badge svg { width: 22px; height: 22px; }

.cbs-header__text { display: flex; flex-direction: column; gap: 2px; }
.cbs-header__title { font-size: 20px; font-weight: 800; line-height: 1.2; }
.cbs-header__subtitle { font-size: 14px; opacity: 0.75; }

.cbs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  background: var(--color-background-default, #fff);
  padding: 14px 24px;
}

.cbs-tab {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary, #5c686a);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.cbs-tab:hover { color: var(--color-text-primary, #122527); }
.cbs-tab.is-active {
  color: var(--color-text-primary, #122527);
  border-bottom-color: var(--color-brand-headline, #28710d);
}

.cbs-empty {
  color: var(--color-text-secondary, #5c686a);
  font-size: 15px;
  padding: 32px 0;
  text-align: center;
}

/* Gitteret: 1 stort kort + 2 mellemstore stablet til højre, derefter 3 små
   kort i fuld bredde - se campo_betting_render_spil_grid(). */
.cbs-grid { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }

.cbs-row-top { display: flex; gap: 20px; align-items: flex-start; }
.cbs-row-top > .cbs-card-wrap:first-child { flex: 1.4; min-width: 0; }

.cbs-col-secondary { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.cbs-row-bottom { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

@media (max-width: 860px) {
  .cbs-row-top { flex-direction: column; }
  .cbs-row-bottom { grid-template-columns: 1fr; }
}

/* Ét kort: farvet boks (cbs-card) + titel/evt. sponsor-linje under boksen
   (cbs-card__footer) - samme opdeling som header-blokkens kort/postmeta. */
.cbs-card-wrap { display: flex; flex-direction: column; min-width: 0; }

.cbs-card {
  --cb-bg: #1c2b12;
  --cb-bg-dark: #101a0a;
  --cb-text: #ffffff;
  --cb-accent: #a8e063;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 270 / 150;
  background: var(--cb-bg);
  color: var(--cb-text);
  border-radius: 16px;
  padding: 20px;
  overflow: hidden;
  text-decoration: none;
}
@media (prefers-color-scheme: dark) {
  .cbs-card { background: var(--cb-bg-dark); }
}
.cbs-card--big { padding: 24px; }

/* Stort, nedtonet baggrunds-ikon der bløder ud over det øverste højre
   hjørne - rent dekorativt lag, ADSKILT fra det almindelige, synlige ikon i
   cbs-card__top (se nedenfor). Farves som kortets egen accentfarve via
   mask-image, ligesom kategori-badgets ikon i betting-header-blokken. */
.cbs-card__watermark {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 80%;
  height: 80%;
  background-color: var(--cb-text);
  opacity: 0.1;
  -webkit-mask-image: var(--cbs-icon-url);
  mask-image: var(--cbs-icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  pointer-events: none;
}

.cbs-card__top {
  position: relative;
  z-index: 1;
  display: flex;
}

/* Ikon + kategori-navn som ét grupperet badge - ikonet står FØRAN (til
   venstre for) teksten, begge farvet med kategoriens accentfarve. */
.cbs-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cbs-card__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cb-accent);
}

.cbs-card__icon {
  flex: none;
  width: 16px;
  height: 16px;
  background-color: var(--cb-accent);
  -webkit-mask-image: var(--cbs-icon-url);
  mask-image: var(--cbs-icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
}

.cbs-card__body {
  position: relative;
  z-index: 1;
  margin: 16px 0;
}

.cbs-card__match {
  display: block;
  color: var(--cb-text);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.25;
}
.cbs-card--small .cbs-card__match,
.cbs-card--medium .cbs-card__match { font-size: 16px; }
.cbs-card:hover .cbs-card__match { text-decoration: none; }

.cbs-card__market {
  margin-top: 6px;
  font-size: 15px;
  opacity: 0.75;
}

.cbs-card__odds {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  display: inline-block;
  padding: 6px 16px;
  background: var(--cb-accent);
  color: #10230a;
  font-weight: 700;
  border-radius: 999px;
}

.cbs-card__footer { padding: 10px 2px 0; }
.cbs-card__title {
  display: block;
  color: var(--color-text-primary, #122527);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}
.cbs-card__title:hover { text-decoration: underline; }
.cbs-card__sponsor {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--color-text-secondary, #5c686a);
}

/* Listevisning af overståede spilforslag - kun på kategori-siderne. */
.cbs-past { margin-top: 24px; }
.cbs-past__heading { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.cbs-past__list { list-style: none; margin: 0; padding: 0; }
.cbs-past__row {
  border-bottom: 1px solid var(--color-border-subtle, #ebeeee);
}
.cbs-past__row:last-child { border-bottom: none; }
.cbs-past__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 4px;
  text-decoration: none;
  color: inherit;
}
.cbs-past__match { font-weight: 600; color: var(--color-text-primary, #122527); }
.cbs-past__date { font-size: 13px; color: var(--color-text-secondary, #5c686a); white-space: nowrap; }
