.wpcc,
.wpcc * {
  box-sizing: border-box;
}

:root {
  --wpcc-bg: #ffffff;
  --wpcc-text: #171717;
  --wpcc-muted: #666666;
  --wpcc-border: #d9d9d9;
  --wpcc-surface: #f7f7f7;
  --wpcc-accent: #171717;
  --wpcc-accent-text: #ffffff;
  --wpcc-radius: 14px;
  --wpcc-shadow: 0 18px 60px rgb(0 0 0 / 0.18);
  --wpcc-max-width: 1180px;
  --wpcc-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wpcc {
  position: relative;
  z-index: 2147483000;
  font-family: var(--wpcc-font);
  color: var(--wpcc-text);
}

.wpcc [hidden] {
  display: none !important;
}

.wpcc-lock-scroll {
  overflow: hidden;
}

.wpcc-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  padding: 16px;
  background: var(--wpcc-bg);
  border-top: 1px solid var(--wpcc-border);
  box-shadow: var(--wpcc-shadow);
}

.wpcc[data-wpcc-mode="wall"] .wpcc-banner {
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 0.55);
  border: 0;
}

.wpcc-banner__content {
  width: min(100%, var(--wpcc-max-width));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.wpcc[data-wpcc-mode="wall"] .wpcc-banner__content {
  max-width: 720px;
  padding: 28px;
  border-radius: var(--wpcc-radius);
  background: var(--wpcc-bg);
  box-shadow: var(--wpcc-shadow);
}

.wpcc-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.3;
}

.wpcc-text {
  margin: 0 0 12px;
  color: var(--wpcc-muted);
  line-height: 1.55;
}

.wpcc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wpcc-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--wpcc-accent);
  border-radius: 9px;
  background: var(--wpcc-bg);
  color: var(--wpcc-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.wpcc-button:hover {
  background: var(--wpcc-surface);
}

.wpcc-button:focus-visible,
.wpcc-policy-link:focus-visible,
.wpcc-switch input:focus-visible + .wpcc-switch__visual {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.wpcc-button--icon {
  min-width: 44px;
  padding-inline: 12px;
}

.wpcc-policy-link {
  color: inherit;
  text-underline-offset: 3px;
}

.wpcc-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(0 0 0 / 0.55);
}

.wpcc-dialog {
  width: min(100%, 720px);
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  padding: 24px;
  border-radius: var(--wpcc-radius);
  background: var(--wpcc-bg);
  box-shadow: var(--wpcc-shadow);
}

.wpcc-dialog__header,
.wpcc-dialog__footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.wpcc-dialog__header {
  margin-bottom: 8px;
}

.wpcc-dialog__header .wpcc-title {
  margin: 0;
}

.wpcc-dialog__footer {
  margin-top: 20px;
}

.wpcc-categories {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.wpcc-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--wpcc-border);
  border-radius: 10px;
  background: var(--wpcc-bg);
}

.wpcc-category__copy {
  display: grid;
  gap: 4px;
}

.wpcc-category__title {
  font-weight: 700;
}

.wpcc-category__description {
  color: var(--wpcc-muted);
  line-height: 1.45;
}

.wpcc-category__required {
  flex: none;
  color: var(--wpcc-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.wpcc-switch {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
}

.wpcc-switch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.wpcc-switch__visual {
  position: absolute;
  inset: 0;
  border: 1px solid var(--wpcc-border);
  border-radius: 999px;
  background: var(--wpcc-surface);
  cursor: pointer;
}

.wpcc-switch__visual::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: var(--wpcc-muted);
  transition: transform 160ms ease;
}

.wpcc-switch input:checked + .wpcc-switch__visual {
  background: var(--wpcc-accent);
  border-color: var(--wpcc-accent);
}

.wpcc-switch input:checked + .wpcc-switch__visual::after {
  background: var(--wpcc-accent-text);
  transform: translateX(20px);
}

@media (max-width: 760px) {
  .wpcc-banner__content {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .wpcc-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wpcc-dialog {
    padding: 18px;
  }

  .wpcc-dialog__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .wpcc-dialog__footer .wpcc-button {
    width: 100%;
  }

  .wpcc-category {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wpcc-switch__visual::after {
    transition: none;
  }
}
