/*
 * CookieYes banner in Better Backgammon's type and colours. Linked by the
 * homepage (components/marketing/CookieConsent.tsx) and the static pages in
 * public/. The banner renders into the page's own DOM, so these rules apply on
 * any CookieYes plan. `.cky-consent-container` is the documented root
 * (https://www.cookieyes.com/documentation/how-to-change-banner-font/); the
 * other class names come from CookieYes's markup, are undocumented and may
 * change. CookieYes injects its own <style id="cky-style"> after this file,
 * with selectors of the same specificity, so overrides need !important.
 * Set the banner's colours in the CookieYes dashboard too, so it still looks
 * right if a selector here stops matching.
 *
 * Fonts: only Tiempos Headline (weight 500) is served, from site-pages.css and
 * app/globals.css. The UI stack below is the one the pages already use; it
 * names no other web font, so the banner requests no font files.
 */
.cky-consent-container,
.cky-modal,
.cky-preference-center {
  --cookie-ink: var(--ios-ink, #f5eddf);
  --cookie-ink-muted: var(--ios-ink-70, #f5eddfb3);
  --cookie-paper: var(--ios-surface-stat, #131313);
  --cookie-line: var(--ios-ink-16, #f5eddf29);
  --cookie-accent: var(--ios-accent, #9fef3e);
  --cookie-on-accent: var(--ios-canvas, #000000);
  --cookie-sans: var(--ios-font-ui), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cookie-display: var(--ios-font-display), Georgia, serif;
  font-family: var(--cookie-sans);
}

/* Every CookieYes element, including ones rendered outside the containers
   (revisit button, overlay), so none falls back to CookieYes's own font. */
[class^="cky-"],
[class*=" cky-"] {
  font-family: var(--ios-font-ui), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.cky-consent-container .cky-consent-bar,
.cky-preference-center {
  background: var(--cookie-paper) !important;
  border: 1px solid var(--cookie-line) !important;
  border-radius: var(--ios-radius-control, 11px) !important;
  color: var(--cookie-ink) !important;
}

.cky-consent-container .cky-notice-des,
.cky-consent-container .cky-notice-des p,
.cky-preference-center .cky-preference-content-wrapper,
.cky-preference-center .cky-preference-content-wrapper p,
.cky-preference-center .cky-accordion-header-des,
.cky-preference-center .cky-accordion-header-des p {
  color: var(--cookie-ink-muted) !important;
}

.cky-consent-container .cky-notice-des a,
.cky-preference-center .cky-preference-content-wrapper a {
  color: var(--cookie-accent) !important;
}

/* Tiempos is served at weight 500 only; CookieYes sets 700, which would make
   the browser fake a bold. */
.cky-consent-container .cky-title,
.cky-preference-center .cky-preference-title {
  font-family: var(--cookie-display) !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em;
  color: var(--cookie-ink) !important;
}

.cky-preference-center .cky-accordion-btn,
.cky-preference-center .cky-accordion-header .cky-accordion-btn {
  color: var(--cookie-ink) !important;
}

.cky-preference-center .cky-accordion {
  border-color: var(--cookie-line) !important;
}

.cky-consent-container .cky-btn,
.cky-preference-center .cky-btn {
  font-family: var(--cookie-sans) !important;
  font-weight: 600 !important;
  border-radius: var(--ios-radius-pill, 999px) !important;
  border-color: var(--cookie-ink) !important;
}

.cky-consent-container .cky-btn-accept,
.cky-preference-center .cky-btn-accept {
  background: var(--cookie-accent) !important;
  border-color: var(--cookie-accent) !important;
  color: var(--cookie-on-accent) !important;
}

.cky-consent-container .cky-btn-reject,
.cky-consent-container .cky-btn-customize,
.cky-preference-center .cky-btn-reject,
.cky-preference-center .cky-btn-preferences {
  background: transparent !important;
  color: var(--cookie-ink) !important;
}

/* CookieYes defaults: green "Always Active", blue "Show more", a close icon
   drawn dark, and a white fade above the preference centre's buttons. */
.cky-preference-center .cky-always-active,
.cky-preference-center .cky-show-desc-btn {
  color: var(--cookie-accent) !important;
}

.cky-preference-center .cky-btn-close img {
  filter: invert(1);
}

.cky-preference-center .cky-preference-header,
.cky-preference-center .cky-footer-wrapper {
  border-color: var(--cookie-line) !important;
}

.cky-preference-center .cky-footer-shadow {
  background: linear-gradient(180deg, transparent 0%, var(--cookie-paper) 100%) !important;
}

.cky-preference-center .cky-footer-wrapper,
.cky-preference-center .cky-prefrence-btn-wrapper {
  background: var(--cookie-paper) !important;
}

/* The footer's "Cookie Settings" control looks like the links beside it. */
.cookie-settings-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s;
}

.cookie-settings-link:hover {
  color: var(--ios-ink, #f5eddf);
}

.cookie-settings-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--ios-accent, #9fef3e);
  outline-offset: 4px;
}

/* The static pages style their footer links on `a`, so match them here:
   size and colour from privacy.html / terms.html, spacing from support.html,
   font and accent hover from site-pages.css. */
.footer-links .cookie-settings-link {
  color: var(--ios-ink-70, #f5eddfb3);
  font-family: var(--ios-font-ui), -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
}

footer div.footer-links .cookie-settings-link {
  margin: 0 12px;
}

.footer-links .cookie-settings-link:hover {
  color: var(--ios-accent, #9fef3e);
}
