.cm-privacy[hidden],
.cm-privacy [hidden] {
  display: none !important;
}

.cm-privacy {
  position: fixed;
  inset: auto 0 0;
  z-index: 2147483000;
  display: grid;
  place-items: end center;
  padding: 20px;
  pointer-events: none;
  color: #153a52;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cm-privacy-panel {
  position: relative;
  width: min(100%, 1080px);
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid #d7d4cb;
  border-radius: 16px;
  background: #fffdf9;
  box-shadow: 0 24px 80px rgb(15 41 58 / 0.24);
  pointer-events: auto;
}

.cm-privacy-kicker {
  margin: 0 0 10px;
  color: #d65b42;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.cm-privacy h2 {
  margin: 0;
  color: #153a52;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.cm-privacy-intro {
  max-width: 850px;
  margin: 12px 0 0;
  color: #596970;
  font-size: 14px;
  line-height: 1.6;
}

.cm-privacy-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d7d4cb;
  border-radius: 50%;
  background: transparent;
  color: #153a52;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.cm-privacy[data-mode="banner"] .cm-privacy-close,
.cm-privacy[data-mode="banner"] .cm-privacy-preferences,
.cm-privacy[data-mode="banner"] .cm-privacy-actions-settings,
.cm-privacy[data-mode="settings"] .cm-privacy-actions-main {
  display: none;
}

.cm-privacy-preferences {
  display: grid;
  gap: 1px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid #dedbd3;
  border-radius: 11px;
  background: #dedbd3;
}

.cm-privacy-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 16px 18px;
  background: #fff;
}

.cm-privacy-category strong {
  display: block;
  color: #153a52;
  font-size: 13px;
}

.cm-privacy-category p {
  margin: 5px 0 0;
  color: #65737a;
  font-size: 12px;
  line-height: 1.5;
}

.cm-privacy-category-disabled {
  background: #f5f3ed;
}

.cm-privacy-status {
  color: #617178;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cm-switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
}

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

.cm-switch span {
  position: absolute;
  inset: 0;
  border: 1px solid #a9b0b2;
  border-radius: 999px;
  background: #e8e7e1;
  transition: background .18s ease, border-color .18s ease;
}

.cm-switch span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgb(15 41 58 / .25);
  transition: transform .18s ease;
}

.cm-switch input:checked + span {
  border-color: #153a52;
  background: #153a52;
}

.cm-switch input:checked + span::after {
  transform: translateX(20px);
}

.cm-switch input:focus-visible + span,
.cm-privacy button:focus-visible,
.cm-privacy-link:focus-visible,
.cm-privacy-manage:focus-visible {
  outline: 3px solid #ef816a;
  outline-offset: 3px;
}

.cm-privacy-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.cm-privacy-button {
  min-height: 44px;
  padding: 11px 15px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  cursor: pointer;
}

.cm-privacy-choice {
  flex: 1 1 230px;
  border: 1px solid #153a52;
  background: #153a52;
  color: #fff;
}

.cm-privacy-choice:hover,
.cm-privacy-save:hover {
  background: #0f293a;
}

.cm-privacy-customize,
.cm-privacy-back,
.cm-privacy-settings-reject {
  border: 1px solid #c8c6be;
  background: transparent;
  color: #153a52;
}

.cm-privacy-save {
  border: 1px solid #153a52;
  background: #153a52;
  color: #fff;
}

.cm-privacy-link {
  display: inline-block;
  margin-top: 14px;
  color: #53656e;
  font-size: 11px;
  text-underline-offset: 3px;
}

.cm-privacy-manage {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

@media (max-width: 680px) {
  .cm-privacy {
    padding: 0;
  }

  .cm-privacy-panel {
    max-height: min(88svh, 760px);
    overflow-y: auto;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
    padding: 22px 18px max(20px, env(safe-area-inset-bottom));
  }

  .cm-privacy-intro {
    font-size: 13px;
  }

  .cm-privacy-category {
    gap: 15px;
    padding: 15px;
  }

  .cm-privacy-actions {
    align-items: stretch;
  }

  .cm-privacy-choice,
  .cm-privacy-customize,
  .cm-privacy-back,
  .cm-privacy-settings-reject,
  .cm-privacy-save {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm-switch span,
  .cm-switch span::after {
    transition: none;
  }
}
