.cw-consent {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 99999;
  font-family: Roboto, sans-serif;
  color: #263238;
}

.cw-consent[hidden],
.cw-consent-settings[hidden] {
  display: none !important;
}

.cw-consent__panel {
  width: min(560px, 100%);
  margin-left: auto;
  border: 1px solid rgba(169, 96, 223, 0.24);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(22, 42, 68, 0.2);
  overflow: hidden;
}

.cw-consent__accent {
  height: 4px;
  background: #a960df;
}

.cw-consent__body {
  padding: 16px 18px 17px;
}

.cw-consent__eyebrow {
  margin: 0 0 6px;
  color: #a960df;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cw-consent h2,
.cw-consent h3 {
  margin: 0 0 10px;
  color: #444964;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.cw-consent p {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.cw-consent__links {
  margin-top: 8px;
  font-size: 13px;
}

.cw-consent__links a {
  color: #a960df;
  font-weight: 600;
  text-decoration: none;
}

.cw-consent__links a:hover {
  text-decoration: underline;
}

.cw-consent__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.cw-consent__button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.cw-consent__button:hover {
  transform: translateY(-1px);
}

.cw-consent__button--primary {
  background: #a960df;
  color: #fff;
  border-color: #a960df;
}

.cw-consent__button--primary:hover {
  background: #8f40d4;
  border-color: #8f40d4;
}

.cw-consent__button--outline {
  border-color: #ccc;
  background: #fff;
  color: #555;
}

.cw-consent__button--outline:hover {
  border-color: #8f40d4;
  background: #8f40d4;
  color: #fff;
}

.cw-consent__button--ghost {
  background: #eef6fc;
  color: #444964;
}

.cw-consent__button--ghost:hover {
  background: #dff0fb;
}

.cw-consent-settings {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(13, 35, 55, 0.42);
  font-family: Roboto, sans-serif;
}

.cw-consent-settings__dialog {
  width: min(640px, 100%);
  max-height: min(680px, 92vh);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(13, 35, 55, 0.28);
}

.cw-consent-settings__header,
.cw-consent-settings__footer {
  padding: 20px 22px;
}

.cw-consent-settings__header {
  border-bottom: 1px solid #e7eef3;
}

.cw-consent-settings__content {
  padding: 4px 22px 0;
}

.cw-consent-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #e7eef3;
}

.cw-consent-option h4 {
  margin: 0 0 5px;
  color: #444964;
  font-size: 16px;
  line-height: 1.3;
}

.cw-consent-option p {
  font-size: 14px;
}

.cw-consent-toggle {
  position: relative;
  width: 52px;
  height: 30px;
  flex: 0 0 auto;
}

.cw-consent-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cw-consent-toggle span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #ccd8df;
  cursor: pointer;
  transition: background 0.18s ease;
}

.cw-consent-toggle span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(13, 35, 55, 0.22);
  transition: transform 0.18s ease;
}

.cw-consent-toggle input:checked + span {
  background: #a960df;
}

.cw-consent-toggle input:checked + span::after {
  transform: translateX(22px);
}

.cw-consent-toggle input:disabled + span {
  cursor: not-allowed;
  opacity: 0.82;
}

.cw-consent-settings__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid #e7eef3;
}

@media (max-width: 575px) {
  .cw-consent {
    inset: auto 8px 8px;
  }

  .cw-consent__body {
    padding: 13px 14px 14px;
  }

  .cw-consent h2,
  .cw-consent h3 {
    margin-bottom: 7px;
    font-size: 17px;
  }

  .cw-consent p {
    font-size: 13px;
    line-height: 1.42;
  }

  .cw-consent__links {
    margin-top: 6px;
    font-size: 12px;
  }

  .cw-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 11px;
  }

  .cw-consent__button {
    width: 100%;
    min-height: 38px;
    padding: 8px 9px;
    font-size: 12px;
  }

  .cw-consent-option {
    grid-template-columns: 1fr;
  }
}
