/*
 * EDGE styling and accessibility fixes for the CookieYes banner, shared by
 * every page. CookieYes's free tier can't change colours, so they're
 * overridden here. If CookieYes renames these classes, the banner falls back
 * to its default blue: nothing breaks, but re-check after CookieYes updates.
 */

/* Brand colours (match the --primary-teal / --off-white tokens in index.html) */
.cky-consent-container,
.cky-modal {
  --edge-teal: #084C4F;
  --edge-off-white: #F7F4EF;
}

/* Accept, Reject and Save share one style on purpose: regulators treat a less
   prominent Reject button as steering visitors toward Accept. */
.cky-btn.cky-btn-accept,
.cky-btn.cky-btn-reject,
.cky-btn.cky-btn-preferences {
  background: var(--edge-teal) !important;
  border-color: var(--edge-teal) !important;
  color: var(--edge-off-white) !important;
}

.cky-btn.cky-btn-customize {
  background: transparent !important;
  border-color: var(--edge-teal) !important;
  color: var(--edge-teal) !important;
}

/* Policy links in the notice */
.cky-notice-des a.cky-policy,
.cky-notice-des a {
  color: var(--edge-teal) !important;
  text-decoration: underline !important;
}

/* "On" switch */
.cky-switch input[type="checkbox"]:checked {
  background: var(--edge-teal) !important;
}

/* Keyboard focus ring for the buttons, in brand teal */
.cky-btn:focus-visible {
  outline: 2px solid var(--edge-teal) !important;
  outline-offset: 2px !important;
}

/* "Off" switch: CookieYes's #D0D5D2 is ~1.5:1 on white; WCAG 1.4.11 needs 3:1
   for controls. #6F7A77 is ~4.4:1 on white and against the white knob. */
.cky-switch input[type="checkbox"]:not(:checked) {
  background: #6F7A77 !important;
}

/* CookieYes sets outline: 0 on the switches, hiding keyboard focus (WCAG 2.4.7). */
.cky-switch input[type="checkbox"]:focus-visible {
  outline: 2px solid #084C4F !important;
  outline-offset: 2px !important;
}
