/* Croissant cookie consent banner + preferences modal.

   Every colour, font and radius below is lifted from the existing site CSS
   rather than invented:

     #16A88B  accent            hero.css .pp-btn--teal / .cf-btn--fill:hover
     #13977D  accent hover      hero.css .pp-btn--teal:hover
     #0E1320  primary button bg hero.css .hero-btn--primary
     #1B2233  primary btn hover hero.css .hero-btn--primary:hover
     #1A2634  heading text      hero.css .cf-loc-name / .cf-brand-tag
     #5B6670  muted body text   hero.css .cf-bottom-left / .cf-brand-p
     #E6EAE9  border            hero.css .cf-locale-pop / .cf-divider
     #F6F7F9  subtle surface    hero.css .hero-btn--secondary:hover
     #ffffff  surface           onboarding.css .onboarding-shell
     8px      button radius     hero.css .hero-btn
     16px     card radius       hero.css .cf-locale-pop (popover card)
     Manrope  headings/buttons  hero.css + onboarding.css
     Inter    body text         onboarding.css .onboarding-shell

   Shadow follows the .cf-locale-pop popover recipe (hero.css:2386) so the
   card reads as the same family of floating surface.

   Stacking: the banner sits at 9998 and the modal at 9999 — the same layer
   as .onboarding-overlay. Cal.com's popup mounts its own stacking context
   well above this, so the booking popup always covers the banner. */

/* ── Banner ─────────────────────────────────────────────────────────── */

.cc-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  width: 380px;
  max-width: calc(100vw - 48px);
  background: #ffffff;
  border: 1px solid #E6EAE9;
  border-radius: 16px;
  box-shadow:
    0 24px 60px rgba(14, 19, 32, 0.18),
    0 4px 12px rgba(14, 19, 32, 0.08);
  padding: 22px;
  font-family: "Inter", "Manrope", sans-serif;
  color: #1A2634;
}

.cc-banner[hidden],
.cc-modal[hidden] {
  display: none;
}

.cc-banner-h {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1A2634;
  margin: 0 0 8px;
}

.cc-banner-p {
  font-size: 13px;
  line-height: 1.55;
  color: #5B6670;
  margin: 0 0 16px;
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cc-btn--primary {
  width: 100%;
  background: #16A88B;
  border-color: #16A88B;
  color: #ffffff;
}

.cc-btn--primary:hover {
  background: #13977D;
  border-color: #13977D;
}

.cc-btn--secondary {
  background: #ffffff;
  border-color: #0E1320;
  color: #0E1320;
}

.cc-btn--secondary:hover {
  background: #F6F7F9;
}

/* Underlined text links — matches .cf-bottom-right a in hero.css. */
.cc-link {
  background: none;
  border: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  color: #5B6670;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 160ms ease;
}

.cc-link:hover {
  color: #16A88B;
}

.cc-banner-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

/* Focus visibility, mirroring .hero-btn:focus-visible in hero.css. */
.cc-btn:focus-visible,
.cc-link:focus-visible,
.cc-close:focus-visible,
.cc-switch:focus-visible {
  outline: 2px solid #0E1320;
  outline-offset: 3px;
}

.cc-switch:focus-visible {
  outline-offset: 2px;
}

/* ── Modal ──────────────────────────────────────────────────────────── */

.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Same scrim as .onboarding-overlay (onboarding.css). */
  background: rgba(186, 200, 218, 0.7);
  padding: 24px;
}

.cc-modal-shell {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 5px 15px rgba(0, 0, 0, 0.12),
    0 15px 35px rgba(48, 49, 61, 0.08);
  padding: 26px;
  font-family: "Inter", "Manrope", sans-serif;
  color: #1A2634;
}

.cc-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cc-modal-h {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1A2634;
  margin: 0;
}

.cc-close {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #E6EAE9;
  background: #ffffff;
  color: #5B6670;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.cc-close:hover {
  background: #F6F7F9;
  color: #1A2634;
}

/* ── Preference rows ────────────────────────────────────────────────── */

.cc-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #E6EAE9;
}

.cc-row-name {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #1A2634;
  margin: 0 0 4px;
}

.cc-row-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #5B6670;
  margin: 0;
}

.cc-badge {
  flex: none;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: #16A88B;
  background: rgba(22, 168, 139, 0.10);
  border-radius: 9999px;
  padding: 6px 12px;
  white-space: nowrap;
}

/* Toggle — built from the site's pill radius (9999px, onboarding.css)
   and the accent green used for "on" states. */
.cc-switch {
  flex: none;
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 9999px;
  border: 1px solid #E6EAE9;
  background: #F6F7F9;
  cursor: pointer;
  padding: 0;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.cc-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(14, 19, 32, 0.2);
  transition: transform 160ms ease;
}

.cc-switch[aria-checked="true"] {
  background: #16A88B;
  border-color: #16A88B;
}

.cc-switch[aria-checked="true"]::after {
  transform: translateX(18px);
}

/* ── Modal footer ───────────────────────────────────────────────────── */

.cc-modal-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid #E6EAE9;
}

.cc-modal-foot .cc-btn--primary {
  width: auto;
  flex: 1 1 auto;
}

.cc-modal-foot .cc-link {
  margin-left: auto;
}

/* ── Footer "Cookie settings" link ──────────────────────────────────── */

/* Inherits .cf-bottom-right a styling; declared so the <button> matches
   the sibling anchors in that bar. */
.cf-bottom-right .cc-footer-link,
.cf-bottom-left .cc-footer-link {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  color: #5B6670;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cf-bottom-right .cc-footer-link:hover,
.cf-bottom-left .cc-footer-link:hover {
  color: #16A88B;
}

/* ── Mobile: inset card at the bottom ───────────────────────────────── */

@media (max-width: 600px) {
  .cc-banner {
    right: 16px;
    left: 16px;
    bottom: 16px;
    width: auto;
    max-width: none;
    padding: 20px;
  }

  .cc-modal {
    padding: 16px;
  }

  .cc-modal-shell {
    padding: 22px;
  }

  .cc-modal-foot .cc-btn {
    width: 100%;
    flex: 1 1 100%;
  }

  .cc-modal-foot .cc-link {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-btn,
  .cc-link,
  .cc-close,
  .cc-switch,
  .cc-switch::after {
    transition: none;
  }
}
