/*
 * Cookie consent banner, Cookie Preferences panel and footer link.
 * Values follow the Paper design ("Finergic · Cookie banner / preferences").
 */

.cc-banner,
.cc-dialog {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: left;
  box-sizing: border-box;
}

.cc-banner *,
.cc-dialog * {
  box-sizing: border-box;
}

/* ---------- banner ---------- */

.cc-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10001; /* above the fixed announcement bar (10000) */
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 28px 32px;
  background: #fff;
  border: 1px solid #dfe7f5;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(1, 45, 122, 0.14);
}

/* Enter: a short rise with a tiny overshoot. Exit: a quick sink and fade.
   `translate` is used (not `transform`) so it stacks with the centring
   transform above. Reduced motion gets a plain fade, see below. */
.cc-banner {
  animation: cc-banner-in 420ms cubic-bezier(0.34, 1.4, 0.64, 1) 250ms both;
}

.cc-banner.cc-banner--leaving {
  animation: cc-banner-out 380ms ease-in-out both;
  transform-origin: 50% 100%;
  pointer-events: none;
}

@keyframes cc-banner-in {
  from { opacity: 0; translate: 0 16px; }
  to   { opacity: 1; translate: 0 0; }
}

/* A little hop up, then it slips away downwards. */
@keyframes cc-banner-out {
  0%   { opacity: 1; translate: 0 0;     scale: 1; }
  30%  { opacity: 1; translate: 0 -6px;  scale: 1.01; }
  100% { opacity: 0; translate: 0 32px;  scale: 0.96; }
}

.cc-banner__text {
  flex: 1 1 0%;
  min-width: 0;
  margin: 0;
  color: #3a4a6b;
  font-size: 15px;
  line-height: 24px;
  font-weight: 400;
}

.cc-banner__text a {
  color: #0061ff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-position: from-font;
}

.cc-banner__text a:hover {
  color: #012d7a;
}

.cc-banner__text a:focus-visible {
  outline: 2px solid #0061ff;
  outline-offset: 2px;
  border-radius: 2px;
}

.cc-banner__actions {
  flex: 0 0 232px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- buttons ---------- */

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 15px 24px;
  border: 1px solid #012d7a;
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cc-btn--solid {
  background-color: #012d7a;
  color: #fff;
}

.cc-btn--solid:hover {
  background-color: #0061ff;
  border-color: #0061ff;
}

.cc-btn--outline {
  background-color: #fff;
  color: #012d7a;
}

.cc-btn--outline:hover {
  border-color: #0061ff;
  color: #0061ff;
}

.cc-btn:focus-visible,
.cc-dialog__close:focus-visible {
  outline: 2px solid #0061ff;
  outline-offset: 2px;
}

/* ---------- preferences panel ---------- */

html.cc-dialog-open {
  overflow: hidden;
  scrollbar-gutter: stable; /* keep the page from shifting when the scrollbar hides */
}

.cc-dialog {
  width: 560px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: #012d7a;
  background: #fff;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(1, 22, 61, 0.28);
}

.cc-dialog::backdrop {
  background: rgba(1, 22, 61, 0.55);
}

.cc-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px 20px;
}

.cc-dialog__title {
  margin: 0;
  color: #012d7a;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.01em;
}

.cc-dialog__close {
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  color: #012d7a;
  background: #f3f8ff;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.2s ease;
}

.cc-dialog__close:hover {
  background: #e3eeff;
}

.cc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  border-top: 1px solid #e6edf8;
}

.cc-row__label {
  display: block;
  margin: 0;
  color: #012d7a;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  cursor: pointer;
}

.cc-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px 32px 28px;
  border-top: 1px solid #e6edf8;
}

.cc-dialog__actions .cc-btn {
  padding-left: 28px;
  padding-right: 28px;
}

/* ---------- switch ---------- */

.cc-switch {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 28px;
}

.cc-switch__input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cc-switch__track {
  display: flex;
  align-items: center;
  width: 48px;
  height: 28px;
  padding: 3px;
  background: #c9d3e3;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.cc-switch__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(1, 22, 61, 0.2);
  transition: transform 0.2s ease;
}

.cc-switch__input:checked + .cc-switch__track {
  background: #0061ff;
}

.cc-switch__input:checked + .cc-switch__track .cc-switch__thumb {
  transform: translateX(20px);
}

.cc-switch__input:focus-visible + .cc-switch__track {
  outline: 2px solid #0061ff;
  outline-offset: 2px;
}

.cc-switch--locked .cc-switch__input {
  cursor: not-allowed;
}

.cc-switch--locked .cc-switch__input:checked + .cc-switch__track {
  background: #9dbcf0;
}

.cc-switch--locked .cc-switch__thumb {
  color: #6f8fc7;
  box-shadow: none;
}

.cc-row__label[for="cc-necessary"] {
  cursor: default;
}

/* ---------- mobile ---------- */

@media screen and (max-width: 767px) {
  .cc-banner {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-height: calc(100vh - 16px);
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 24px 16px 34px;
    border: 0;
    border-top: 1px solid #dfe7f5;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -12px 40px rgba(1, 45, 122, 0.16);
  }

  .cc-banner__text {
    flex: none;
    font-size: 14px;
    line-height: 22px;
  }

  .cc-banner__actions {
    flex: none;
    gap: 10px;
  }

  .cc-dialog__header {
    padding: 20px 16px 16px 20px;
  }

  .cc-dialog__title {
    font-size: 22px;
    line-height: 28px;
  }

  .cc-row {
    padding: 18px 20px;
  }

  .cc-dialog__actions {
    flex-direction: column;
    gap: 10px;
    padding: 20px;
  }

  .cc-dialog__actions .cc-btn {
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }
}

@keyframes cc-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes cc-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner {
    animation: cc-fade-in 150ms linear both;
  }

  .cc-banner.cc-banner--leaving {
    animation: cc-fade-out 150ms linear both;
  }

  .cc-btn,
  .cc-dialog__close,
  .cc-switch__track,
  .cc-switch__thumb {
    transition: none;
  }
}

@media print {
  .cc-banner {
    display: none;
  }
}

/* ---------- footer "Cookie Preferences" link ---------- */

.footer-legal-link.footer-legal-button {
  display: inline;
  margin: 0;
  padding: 0;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: #a3a3a3;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
}

.footer-legal-link.footer-legal-button:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-legal-link.footer-legal-button:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 2px;
}

/* Small phones: the legal line no longer fits on one line, so put the
   copyright on its own line instead of leaving a dangling "|". */
@media screen and (max-width: 479px) {
  .text-block-77 > .footer-legal-sep:first-of-type {
    display: block;
    height: 0;
    margin: 0;
    overflow: hidden;
    visibility: hidden;
  }
}
