/*
 * Easy IP TV: cookie banner theme on top of the vendor stylesheet.
 *
 * The vendor CSS loads first and uses the same selectors, so every override
 * starts with `html` to win on specificity. Colours come from globals.css
 * variables, which already switch for dark mode, so the banner follows the
 * site theme without its own media query.
 *
 * Contrast: the vendor paints button TEXT with --backgroundColor on a
 * --primaryColor surface. Light: white on #0066cc (5.6:1). Dark: #0a0a0a on
 * #3b82f6 (5.7:1). Both pass WCAG AA.
 */
html #stcm-wrapper {
  /* Above the site header; the consent dialog is the visitor's only way to control tracking */
  z-index: 2147483000;
  --fontFamily: inherit;
  --backgroundColor: var(--background, #ffffff);
  --textColor: var(--foreground, #171717);
  --primaryColor: var(--primary, #0066cc);
  --backdropBackgroundColor: rgba(0, 0, 0, 0.45);
  --iconColor: var(--background, #ffffff);
  --iconBackgroundColor: var(--primary, #0066cc);
}

/* The banner uses the page background, so in dark mode its shadow is invisible
   and the card has no edge. A border from the site's own token gives it one. */
html #stcm-wrapper #stcm-banner,
html #stcm-wrapper #stcm-modal {
  border: 1px solid var(--border, #e5e5e5);
}

/* Accept and reject are both .stcm-button-primary in the vendor CSS, i.e.
   equally prominent. Keep it that way: muting the reject button is a dark
   pattern and consent obtained that way is not valid. */
html #stcm-wrapper .stcm-button {
  white-space: nowrap;
}

/* Buttons stay on one line each, but the row wraps when a language's labels
   do not fit side by side (16 languages, very different lengths). */
html #stcm-wrapper #stcm-banner .stcm-actions {
  flex-wrap: wrap;
}

html #stcm-wrapper .stcm-preferences-button {
  color: var(--foreground, #171717);
  text-decoration: underline;
}

html #stcm-wrapper .stcm-modal-close {
  color: var(--foreground, #171717);
}
html #stcm-wrapper .stcm-modal-close svg path {
  fill: var(--foreground, #171717);
}

/* No third-party promotion inside our own consent banner */
html #stcm-wrapper .stcm-credit-link,
html #stcm-wrapper .stcm-logo {
  display: none !important;
}
