:root {
  --cm-pc-bg: #f4f1ea;
  --cm-pc-text: #161616;
  --cm-pc-accent: #f04a32;
  --cm-pc-line: rgba(22, 22, 22, .18);
}

.cm-cookie-banner[hidden],
.cm-cookie-modal[hidden] {
  display: none !important;
}

.cm-cookie-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2147483000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 24px;
  color: var(--cm-pc-text);
  background: var(--cm-pc-bg);
  border: 1px solid var(--cm-pc-line);
  box-shadow: 0 18px 60px rgba(22,22,22,.14);
  font-family: Arial, Helvetica, sans-serif;
}

.cm-cookie-banner__copy {
  max-width: 760px;
}

.cm-cookie-banner__eyebrow {
  margin: 0 0 8px;
  color: var(--cm-pc-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cm-cookie-banner h2,
.cm-cookie-modal h2,
.cm-cookie-modal h3 {
  margin-top: 0;
  color: inherit;
}

.cm-cookie-banner h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1;
  letter-spacing: -.035em;
}

.cm-cookie-banner__copy > p:last-child {
  max-width: 70ch;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.cm-cookie-banner a,
.cm-cookie-modal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cm-cookie-banner__actions,
.cm-cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.cm-cookie-btn {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--cm-pc-text);
  border-radius: 0;
  background: transparent;
  color: var(--cm-pc-text);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.cm-cookie-btn--primary {
  border-color: var(--cm-pc-accent);
  background: var(--cm-pc-accent);
  color: #fff;
}

.cm-cookie-btn:hover,
.cm-cookie-btn:focus-visible {
  outline: 2px solid var(--cm-pc-accent);
  outline-offset: 2px;
}

.cm-cookie-banner__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.cm-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: grid;
  place-items: center;
  padding: 20px;
}

.cm-cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22,22,22,.58);
}

.cm-cookie-modal__panel {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: clamp(22px, 4vw, 38px);
  background: var(--cm-pc-bg);
  color: var(--cm-pc-text);
  box-shadow: 0 26px 80px rgba(0,0,0,.24);
  font-family: Arial, Helvetica, sans-serif;
}

.cm-cookie-modal__head {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--cm-pc-line);
}

.cm-cookie-modal__head h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 5vw, 50px);
  line-height: .95;
  letter-spacing: -.045em;
}

.cm-cookie-modal__head > button {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--cm-pc-line);
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.cm-cookie-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--cm-pc-line);
}

.cm-cookie-category h3 {
  margin-bottom: 5px;
  font-size: 18px;
}

.cm-cookie-category p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.cm-cookie-switch {
  position: relative;
  display: inline-flex;
}

.cm-cookie-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cm-cookie-switch span {
  position: relative;
  display: block;
  width: 46px;
  height: 26px;
  border: 1px solid var(--cm-pc-text);
  cursor: pointer;
}

.cm-cookie-switch span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--cm-pc-text);
  transition: transform .18s ease, background .18s ease;
}

.cm-cookie-switch input:checked + span {
  border-color: var(--cm-pc-accent);
}

.cm-cookie-switch input:checked + span::after {
  background: var(--cm-pc-accent);
  transform: translateX(20px);
}

.cm-cookie-switch input:disabled + span {
  opacity: .62;
  cursor: default;
}

.cm-cookie-modal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 20px 0;
  font-size: 12px;
}

html.cm-cookie-modal-open,
html.cm-cookie-modal-open body {
  overflow: hidden;
}

@media (max-width: 760px) {
  .cm-cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .cm-cookie-banner__actions,
  .cm-cookie-modal__actions {
    justify-content: stretch;
  }

  .cm-cookie-btn {
    flex: 1 1 100%;
    width: 100%;
  }
}

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