/* Grizzly Beam — cookie consent banner and panel.
   Logic lives in: /assets/js/consent.js — a 1:1 replica of CookieYes 3.5.5.
   The banner stays until the visitor responds; after that a tab
   "Manage consent" remains bottom left, as in the plugin.
   To show it again for testing: gbConsent.reset() in the console. */

.ck {
  position: fixed; z-index: 200;
  font-family: var(--f-body);
}

/* ---------- banner ---------- */
.ck--bar {
  left: 1.6rem; right: 1.6rem; bottom: 1.6rem;
  display: flex; justify-content: flex-start;
}
/* The background is --ink, not --navy: the banner often appears over a navy hero
   and in the same color it would blend into it. The hairline border gives it an edge on both
   dark and light pages. */
.ck--bar .ck__box {
  background: var(--ink); color: var(--tx-l);
  border: 1px solid rgba(236, 232, 225, 0.14);
  border-radius: var(--r-14); box-shadow: var(--el-lg);
  padding: 2.4rem 2.6rem;
  max-width: 40rem;
}

/* ---------- panel ---------- */
/* While the panel is open, the page behind it stays still. Without this the wheel over the panel
   scrolls the site: Lenis captures wheel on the whole window. The class is added by consent.js,
   which also stops Lenis along with it — the same pair as body.bkg-open in booking.css. */
body.ck-open { overflow: hidden; }

.ck--panel {
  inset: 0; display: grid; place-items: center;
  background: rgba(18, 19, 23, 0.55);
  padding: 1.6rem;
}
.ck__box--panel {
  background: var(--ink); color: var(--tx-l);
  border: 1px solid rgba(236, 232, 225, 0.14);
  border-radius: var(--r-14); box-shadow: var(--el-lg);
  padding: 2.6rem;
  width: 100%; max-width: 44rem;
  max-height: calc(100vh - 3.2rem); overflow-y: auto;
  /* When the end of the list is reached, scrolling does not carry over to the page below. */
  overscroll-behavior: contain;
}

/* ---------- text ---------- */
.ck__title {
  font-family: var(--f-disp); font-weight: var(--w-h3);
  font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.004em;
}
.ck__body {
  font-size: 1.2rem; line-height: 1.5;
  color: rgba(236, 232, 225, 0.82); margin-top: 0.9rem;
}
.ck__more {
  display: inline-block; margin-top: 1rem;
  font-size: 1.14rem; color: var(--tx-l);
  text-decoration: underline; text-underline-offset: 0.22em;
  text-decoration-color: var(--amber);
}
.ck__more:hover { color: var(--amber); }
.ck__gpc {
  font-family: var(--f-mono); font-size: 0.95rem; line-height: 1.45;
  color: var(--amber); margin-bottom: 1rem;
  padding-left: 0.9rem; border-left: 2px solid var(--amber);
}

/* ---------- buttons ----------
   Accept and reject share the same shape, the same size and the same row.
   Never make reject quieter than accept. */
.ck__acts { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; align-items: center; }
.ck__btn {
  font-family: var(--f-disp); font-size: 1.14rem; font-weight: var(--w-h3);
  border: 1px solid transparent; border-radius: var(--r-10);
  padding: 0.85rem 1.6rem; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.ck__btn--primary { background: var(--tx-l); color: var(--ink); }
.ck__btn--primary:hover { background: var(--white); }
.ck__btn--quiet {
  background: transparent; color: var(--tx-l);
  border-color: rgba(236, 232, 225, 0.4);
}
.ck__btn--quiet:hover { border-color: var(--tx-l); }
.ck__btn:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--ink);
}

/* ---------- categories ---------- */
.ck__cats { list-style: none; margin-top: 1.8rem; }
.ck__cat {
  padding-block: 1.4rem;
  border-top: 1px solid rgba(236, 232, 225, 0.16);
}
.ck__cat-head { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; }
.ck__cat-name {
  font-family: var(--f-disp); font-size: 1.22rem; font-weight: var(--w-h3);
  cursor: pointer;
  background: none; border: 0; padding: 0; color: inherit; text-align: left;
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-right: auto;
}
/* The arrow signals that the item expands, independently of color. */
.ck__cat-name::after {
  content: ''; flex: none;
  width: 0.5rem; height: 0.5rem;
  border-right: 1.5px solid rgba(236, 232, 225, 0.55);
  border-bottom: 1.5px solid rgba(236, 232, 225, 0.55);
  transform: rotate(45deg) translate(-0.1rem, -0.1rem);
  transition: transform 0.2s ease;
}
.ck__cat.is-open > .ck__cat-head .ck__cat-name::after {
  transform: rotate(-135deg) translate(-0.05rem, -0.05rem);
}
.ck__cat-name:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 3px;
}
.ck__cat-pane { padding-top: 0.2rem; }
.ck__cat-desc {
  font-size: 1.1rem; line-height: 1.45;
  color: rgba(236, 232, 225, 0.68); margin-top: 0.5rem; max-width: 34rem;
}
.ck__tools {
  list-style: none; margin-top: 0.7rem;
  font-family: var(--f-mono); font-size: 0.95rem; line-height: 1.6;
  color: rgba(236, 232, 225, 0.6);
}
.ck__always {
  flex: none;
  font-family: var(--f-mono); font-size: 0.9rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(236, 232, 225, 0.55);
}

/* ---------- toggle ----------
   State is not conveyed by color alone: the knob moves and changes position,
   and the input is a real checkbox, so screen readers announce it as such. */
.ck__switch { position: relative; flex: none; width: 3.4rem; height: 1.9rem; }
.ck__switch input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer; z-index: 1;
}
.ck__track {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(236, 232, 225, 0.18);
  border: 1px solid rgba(236, 232, 225, 0.4);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ck__track::after {
  content: ''; position: absolute; top: 50%; left: 0.24rem;
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--tx-l); transform: translateY(-50%);
  transition: transform 0.2s ease, background 0.2s ease;
}
.ck__switch input:checked + .ck__track { background: var(--amber); border-color: var(--amber); }
.ck__switch input:checked + .ck__track::after { transform: translateY(-50%) translateX(1.42rem); background: var(--ink); }
.ck__switch input:focus-visible + .ck__track {
  outline: 2px solid var(--amber); outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--ink);
}

/* ---------- banner title ----------
   The plugin banner has no visible title, only a message. The title stays in the DOM
   for aria-labelledby, but is not rendered. */
.ck__sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- "Privacy Overview" with "Show more" ---------- */
.ck__overview { margin-top: 0.2rem; }
.ck__body--clamped {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden;
}
.ck__body--clamped.is-open { display: block; overflow: visible; }
.ck__readmore {
  margin-top: 0.6rem; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--f-mono); font-size: 0.95rem; letter-spacing: 0.06em;
  color: var(--amber);
  text-decoration: underline; text-underline-offset: 0.22em;
}
.ck__readmore:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- state label next to the toggle ---------- */
.ck__state {
  flex: none;
  font-family: var(--f-mono); font-size: 0.9rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(236, 232, 225, 0.55);
}

/* ---------- "Manage consent" tab ----------
   The plugin keeps it bottom left (widget_position = 'left') and always visible
   after a decision. */
.ck-revisit {
  position: fixed; z-index: 199;
  left: 1.6rem; bottom: 1.6rem;
  background: var(--ink); color: var(--tx-l);
  border: 1px solid rgba(236, 232, 225, 0.28);
  border-radius: var(--r-10); box-shadow: var(--el-lg);
  padding: 0.7rem 1.3rem; cursor: pointer;
  font-family: var(--f-mono); font-size: 0.95rem; letter-spacing: 0.06em;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.ck-revisit:hover { border-color: var(--amber); color: var(--amber); }
.ck-revisit:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- [user_consent_state] on /cookies/ ---------- */
.ck-state__link {
  cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.22em;
  text-decoration-color: var(--amber);
}

/* ---------- footer link ---------- */
.ftr__legallink--btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ck--bar .ck__box { animation: ck-rise 0.34s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
  .ck--panel .ck__box { animation: ck-fade 0.24s ease both; }
}
@keyframes ck-rise { from { opacity: 0; transform: translateY(1.4rem); } to { opacity: 1; transform: none; } }
@keyframes ck-fade { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }

/* ---------- <=767 ---------- */
@media (max-width: 767px) {
  .ck--bar { left: 0.9rem; right: 0.9rem; bottom: 0.9rem; }
  .ck--bar .ck__box { max-width: none; padding: 2rem 1.8rem; }
  .ck__box--panel { padding: 2rem 1.8rem; }
  .ck__acts { gap: 0.7rem; }
  .ck__btn { flex: 1 1 auto; text-align: center; }
  .ck__cat-head { gap: 1rem; }
  .ck__state { display: none; }
  .ck-revisit { left: 0.9rem; bottom: 0.9rem; }
}
