/*
  ClearlyKept cookie consent UI
  Self-contained: uses site.css tokens when present, with brand fallbacks for pages that
  do not load site.css (about.html).
*/
.ck-banner, .ck-dialog, .ck-embed {
  --ck-bg: var(--c-bg, #faf7f2);
  --ck-surface: var(--c-surface, #f9f6f0);
  --ck-surface-2: var(--c-surface-2, #ede8de);
  --ck-text: var(--c-text, #12263f);
  --ck-muted: rgba(18, 38, 63, 0.72);
  --ck-navy: var(--c-navy, #0c3a5e);
  --ck-navy-dark: var(--c-navy-dark, #08263f);
  --ck-accent: var(--c-accent-mid, #6dc283);
  --ck-accent-dark: #287541;
  --ck-border: var(--c-border-mid, rgba(11, 43, 77, 0.16));
  --ck-font: var(--font-body, 'Plus Jakarta Sans', 'Inter', 'Helvetica Neue', sans-serif);
  font-family: var(--ck-font);
  color: var(--ck-text);
}

.ck-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Banner ── */
.ck-banner {
  position: fixed; z-index: 1000;
  left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(1160px, calc(100% - 32px));
  background: var(--ck-bg);
  border: 1px solid var(--ck-border);
  border-radius: 1.25rem;
  box-shadow: 0 24px 64px rgba(12, 58, 94, 0.18);
  padding: 20px 24px;
  font-size: 15px; line-height: 1.6;
}
.ck-banner[hidden] { display: none; }
.ck-banner-inner { display: flex; align-items: center; gap: 24px; }
.ck-banner-copy { flex: 1 1 auto; min-width: 0; }
.ck-banner-title {
  margin: 0 0 4px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3;
  color: var(--ck-text);
}
.ck-banner p { margin: 0; max-width: 72ch; color: var(--ck-muted); font-size: 14px; line-height: 1.6; }
.ck-banner a, .ck-dialog a {
  color: var(--ck-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 2px;
}

/* ── Buttons: all three choices share identical size, weight and contrast ── */
.ck-actions { display: flex; gap: 10px; flex-shrink: 0; }
/* Banner: equal-width columns so no choice is visually larger than another. */
.ck-banner .ck-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ck-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 136px; padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--ck-navy);
  background: var(--ck-navy); color: #fff;
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: -0.01em;
  cursor: pointer; white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease;
}
.ck-btn:hover { background: var(--ck-navy-dark); border-color: var(--ck-navy-dark); }
.ck-btn:focus-visible, .ck-close:focus-visible, .ck-switch:focus-visible,
.ck-banner a:focus-visible, .ck-dialog a:focus-visible, .ck-link:focus-visible {
  outline: 3px solid var(--ck-accent-dark); outline-offset: 3px;
}

/* ── Settings dialog ── */
.ck-dialog {
  /* site.css resets margin on *, which removes the native <dialog> centering; restore it. */
  position: fixed; inset: 0; margin: auto; height: fit-content;
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--ck-border); border-radius: 1.25rem;
  background: var(--ck-bg);
  box-shadow: 0 24px 64px rgba(12, 58, 94, 0.22);
  overflow: auto;
}
.ck-dialog::backdrop { background: rgba(6, 26, 44, 0.55); }
.ck-dialog-form { padding: 24px; }
.ck-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.ck-dialog h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--ck-text); }
.ck-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--ck-border);
  background: transparent; color: var(--ck-navy); cursor: pointer;
}
.ck-close:hover { background: var(--ck-surface-2); }
.ck-dialog-intro, .ck-gpc, .ck-status { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--ck-muted); max-width: none; }
.ck-gpc {
  padding: 10px 14px; border-radius: 0.875rem;
  background: rgba(109, 194, 131, 0.14); color: var(--ck-text);
}
.ck-gpc[hidden] { display: none; }
.ck-cats { border: 0; margin: 0 0 16px; padding: 0; }
.ck-cat {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--ck-border);
}
.ck-cat:last-child { border-bottom: 1px solid var(--ck-border); }
.ck-cat-text { display: flex; flex-direction: column; gap: 2px; }
.ck-cat-name { font-weight: 700; font-size: 15px; color: var(--ck-text); }
.ck-cat-desc { font-size: 13px; line-height: 1.55; color: var(--ck-muted); }
.ck-always { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--ck-accent-dark); padding-top: 3px; white-space: nowrap; }
.ck-status { margin-bottom: 16px; font-size: 13px; }
.ck-actions-dialog { flex-wrap: wrap; }
.ck-actions-dialog .ck-btn { flex: 1 1 140px; }

/* Switch (native checkbox, role="switch") */
.ck-switch {
  appearance: none; -webkit-appearance: none; flex-shrink: 0;
  position: relative; width: 48px; height: 28px; margin: 0; border-radius: 999px;
  background: #b7bec7; border: 0; cursor: pointer; transition: background 180ms ease;
}
.ck-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 180ms ease;
}
.ck-switch:checked { background: var(--ck-accent-dark); }
.ck-switch:checked::after { transform: translateX(20px); }

/* ── Footer "Cookie settings" trigger (styled like the surrounding footer link) ── */
.ck-link {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.footer-legal a, .footer-legal .ck-link { font-size: var(--text-xs, 13px); color: rgba(245, 241, 233, 0.55); }
.footer-legal a:hover, .footer-legal .ck-link:hover { color: rgba(245, 241, 233, 0.9); }
.footer-legal .ck-link { text-decoration: none; }
/* About page footer (inline-styled page, no site.css) */
footer .footer-legal { margin-top: 12px; }
footer .footer-legal a, footer .footer-legal .ck-link { font-size: 12px; color: #b6c2cd; }

/* ── Embed placeholders ── */
.ck-embed-placeholder {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 28px; border-radius: 1.25rem;
  background: var(--ck-surface); border: 1px dashed var(--ck-border);
}
.ck-embed-placeholder h2, .ck-embed-placeholder h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.ck-embed-placeholder p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ck-muted); max-width: 52ch; }
.ck-embed-placeholder .ck-embed-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ck-embed-placeholder .ck-text-link { font-size: 14px; font-weight: 600; color: var(--ck-navy); text-decoration: underline; text-underline-offset: 2px; }
.ck-embed[data-ck-state="loaded"] .ck-embed-placeholder,
.ck-embed[data-ck-state="loading"] .ck-embed-placeholder { display: none; }
.ck-embed[data-ck-state="loading"] [data-ck-embed-target]::before {
  content: 'Loading…'; display: block; padding: 24px; color: var(--ck-muted); font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .ck-banner-inner { flex-direction: column; align-items: stretch; gap: 16px; }
  .ck-actions { flex-wrap: wrap; }
  .ck-actions .ck-btn { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 520px) {
  .ck-banner { bottom: 8px; width: calc(100% - 16px); padding: 16px; }
  .ck-banner p { font-size: 13px; line-height: 1.55; }
  .ck-banner .ck-actions { grid-template-columns: 1fr; gap: 8px; }
  .ck-btn { min-height: 44px; padding: 8px 16px; }
  .ck-actions .ck-btn { width: 100%; }
  .ck-dialog-form { padding: 20px 16px; }
  .ck-actions-dialog { display: grid; grid-template-columns: 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ck-btn, .ck-switch, .ck-switch::after { transition: none; }
}
@media print { .ck-banner, .ck-dialog { display: none !important; } }

/* Embed mounts stay collapsed until the embed is requested. */
.ck-embed[data-ck-state="blocked"] [data-ck-embed-target],
.ck-embed:not([data-ck-state]) [data-ck-embed-target] { display: none; }
.ck-calendly-mount { min-width: 320px; height: 700px; }
