/* Culina Cookie Consent
   Rendered inside a shadow root, so nothing here can be overridden by the
   host theme and nothing here leaks out. Brand tokens mirror Culina Labs. */

:host {
  all: initial;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.culina-cc {
  --acc-brand: #003934;
  --acc-brand-hover: #002a27;
  --acc-ink: #111111;
  --acc-text: #111111;
  --acc-muted: #111111;
  --acc-line: #111111;
  --acc-hairline: rgba(17, 17, 17, 0.14);
  --acc-surface: #ffffff;
  --acc-font-heading: 'Inter Right', 'Inter Tight', Inter, sans-serif;
  --acc-font-body: Helvetica, Arial, sans-serif;
  --acc-btn-radius: 8px;
  font-family: var(--acc-font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--acc-text);
  letter-spacing: normal;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
}

.culina-cc button {
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
  margin: 0;
}

.culina-cc p,
.culina-cc ul,
.culina-cc li,
.culina-cc summary {
  margin: 0;
  padding: 0;
  font-family: var(--acc-font-body);
}

.culina-cc h2,
.culina-cc h3 {
  margin: 0;
  padding: 0;
  font-family: var(--acc-font-heading);
}

.culina-cc a {
  font-family: inherit;
  font-size: inherit;
}

/* ---------- Launcher ---------- */

.culina-cc-launcher {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  height: 44px;
  max-width: 44px;
  padding: 0 3px;
  border: 0;
  border-radius: 999px;
  background: var(--acc-surface);
  box-shadow:
    0 0 0 1px rgba(17, 17, 17, 0.07),
    0 3px 8px -1px rgba(17, 17, 17, 0.16),
    0 12px 28px -8px rgba(17, 17, 17, 0.24);
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  transition:
    max-width 0.32s cubic-bezier(0.22, 0.7, 0.25, 1),
    padding 0.32s cubic-bezier(0.22, 0.7, 0.25, 1),
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.culina-cc-launcher:hover,
.culina-cc-launcher:focus-visible {
  max-width: 220px;
  padding-right: 18px;
  background: #f7f7f7;
  box-shadow:
    0 0 0 1px rgba(17, 17, 17, 0.09),
    0 4px 10px -1px rgba(17, 17, 17, 0.2),
    0 16px 34px -10px rgba(17, 17, 17, 0.3);
}

.culina-cc-launcher:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(0, 57, 52, 0.2),
    0 8px 22px -6px rgba(17, 17, 17, 0.22);
}

.culina-cc-launcher__icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  color: var(--acc-ink);
}

.culina-cc-launcher__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.culina-cc-launcher__label {
  padding-left: 8px;
  font-family: var(--acc-font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--acc-text);
  opacity: 0;
  transition: opacity 0.2s ease 0.06s;
}

.culina-cc-launcher:hover .culina-cc-launcher__label,
.culina-cc-launcher:focus-visible .culina-cc-launcher__label {
  opacity: 1;
}

/* ---------- Panel ---------- */

.culina-cc-panel {
  position: fixed;
  left: 24px;
  bottom: 80px;
  z-index: 2147483001;
  display: flex;
  flex-direction: column;
  width: 440px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 128px);
  background: var(--acc-surface);
  border: 1px solid var(--acc-hairline);
  border-radius: 14px;
  box-shadow:
    0 24px 56px -24px rgba(23, 21, 18, 0.32),
    0 2px 6px rgba(23, 21, 18, 0.04);
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px);
  transform-origin: left bottom;
  transition:
    opacity 0.2s ease,
    transform 0.24s cubic-bezier(0.22, 0.7, 0.25, 1);
}

.culina-cc-panel.is-open {
  opacity: 1;
  transform: translateY(0);
}

.culina-cc-panel__head {
  padding: 22px 24px 0;
}

.culina-cc-title {
  margin: 0 0 11px !important;
  font-family: var(--acc-font-heading);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.3;
  color: var(--acc-ink);
}

.culina-cc-text {
  margin: 0 !important;
  font-family: var(--acc-font-body);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--acc-muted);
}

/* ---------- Category rows ---------- */

.culina-cc-panel__body {
  padding: 18px 24px 0;
  overflow-y: auto;
  flex: 1 1 auto;
}

.culina-cc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--acc-hairline);
}

.culina-cc-row h3 {
  font-family: var(--acc-font-heading);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--acc-ink);
}

.culina-cc-row p {
  grid-column: 1 / -1;
  margin: 0 !important;
  padding-right: 44px;
  font-family: var(--acc-font-body);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--acc-muted);
}

.culina-cc-locked {
  font-family: var(--acc-font-body);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--acc-muted);
  white-space: nowrap;
}

/* ---------- Disclosure ---------- */

.culina-cc-why {
  padding: 14px 0 4px;
}

.culina-cc-why summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--acc-font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--acc-muted);
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease;
}

.culina-cc-why summary::-webkit-details-marker {
  display: none;
}

.culina-cc-why summary::after {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -2px);
  transition: transform 0.18s ease;
}

.culina-cc-why[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -1px);
}

.culina-cc-why summary:hover {
  color: var(--acc-ink);
}

.culina-cc-why ul {
  list-style: none;
  margin-top: 10px !important;
}

.culina-cc-why li {
  position: relative;
  padding: 3px 0 3px 15px;
  font-family: var(--acc-font-body);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--acc-muted);
}

.culina-cc-why li::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 10px;
  width: 5px;
  height: 1px;
  background: #c9c3bc;
}

.culina-cc-why__links {
  margin: 10px 0 0 !important;
  font-family: var(--acc-font-body);
  font-size: 12.5px;
  color: var(--acc-muted);
}

.culina-cc-why__links a {
  color: var(--acc-brand);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.culina-cc-why__links a:hover {
  color: var(--acc-brand-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Footer ---------- */

.culina-cc-panel__foot {
  padding: 18px 24px 22px;
}

.culina-cc-btns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.culina-cc-btn {
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--acc-line);
  border-radius: var(--acc-btn-radius);
  background: #fff;
  padding: 12px 14px;
  font-family: var(--acc-font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--acc-muted);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.culina-cc-btn:hover {
  background: #f7f7f7;
  color: var(--acc-ink);
}

.culina-cc-btn:focus-visible {
  outline: 1px solid #b9b3ac;
  outline-offset: 2px;
}

.culina-cc-btn--solid {
  border-color: var(--acc-brand);
  background: var(--acc-brand);
  color: #fff;
}

.culina-cc-btn--solid:hover {
  border-color: var(--acc-brand-hover);
  background: var(--acc-brand-hover);
  color: #fff;
}

.culina-cc-btn--solid:focus-visible {
  outline-color: var(--acc-brand);
}

/* ---------- Switch ---------- */

.culina-cc-switch {
  position: relative;
  display: block;
  width: 36px;
  height: 21px;
  flex-shrink: 0;
}

.culina-cc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.culina-cc-switch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #dcd7d1;
  transition: background 0.2s ease;
}

.culina-cc-switch span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 21, 18, 0.24);
  transition: transform 0.2s cubic-bezier(0.22, 0.7, 0.25, 1);
}

.culina-cc-switch input:checked + span {
  background: var(--acc-brand);
}

.culina-cc-switch input:checked + span::after {
  transform: translateX(15px);
}

.culina-cc-switch input:focus-visible + span {
  outline: 1px solid var(--acc-ink);
  outline-offset: 2px;
}

/* ---------- Mobile ---------- */

.culina-cc-scrim {
  position: fixed;
  inset: 0;
  z-index: 2147482999;
  background: rgba(23, 21, 18, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

@media (max-width: 560px) {
  .culina-cc-scrim.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .culina-cc-launcher {
    left: 16px;
    bottom: 16px;
  }

  .culina-cc-panel {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    transform-origin: center bottom;
  }

  .culina-cc-panel.is-open ~ .culina-cc-launcher {
    opacity: 0;
    pointer-events: none;
  }

  .culina-cc-panel__head {
    padding: 20px 18px 0;
  }

  .culina-cc-panel__body {
    padding: 16px 18px 0;
  }

  .culina-cc-panel__foot {
    padding: 16px 18px 20px;
  }

  .culina-cc-row p {
    padding-right: 8px;
  }

  .culina-cc-btns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .culina-cc-btn {
    padding: 12px 10px;
    font-size: 12.5px;
  }

  .culina-cc-btn--solid {
    order: -1;
    grid-column: 1 / -1;
  }
}

@media (max-width: 380px) {
  .culina-cc-btns {
    grid-template-columns: minmax(0, 1fr);
  }

  .culina-cc-btn--solid {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .culina-cc-panel,
  .culina-cc-launcher,
  .culina-cc-launcher__label,
  .culina-cc-scrim,
  .culina-cc-save,
  .culina-cc-switch span,
  .culina-cc-switch span::after {
    transition: none !important;
  }
}
