/* Cookie banner — markup built by static/js/cookie-consent.js.

   Both buttons share one style: refusing must look as easy as agreeing.
   Outline in the main text color rather than a filled --color-primary
   button, because white on #0085a1 is about 4.3:1 and fails WCAG AA. */

.gt-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040; /* above Bootstrap's fixed navbar (1030) */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75em 1.5em;
  padding: 14px 16px;
  background: var(--color-bg);
  color: var(--color-text-main);
  border-top: 1px solid var(--color-border-dark);
  box-shadow: 0 -2px 10px var(--shadow-color);
  font-size: 15px;
  line-height: 1.5;
}

.gt-consent[hidden] {
  display: none;
}

.gt-consent__text {
  margin: 0;
  max-width: 640px;
}

.gt-consent__text a {
  color: var(--color-text-main);
  text-decoration: underline;
}

.gt-consent__actions {
  display: flex;
  gap: 0.75em;
}

.gt-consent__btn {
  min-width: 96px;
  padding: 6px 16px;
  border: 1px solid var(--color-text-main);
  border-radius: 4px;
  background: transparent;
  color: var(--color-text-main);
  font: inherit;
  cursor: pointer;
}

.gt-consent__btn:hover,
.gt-consent__btn:focus-visible {
  background: var(--color-text-main);
  color: var(--color-bg);
}

/* theme-variables.css paints every <button> solid #4f8cff with white text in
   dark mode, with !important — white on it is about 3.3:1, and it would turn
   the "Cookie settings" links into blue blocks. Only !important beats it. */
[data-theme="dark"] .gt-consent__btn {
  background: transparent !important;
  border-color: var(--color-text-main) !important;
  color: var(--color-text-main) !important;
}

[data-theme="dark"] .gt-consent__btn:hover,
[data-theme="dark"] .gt-consent__btn:focus-visible {
  background: var(--color-text-main) !important;
  color: var(--color-bg) !important;
}

[data-theme="dark"] .gt-consent-open {
  background: none !important;
  border: 0 !important;
  color: var(--copyright-link) !important;
}

/* "Cookie settings": a button that reads like the footer links beside it
   (hugo-theme-cleanwhite.css, footer .copyright a). */
.gt-consent-open {
  padding: 0;
  border: 0;
  background: none;
  color: var(--copyright-link);
  font: inherit;
  cursor: pointer;
}

.gt-consent-open:hover,
.gt-consent-open:focus-visible {
  text-decoration: underline;
}
