/* Alzam – cookie banner, cookie settings dialog and live chat launcher (assets/js/consent.js).
   Shared by the main site and Sports Data; .cc--sports switches to the Sports Data colours.
   "Accept all" and "Reject all" always share one style: neither choice may look more inviting. */

.cc {
  --cc-surface: #FFFFFF;
  --cc-ink: #15163A;
  --cc-text: #474964;
  --cc-line: #DCDCE8;
  --cc-soft: #E7E4F8;
  --cc-link: #5446C9;
  --cc-btn: #5446C9;          /* white on it ≈ 7:1 */
  --cc-btn-hover: #4135A8;
  --cc-quiet-border: #8A8CA5; /* ≈ 3.3:1 on white */
  --cc-launcher: #5446C9;
  --cc-launcher-hover: #4135A8;
  --cc-focus: #5446C9;
  --cc-switch-off: #767890;   /* ≈ 4.4:1 on white */
  --cc-radius: 14px;
  --cc-btn-radius: 8px;
  --cc-shadow: 0 22px 48px -20px rgba(21, 22, 58, .38), 0 2px 8px rgba(21, 22, 58, .08);
  color: var(--cc-text);
  font-family: inherit;
  font-size: .9375rem;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
}
.cc--sports {
  --cc-ink: #001726;
  --cc-text: #5E6470;
  --cc-line: #E6E6E6;
  --cc-soft: #FDE8EE;
  --cc-link: #D1104A;         /* 5.4:1 on white */
  --cc-btn: #001726;
  --cc-btn-hover: #1F2A37;
  --cc-quiet-border: #868E99;
  --cc-launcher: #E0124F;     /* white on it 4.8:1 */
  --cc-launcher-hover: #B80D40;
  --cc-focus: #001726;
  --cc-switch-off: #6B7280;
  --cc-btn-radius: 5px;
}
.cc[hidden], .cc [hidden] { display: none !important; }
.cc *, .cc *::before, .cc *::after { box-sizing: border-box; }
.cc p { margin: 0; }
.cc h2, .cc h3 { margin: 0; color: var(--cc-ink); font-family: inherit; letter-spacing: -0.01em; text-wrap: balance; }
.cc a { color: var(--cc-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.cc a:hover { color: var(--cc-ink); }
.cc :focus-visible { outline: 3px solid var(--cc-focus); outline-offset: 2px; border-radius: 4px; }
.cc img, .cc svg { display: block; max-width: none; }
.cc-sr {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.cc .cc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; margin: 0; padding: 10px 8px;
  border: 1.5px solid transparent; border-radius: var(--cc-btn-radius);
  font-family: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.2; letter-spacing: normal;
  text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.cc .cc-btn--choice { background: var(--cc-btn); border-color: var(--cc-btn); color: #FFFFFF; }
.cc .cc-btn--choice:hover { background: var(--cc-btn-hover); border-color: var(--cc-btn-hover); color: #FFFFFF; }
.cc .cc-btn--quiet { background: var(--cc-surface); border-color: var(--cc-quiet-border); color: var(--cc-ink); }
.cc .cc-btn--quiet:hover { border-color: var(--cc-ink); color: var(--cc-ink); }
.cc-actions { display: grid; gap: 8px; }
.cc-actions--row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cc-actions--stack { grid-template-columns: 1fr; }

.cc-x {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; margin: 0; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--cc-ink); cursor: pointer;
}
.cc-x:hover { background: var(--cc-soft); }
.cc-x--small { width: 32px; height: 32px; }
.cc-x--small svg { width: 18px; height: 18px; }

/* ---------- First layer: banner (a bar along the bottom; the chat launcher stacks above it) ---------- */
.cc-banner {
  position: fixed; z-index: 45; left: 24px; right: 24px; bottom: 24px;
  max-height: calc(100vh - 48px); overflow: auto;
  padding: 16px 16px 16px 24px;
  background: var(--cc-surface);
  border: 1px solid var(--cc-line); border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
}
.cc-banner-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; max-width: 1200px; margin: 0 auto; }
.cc-banner-text { max-width: 54rem; }
.cc-title { color: var(--cc-ink); font-weight: 700; }
.cc-banner .cc-actions { grid-template-columns: repeat(3, auto); }
.cc-banner .cc-btn { padding-inline: 20px; }

/* Narrow screens: an edge-to-edge sheet. */
@media (max-width: 899px) {
  .cc-banner {
    left: 0; right: 0; bottom: 0; max-height: 70vh;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-width: 1px 0 0; border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 32px -16px rgba(21, 22, 58, .3);
  }
  .cc-banner-inner { max-width: 760px; }
}
@media (max-width: 719px) {
  .cc-banner-inner { grid-template-columns: 1fr; gap: 14px; }
  .cc-banner .cc-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cc-banner .cc-btn { padding-inline: 8px; }
}
@media (max-width: 380px) {
  .cc .cc-btn { font-size: .875rem; padding-inline: 6px; }
}
/* Keeps the end of every page reachable while the banner is open. */
.cc-banner-open body { padding-bottom: var(--cc-banner-space, 0px); }

/* ---------- Second layer: cookie settings ---------- */
.cc-dialog {
  width: min(560px, calc(100vw - 32px));
  max-width: none; max-height: calc(100vh - 32px);
  margin: auto; padding: 0;
  border: 0; border-radius: var(--cc-radius);
  background: var(--cc-surface);
  box-shadow: var(--cc-shadow);
  overflow: auto;
}
.cc-dialog::backdrop { background: rgba(18, 19, 49, .5); }
.cc-dialog--fallback { position: fixed; inset: 0; z-index: 60; }
.cc-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 14px 6px 24px; }
.cc-dialog-title { font-size: 1.375rem; font-weight: 700; line-height: 1.2; }
.cc-dialog-title:focus { outline: none; }
.cc-dialog-body { display: grid; gap: 12px; padding: 0 24px 24px; }
.cc-cat { padding: 14px 16px; border: 1px solid var(--cc-line); border-radius: 10px; display: grid; gap: 6px; }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-cat-title { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.cc-cat-title label { cursor: pointer; }
.cc-always { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--cc-soft); color: var(--cc-ink); font-size: .8125rem; font-weight: 600; }
.cc-switch-wrap { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--cc-ink); font-weight: 600; font-size: .875rem; }
.cc .cc-switch {
  appearance: none; -webkit-appearance: none;
  position: relative; flex: none; width: 48px; height: 28px; margin: 0;
  border: 0; border-radius: 999px; background: var(--cc-switch-off); cursor: pointer;
}
.cc .cc-switch::before {
  content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px;
  border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.cc .cc-switch:checked { background: var(--cc-btn); }
.cc .cc-switch:checked::before { transform: translateX(20px); }
.cc .cc-switch:focus-visible { outline-offset: 3px; border-radius: 999px; }
.cc-more { font-size: .875rem; }
.cc-dialog .cc-actions { margin-top: 4px; }
@media (max-width: 420px) {
  .cc-dialog-head { padding-left: 18px; }
  .cc-dialog-body { padding: 0 18px 18px; }
  .cc-dialog .cc-actions--row { grid-template-columns: 1fr 1fr; }
  .cc-dialog .cc-actions--row .cc-btn--quiet { grid-column: 1 / -1; }
}

/* ---------- Live chat launcher, greeting and panel ---------- */
.cc-chat {
  position: fixed; z-index: 44; right: 24px; bottom: var(--cc-chat-bottom, 24px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  pointer-events: none;
}
.cc-chat > * { pointer-events: auto; }
@media (max-width: 899px) {
  .cc-chat { right: 16px; bottom: var(--cc-chat-bottom, 16px); }
}

.cc-launcher {
  display: grid; place-items: center;
  width: 60px; height: 60px; margin: 0; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--cc-launcher); color: #FFFFFF; cursor: pointer;
  box-shadow: 0 0 0 2px #FFFFFF, 0 12px 28px -10px rgba(21, 22, 58, .55);
}
.cc-launcher:hover { background: var(--cc-launcher-hover); }
.cc .cc-launcher:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; border-radius: 50%; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 8px var(--cc-focus); }
.cc-launcher .cc-dot { fill: var(--cc-launcher); }
.cc-launcher:hover .cc-dot { fill: var(--cc-launcher-hover); }
.cc-launcher .cc-icon-close { display: none; }
.cc-launcher[aria-expanded="true"] .cc-icon-chat { display: none; }
.cc-launcher[aria-expanded="true"] .cc-icon-close { display: block; }

.cc-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #FFFFFF; border: 1px solid var(--cc-line); object-fit: cover; }

.cc-greeting {
  display: flex; align-items: flex-start;
  width: max-content; max-width: min(300px, calc(100vw - 32px));
  background: var(--cc-surface);
  border: 1px solid var(--cc-line); border-radius: 16px 16px 4px 16px;
  box-shadow: var(--cc-shadow);
}
.cc-greeting-open {
  display: flex; align-items: flex-start; gap: 12px; min-width: 0;
  margin: 0; padding: 14px 4px 14px 14px;
  border: 0; border-radius: 16px 0 0 4px; background: transparent;
  color: var(--cc-text); font: inherit; text-align: left; cursor: pointer;
}
.cc-greeting-open:hover .cc-greeting-text { color: var(--cc-ink); }
.cc-greeting-name { display: block; color: var(--cc-ink); font-weight: 700; font-size: .875rem; line-height: 1.3; margin-bottom: 2px; }
.cc-greeting .cc-x { margin: 6px 6px 0 0; }

.cc-panel {
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 100px - var(--cc-chat-bottom, 24px)); overflow: auto;
  background: var(--cc-surface);
  border: 1px solid var(--cc-line); border-radius: 16px;
  box-shadow: var(--cc-shadow);
}
.cc-panel-head { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px; border-bottom: 1px solid var(--cc-line); }
.cc-panel-title { flex: 1; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.cc-panel-title:focus { outline: none; }
.cc-panel-body { display: grid; gap: 14px; padding: 16px; }
.cc-panel-status:empty { display: none; }
.cc-panel-status { color: var(--cc-ink); font-weight: 500; }
.cc-panel-body:not([data-state="ask"]) .cc-panel-start { display: none; }

/* Footer and privacy-page links that open the settings become buttons that still look like links. */
.cc-linkbtn {
  display: inline; margin: 0; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer;
}
.site-footer .cc-linkbtn:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
.prose .cc-linkbtn { color: #5446C9; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose .cc-linkbtn:hover { color: #4135A8; }
[data-cc-focus]:focus { outline: none; }
/* The chat bubble (ours or tawk.to's) sits over the bottom-right corner: keep the last footer links clear of it. */
@media (max-width: 1399px) { .cc-on .site-footer { padding-bottom: 84px; } }

@media (prefers-reduced-motion: no-preference) {
  .cc .cc-btn, .cc-x, .cc-launcher { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
  .cc .cc-switch, .cc .cc-switch::before { transition: background-color .15s ease, transform .15s ease; }
  .cc-banner, .cc-greeting:not([hidden]), .cc-panel:not([hidden]) { animation: cc-rise .28s ease-out both; }
  .cc-launcher { animation: cc-pop .3s ease-out both; }
}
@keyframes cc-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes cc-pop { from { opacity: 0; transform: scale(.85); } }

@media (forced-colors: active) {
  .cc .cc-switch { border: 1px solid CanvasText; }
  .cc .cc-switch:checked::before { background: Highlight; }
  .cc-launcher { border: 2px solid ButtonText; }
}
@media print { .cc { display: none !important; } }
