/* Klaro CMP theme overrides (adapted from lii.de), in the site's palette
 * (site/assets/css/site.css tokens; docs/design.md).
 *
 * Equal options (DSK Orientierungshilfe Telemedien, § 25 TDDDG): "Reject"
 * and "Accept all" look the same. Every choice button in the banner and in
 * the settings dialog (Reject, Accept all, Save selection, Reject all) has
 * the same colour, weight, border and size; in the banner the two buttons
 * share one row at equal width. White on Klaro's dark panel (#333): button
 * text #181b31 on #fff is 17:1, the button against the panel 12.6:1.
 * Brand red (#e20020) stays on the toggles only.
 *
 * Links on the dark panel use #ffb3bd (7.5:1 on #333; the brand red was
 * 2.56:1) and are underlined so they don't rely on colour alone. */
.klaro {
  --font-family: "Open Sans", "Open Sans Fallback", sans-serif;
  --title-font-family: "Jost", "Jost Fallback", sans-serif;

  /* Toggles (switch.scss) */
  --green1: #e20020;
  --green2: #c4001c;
  --green3: rgba(226, 0, 32, 0.35);

  --blue1: #181b31;
  --blue2: #060221;

  --button-text-color: #181b31;
  --border-radius: 0;
}

.klaro .cookie-notice,
.klaro .cookie-modal {
  z-index: 10000;
}

/* ---- links ---------------------------------------------------------- */
.klaro .cookie-notice a,
.klaro .cookie-modal a,
.klaro .cookie-modal .cm-modal .cm-body a,
.klaro .cookie-modal .cm-modal .cm-header a {
  color: #ffb3bd;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.klaro .cookie-notice a:hover,
.klaro .cookie-modal a:hover {
  color: #fff;
}

/* ---- buttons: one look for every choice ----------------------------- */
.klaro .cookie-notice .cm-btn,
.klaro .cookie-modal .cm-btn,
.klaro .cookie-notice .cm-btn.cm-btn-success,
.klaro .cookie-modal .cm-btn.cm-btn-success,
.klaro .cookie-modal .cm-btn.cm-btn-info,
.klaro .cookie-notice .cm-btn.cm-btn-danger,
.klaro .cookie-modal .cm-btn.cm-btn-danger {
  background-color: #fff;
  color: #181b31;
  border: 2px solid #fff;
  font-weight: 600;
  font-size: 1em;
  line-height: 1.2;
  min-height: 44px;
  padding: 0.6em 1em;
  margin: 0;
  text-align: center;
}

.klaro .cookie-notice .cm-btn:hover,
.klaro .cookie-modal .cm-btn:hover {
  background-color: #e8e8ee;
  border-color: #e8e8ee;
}

.klaro .cookie-notice .cm-btn:focus-visible,
.klaro .cookie-modal .cm-btn:focus-visible,
.klaro .cookie-notice a:focus-visible,
.klaro .cookie-modal a:focus-visible,
.klaro .cookie-modal .hide:focus-visible {
  outline: 3px solid #ffb3bd;
  outline-offset: 2px;
}

/* Switches: the checkbox is invisible (opacity 0) and Klaro's own focus
   state is a faint grey shadow, so a keyboard user could not see which
   switch had focus. Same ring as the buttons (Proposal F, WCAG 2.4.7). */
.klaro .cookie-modal .cm-list-input:focus-visible + .cm-list-label .slider,
.klaro .cookie-notice .cm-list-input:focus-visible + .cm-list-label .slider {
  outline: 3px solid #ffb3bd;
  outline-offset: 2px;
}

/* Purpose descriptions in the settings: Klaro's #7c7c7c is 3.0:1 on the
   #333 panel; #a0a0a0 (Klaro's own grey for the service details) 4.8:1. */
.klaro .cookie-modal .cm-list-description,
.klaro .cookie-notice .cm-list-description {
  color: #a0a0a0;
}

/* Banner: Reject and Accept all side by side, same width. */
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-ok {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75em;
  margin-top: 0.5em;
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons {
  display: flex;
  gap: 0.5em;
  width: 100%;
  margin-top: 0;
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons button.cm-btn {
  flex: 1 1 0;
  width: auto;
  margin: 0;
}

.klaro .cookie-notice .cn-body h2 {
  font-size: 1.15em;
  margin-top: 1em;
}

/* Settings dialog: all choice buttons the same width. */
.klaro .cookie-modal .cm-modal .cm-footer-buttons {
  flex-wrap: wrap;
  gap: 0.5em;
}

.klaro .cookie-modal .cm-modal .cm-footer-buttons .cm-btn {
  flex: 1 1 0;
  min-width: 9em;
}
