/*
  Native consent manager styles. Namespaced under #cm-wrapper so nothing leaks
  into the host page. Light theme to match the site (theme-color #ffffff).
  Elements are hidden by default and revealed with the `is-open` class from JS,
  so nothing flashes before the script decides what to show.
*/
#cm-wrapper {
  --cm-primary: #228be6;
  --cm-bg: #ffffff;
  --cm-text: #4b494b;
  --cm-backdrop: rgba(0, 0, 0, 0.2);
  --cm-shadow: -5px 5px 10px 0 rgba(0, 0, 0, 0.07), 0 0 50px 0 rgba(0, 0, 0, 0.1);
  --cm-focus: 0 0 0 2px #fff, 0 0 0 4px #000;
  --cm-font: 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  font-family: var(--cm-font);
  color: var(--cm-text);
}

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

/* --- backdrop --- */
#cm-backdrop {
  position: fixed;
  inset: 0;
  background: var(--cm-backdrop);
  pointer-events: auto;
  display: none;
}
#cm-backdrop.is-open {
  display: block;
}

/* --- shared buttons --- */
#cm-wrapper .cm-btn {
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  padding: 10px 20px;
  border-radius: 6px;
  border: 2px solid var(--cm-primary);
  cursor: pointer;
  text-align: center;
}
#cm-wrapper .cm-btn--primary {
  background: var(--cm-primary);
  color: var(--cm-bg);
}
#cm-wrapper .cm-btn--primary:hover {
  background: var(--cm-bg);
  color: var(--cm-primary);
}
#cm-wrapper .cm-btn--secondary {
  background: var(--cm-bg);
  color: var(--cm-primary);
}
#cm-wrapper .cm-btn--secondary:hover {
  background: var(--cm-primary);
  color: var(--cm-bg);
}
#cm-wrapper .cm-link {
  font: inherit;
  font-size: 16px;
  border: none;
  background: none;
  padding: 6px 0;
  color: var(--cm-primary);
  cursor: pointer;
}
#cm-wrapper .cm-link span {
  text-decoration: underline;
}
#cm-wrapper .cm-link:hover span {
  color: var(--cm-text);
}

#cm-wrapper a {
  color: var(--cm-primary);
  text-decoration: underline;
}
#cm-wrapper a:hover {
  color: var(--cm-text);
}

#cm-wrapper button:focus-visible,
#cm-wrapper a:focus-visible,
#cm-wrapper .cm-switch:focus-within {
  outline: none;
  box-shadow: var(--cm-focus);
  border-radius: 6px;
}

/* --- banner --- */
#cm-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  width: 460px;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 28px;
  background: var(--cm-bg);
  border-radius: 8px;
  box-shadow: var(--cm-shadow);
  pointer-events: auto;
  display: none;
  animation: cm-slide-up 300ms ease-out;
}
#cm-banner.is-open {
  display: block;
}
#cm-banner p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 24px;
}
#cm-banner .cm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* --- modal --- */
#cm-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 640px;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 28px;
  background: var(--cm-bg);
  border-radius: 8px;
  box-shadow: var(--cm-shadow);
  pointer-events: auto;
  display: none;
  animation: cm-fade-in 300ms ease-out;
}
#cm-modal.is-open {
  display: block;
}
#cm-modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
#cm-modal h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}
#cm-modal .cm-modal-close {
  border: none;
  background: none;
  color: var(--cm-primary);
  font-size: 18px;
  line-height: 1;
  padding: 8px;
  cursor: pointer;
}
#cm-modal > p {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 24px;
}
#cm-modal section {
  margin-top: 20px;
}
#cm-modal footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* --- category rows --- */
#cm-wrapper .cm-cat {
  border: none;
  padding: 0;
  margin: 0 0 24px;
}
#cm-wrapper .cm-cat:last-of-type {
  margin-bottom: 0;
}
#cm-wrapper .cm-cat__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
#cm-wrapper .cm-cat legend {
  padding: 0;
  font-weight: 700;
  font-size: 16px;
}
#cm-wrapper .cm-cat p {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
}

/* --- switch --- */
#cm-wrapper .cm-switch {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 30px;
  cursor: pointer;
}
#cm-wrapper .cm-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
#cm-wrapper .cm-switch__pill {
  position: absolute;
  inset: 0;
  background: #b9b6b9;
  border-radius: 999px;
  transition: background 150ms ease-out;
}
#cm-wrapper .cm-switch__dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: left 150ms ease-out;
}
#cm-wrapper .cm-switch__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
#cm-wrapper .cm-switch input:checked ~ .cm-switch__pill {
  background: var(--cm-primary);
}
#cm-wrapper .cm-switch input:checked ~ .cm-switch__dot {
  left: calc(100% - 27px);
}
#cm-wrapper .cm-switch input:disabled ~ .cm-switch__pill {
  opacity: 0.6;
  cursor: not-allowed;
}
#cm-wrapper .cm-switch input:disabled {
  cursor: not-allowed;
}

/* --- reopen icon --- */
#cm-icon {
  position: fixed;
  bottom: 12px;
  left: 12px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: var(--cm-primary);
  color: #fff;
  fill: #fff;
  cursor: pointer;
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  display: none;
  align-items: center;
  justify-content: center;
  animation: cm-fade-in 300ms ease-out;
}
#cm-icon.is-open {
  display: flex;
}
#cm-icon svg {
  fill: #fff;
}

/* --- motion --- */
@keyframes cm-slide-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes cm-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  #cm-banner,
  #cm-modal,
  #cm-icon {
    animation: none;
  }
}
