/* Peak Evergreen cookie consent — v1
   Scoped to .pe-cc*; no global resets. Tweak the custom properties to theme. */
.pe-cc,
.pe-cc-toast {
  --pe-cc-forest: #1b3528;
  --pe-cc-forest-2: #123526;
  --pe-cc-paper: #fbf8f0;
  --pe-cc-line: #e2d9c3;
  --pe-cc-strip: #dccb9f;
  --pe-cc-ink: #1b3528;
  --pe-cc-body: #3d4a42;
  --pe-cc-green: #3f7a4b;
  --pe-cc-sage: #b9d7a1;
  --pe-cc-gold: #d9a44a;
  --pe-cc-track: #cfc6ae;
  --pe-cc-display: "Fraunces", Georgia, "Times New Roman", serif;
  --pe-cc-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pe-cc-z: 2147483000;
}

.pe-cc {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: var(--pe-cc-z);
  width: min(384px, calc(100vw - 24px));
  font-family: var(--pe-cc-sans);
  color: var(--pe-cc-body);
  opacity: 0;
  transform: translateY(24px) rotate(-1.2deg);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.15);
  pointer-events: none;
  view-transition-name: pe-cc;
}
/* The hidden attribute uses !important in the browser. This wins so a pending question is in the first paint. */
html[data-pe-cc="pending"] .pe-cc[hidden] {
  display: block !important;
}
.pe-cc[hidden] { display: none; }
.pe-cc.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(-1.2deg);
  pointer-events: auto;
}
.pe-cc.is-visible:hover,
.pe-cc.is-visible:focus-within { transform: translateY(0) rotate(0deg); }

/* Guard against the host site's global p / h2 / ul / button styles */
.pe-cc *,
.pe-cc *::before,
.pe-cc *::after { box-sizing: border-box; }
.pe-cc p,
.pe-cc h2,
.pe-cc ul,
.pe-cc li,
.pe-cc span,
.pe-cc label { max-width: none; text-transform: none; letter-spacing: normal; }
.pe-cc .pe-cc__text,
.pe-cc .pe-cc__item-text span { color: var(--pe-cc-body); }
.pe-cc .pe-cc__title { color: var(--pe-cc-ink); }
.pe-cc .pe-cc__strip span { color: var(--pe-cc-ink); }
.pe-cc button { text-transform: none; letter-spacing: normal; box-shadow: none; }

.pe-cc__card {
  background: var(--pe-cc-paper);
  border: 1px solid var(--pe-cc-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(8, 24, 16, 0.32), 0 3px 0 rgba(8, 24, 16, 0.08);
}
.pe-cc__view { padding: 20px 22px 18px; }
.pe-cc__view[hidden] { display: none; }

.pe-cc__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pe-cc__cookie { width: 58px; height: 58px; flex-shrink: 0; transform-origin: 50% 55%; }
.pe-cc.is-visible .pe-cc__cookie { animation: pe-cc-wiggle 0.9s ease 0.35s 1; }
@keyframes pe-cc-wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-10deg); }
  50% { transform: rotate(8deg); }
  75% { transform: rotate(-4deg); }
}
.pe-cc__title {
  margin: 0;
  font-family: var(--pe-cc-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--pe-cc-ink);
  outline: none;
  flex-grow: 1;
}
.pe-cc__text { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; }

.pe-cc__actions { display: flex; gap: 10px; }
.pe-cc__btn {
  flex: 1 1 0;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  font: 600 15px/1 var(--pe-cc-sans);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.pe-cc__btn:active { transform: translateY(1px); }
.pe-cc__btn--solid {
  background: var(--pe-cc-forest);
  color: var(--pe-cc-paper);
  border: 2px solid var(--pe-cc-forest);
}
.pe-cc__btn--solid:hover { background: var(--pe-cc-forest-2); border-color: var(--pe-cc-forest-2); }
.pe-cc__btn--ghost {
  background: transparent;
  color: var(--pe-cc-ink);
  border: 2px solid var(--pe-cc-forest);
}
.pe-cc__btn--ghost:hover { background: rgba(27, 53, 40, 0.07); }

.pe-cc__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
}
.pe-cc__meta a,
.pe-cc__link {
  color: var(--pe-cc-green);
  font: 600 13px/1.4 var(--pe-cc-sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
}
.pe-cc__meta a:hover,
.pe-cc__link:hover { color: var(--pe-cc-forest); }

.pe-cc__close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--pe-cc-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.pe-cc__close:hover { background: rgba(27, 53, 40, 0.08); }

.pe-cc__note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(185, 215, 161, 0.35);
  color: var(--pe-cc-ink);
  font-size: 13px;
  line-height: 1.45;
}
.pe-cc__note[hidden] { display: none; }

.pe-cc__list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pe-cc__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--pe-cc-line);
  border-radius: 12px;
  background: #fff;
}
.pe-cc__item-text { flex-grow: 1; display: flex; flex-direction: column; gap: 3px; cursor: default; }
.pe-cc__item-text strong { color: var(--pe-cc-ink); font-size: 14.5px; }
.pe-cc__item-text span { font-size: 12.5px; line-height: 1.45; }
label.pe-cc__item-text { cursor: pointer; }
.pe-cc__pill {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(63, 122, 75, 0.12);
  color: var(--pe-cc-green);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pe-cc__switch {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  position: relative;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: var(--pe-cc-track);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.pe-cc__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
.pe-cc__switch:checked { background: var(--pe-cc-green); }
.pe-cc__switch:checked::after { transform: translateX(18px); }
.pe-cc__switch:disabled { opacity: 0.5; cursor: not-allowed; }

.pe-cc__strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--pe-cc-strip);
  color: var(--pe-cc-ink);
  font-size: 12.5px;
  line-height: 1.4;
}
.pe-cc__strip svg { flex-shrink: 0; }

.pe-cc :focus-visible,
.pe-cc-settings-link:focus-visible {
  outline: 3px solid var(--pe-cc-gold);
  outline-offset: 2px;
}

/* Toast */
.pe-cc-toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: var(--pe-cc-z);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px 11px 12px;
  border-radius: 999px;
  background: var(--pe-cc-paper);
  color: var(--pe-cc-ink);
  border: 1px solid var(--pe-cc-line);
  font: 600 14px/1.2 var(--pe-cc-sans);
  box-shadow: 0 12px 30px rgba(8, 24, 16, 0.3);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.pe-cc-toast.is-visible { opacity: 1; transform: translateY(0); }

/* Footer trigger — looks like a link, is a button */
.pe-cc-settings-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

@media (max-width: 560px) {
  .pe-cc,
  .pe-cc.is-visible,
  .pe-cc.is-visible:hover,
  .pe-cc.is-visible:focus-within {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    transform: none;
  }
  .pe-cc { transform: translateY(24px); }
  .pe-cc__view { padding: 18px 18px 16px; }
  .pe-cc__strip { padding: 10px 18px; }
  .pe-cc-toast { left: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .pe-cc,
  .pe-cc-toast,
  .pe-cc__switch,
  .pe-cc__switch::after { transition: none; }
  .pe-cc.is-visible .pe-cc__cookie { animation: none; }
  .pe-cc,
  .pe-cc.is-visible,
  .pe-cc.is-visible:hover,
  .pe-cc.is-visible:focus-within { transform: none; }
}

/* Already on screen in this tab: sit in the corner, no slide and no wiggle. */
html[data-pe-cc-seen] .pe-cc {
  opacity: 1;
  transform: translateY(0) rotate(-1.2deg);
  pointer-events: auto;
  transition: none;
}
html[data-pe-cc-seen] .pe-cc .pe-cc__cookie { animation: none; }
@media (max-width: 560px) {
  html[data-pe-cc-seen] .pe-cc { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-pe-cc-seen] .pe-cc { transform: none; }
}
