/* JKZ LLP consent manager UI (Bay Bold). Tokens come from base.css.
   "Accept all" and "Reject all" are styled identically: under the CPRA regulations the choices
   must be equally easy and equally prominent. */

.jkz-consent-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 999999;
  background: var(--night, #0f1b18);
  color: var(--bone, #efe9df);
  border-top: 3px solid var(--clay, #cf8a6c);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.3);
  font-family: var(--sans, system-ui, sans-serif);
  /* Very short screens (e.g. 400% zoom): scroll inside the banner instead of clipping its text (WCAG 1.4.10). */
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
}

/* Keyboard focus scrolls clear of the banner (WCAG 2.4.11); consent.js sets --consent-h. */
html:has(.jkz-consent-banner) { scroll-padding-bottom: calc(var(--consent-h, 0px) + 16px); }
/* ...and the last links on the page get room to scroll above it (WCAG 2.4.11). */
body:has(.jkz-consent-banner) { padding-bottom: var(--consent-h, 0px); }

.jkz-consent-banner__inner {
  max-width: var(--wrap, 1240px);
  margin: 0 auto;
  padding: 18px max(24px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  align-items: center;
  justify-content: space-between;
}

.jkz-consent-banner__text {
  margin: 0;
  flex: 1 1 420px;
  font-size: 16px;
  line-height: 1.5;
}

.jkz-consent-banner__text a {
  color: var(--clay, #cf8a6c);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.jkz-consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.jkz-consent-btn {
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--bone, #efe9df);
  border-radius: 0;
  background: var(--bone, #efe9df);
  color: var(--night, #0f1b18);
  font: 700 14px/1.2 var(--sans, system-ui, sans-serif);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.jkz-consent-btn:hover {
  background: #fff;
}

.jkz-consent-btn:focus-visible {
  outline: 2px solid var(--clay, #cf8a6c);
  outline-offset: 2px;
}

/* "Manage preferences" is the secondary path: a plain text button. */
.jkz-consent-btn[data-consent-action="manage"] {
  border-color: transparent;
  background: transparent;
  color: var(--bone, #efe9df);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.jkz-consent-btn[data-consent-action="manage"]:hover {
  color: #fff;
}

.jkz-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(10, 18, 16, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.jkz-consent-modal {
  background: var(--paper, #f8f5ef);
  color: var(--ink, #121a17);
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 0;
  border-top: 4px solid var(--clay, #cf8a6c);
  padding: 28px 30px;
  font: 400 16px/1.55 var(--sans, system-ui, sans-serif);
}

.jkz-consent-modal h2 {
  font: 400 28px/1.15 var(--serif, Georgia, serif);
  margin: 0 0 12px;
  color: var(--ink, #121a17);
}

.jkz-consent-modal p {
  margin: 0 0 12px;
}

.jkz-consent-modal a {
  color: var(--clay-deep, #9c5639);
}

.jkz-consent-gpc {
  background: var(--bone, #efe9df);
  border-left: 4px solid var(--green, #1d453a);
  padding: 10px 14px;
  font-size: 15px;
}

.jkz-consent-cat {
  border-top: 1px solid var(--line, #d6cdbd);
  padding: 12px 0 4px;
}

.jkz-consent-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}

.jkz-consent-switch input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--green, #1d453a);
}

.jkz-consent-cat__desc {
  margin: 0 0 10px 34px;
  color: var(--body, #39423d);
  font-size: 15px;
}

.jkz-consent-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  /* Stays at the bottom of the scrolling dialog, so Reject all is always in view. */
  position: sticky;
  bottom: -28px;
  margin: 20px -30px -28px;
  padding: 14px 30px 28px;
  background: var(--paper, #f8f5ef);
  border-top: 1px solid var(--line, #d6cdbd);
}

/* In the dialog both buttons sit on the light panel: same style for both, as in the banner. */
.jkz-consent-modal__actions .jkz-consent-btn {
  border-color: var(--night, #0f1b18);
  background: var(--night, #0f1b18);
  color: var(--bone, #efe9df);
}

.jkz-consent-modal__actions .jkz-consent-btn:hover {
  background: var(--green, #1d453a);
  border-color: var(--green, #1d453a);
}

/* The dialog is a light panel: a dark-clay ring, 5:1 on paper (WCAG 1.4.11). */
.jkz-consent-modal { --focus: var(--clay-deep, #9c5639); }
.jkz-consent-modal :focus-visible {
  outline: 2px solid var(--clay-deep, #9c5639);
  outline-offset: 3px;
}

/* Consent-gated embeds (maps, video). Pages restyle these in their own CSS where needed. */
.consent-embed {
  position: relative;
}

.consent-embed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bone, #efe9df);
  border: 1px solid var(--line, #d6cdbd);
  color: var(--body, #39423d);
  text-align: center;
  padding: 40px 20px;
  min-height: 220px;
  font: 400 16px/1.5 var(--sans, system-ui, sans-serif);
}

@media (max-width: 640px) {
  .jkz-consent-banner__inner {
    padding: 14px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    gap: 10px;
  }
  .jkz-consent-banner__text {
    flex-basis: 100%;
    font-size: 15px;
    line-height: 1.45;
  }
  /* Reject | Accept side by side, Manage below them */
  .jkz-consent-banner__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "reject accept" "manage manage";
    gap: 8px;
  }
  .jkz-consent-btn { padding: 10px 12px; }
  /* Banner only: the dialog has its own Reject button and no grid areas. */
  .jkz-consent-banner__actions .jkz-consent-btn[data-consent-action="reject"] { grid-area: reject; }
  .jkz-consent-banner__actions .jkz-consent-btn[data-consent-action="accept"] { grid-area: accept; }
  .jkz-consent-banner__actions .jkz-consent-btn[data-consent-action="manage"] { grid-area: manage; padding: 4px 12px; }
  .jkz-consent-modal { padding: 22px 18px; max-height: 92vh; }
  .jkz-consent-modal h2 { font-size: 24px; }
  .jkz-consent-modal__actions { display: grid; grid-template-columns: 1fr 1fr; bottom: -22px; margin: 16px -18px -22px; padding: 12px 18px 22px; }
}
