:root {
  --cpc-consent-bg: rgba(255, 255, 255, 0.96);
  --cpc-consent-text: #171717;
  --cpc-consent-muted: #5e5e5e;
  --cpc-consent-border: rgba(0, 0, 0, 0.1);
  --cpc-consent-primary: #111111;
  --cpc-consent-accent: #c19548;
  --cpc-consent-shadow: 0 18px 50px rgba(0, 0, 0, 0.15);
}

html.cpc-consent-modal-open,
html.cpc-consent-modal-open body {
  overflow: hidden;
}

.cpc-consent {
  position: relative;
  z-index: 99999;
}

.cpc-consent__banner {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 32px));
  padding: 18px 22px;
  background: var(--cpc-consent-bg);
  color: var(--cpc-consent-text);
  border: 1px solid var(--cpc-consent-border);
  border-radius: 18px;
  box-shadow: var(--cpc-consent-shadow);
  backdrop-filter: blur(14px);
}

.cpc-consent__eyebrow {
  margin: 0 0 6px;
  font: 600 12px/1.2 Arial, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cpc-consent-accent);
}

.cpc-consent__title {
  margin: 0 0 10px;
  font: 700 24px/1.15 Georgia, serif;
}

.cpc-consent__text,
.cpc-consent__links,
.cpc-consent__category small {
  margin: 0;
  color: var(--cpc-consent-muted);
  font: 400 14px/1.6 Arial, sans-serif;
}

.cpc-consent__links {
  margin-top: 10px;
}

.cpc-consent__links a {
  color: inherit;
  text-decoration: underline;
}

.cpc-consent__actions,
.cpc-consent__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.cpc-consent__btn,
.cpc-consent-shortcode-button,
.cpc-consent__manage {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font: 600 13px/1 Arial, sans-serif;
  padding: 12px 16px;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.cpc-consent__btn:hover,
.cpc-consent-shortcode-button:hover,
.cpc-consent__manage:hover {
  transform: translateY(-1px);
}

.cpc-consent__btn--primary,
.cpc-consent-shortcode-button {
  background: var(--cpc-consent-primary);
  color: #fff;
}

.cpc-consent__btn--ghost,
.cpc-consent__btn--light,
.cpc-consent__manage {
  background: #fff;
  color: var(--cpc-consent-text);
  border-color: var(--cpc-consent-border);
}

.cpc-consent__manage {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.cpc-consent__manage::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23111111' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='M12 3l7 3v5c0 4.6-2.8 8.8-7 10-4.2-1.2-7-5.4-7-10V6l7-3z'/%3E%3Cpath fill='none' stroke='%23111111' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='M9.5 12l1.7 1.7 3.3-3.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.cpc-consent__modal[hidden],
.cpc-consent__banner[hidden] {
  display: none !important;
}

.cpc-consent__modal {
  position: fixed;
  inset: 0;
}

.cpc-consent__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.cpc-consent__panel {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: min(8vh, 64px) auto 0;
  padding: 28px;
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--cpc-consent-shadow);
}

.cpc-consent__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f3f3f3;
  color: #111;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cpc-consent__categories {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.cpc-consent__category {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid var(--cpc-consent-border);
  border-radius: 16px;
  background: #fafafa;
}

.cpc-consent__category strong {
  display: block;
  margin-bottom: 4px;
  font: 700 16px/1.2 Arial, sans-serif;
  color: var(--cpc-consent-text);
}

.cpc-consent__category input {
  width: 20px;
  height: 20px;
  accent-color: #111;
  margin-top: 4px;
}

.cpc-consent__category.is-required {
  border-color: rgba(193, 149, 72, 0.3);
  background: rgba(193, 149, 72, 0.08);
}

.cpc-consent-overview {
  display: grid;
  gap: 20px;
}

.cpc-consent-overview__row {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 16px;
}

#iubenda-cs-banner,
.iubenda-cs-preferences-link-wrapper,
.iubenda-cs-rationale-container,
.iubenda-cs-floating-preferences-btn {
  display: none !important;
}

@media (max-width: 767.98px) {
  .cpc-consent__banner {
    left: 12px;
    right: 12px;
    top: 12px;
    transform: none;
    width: auto;
    padding: 16px;
  }

  .cpc-consent__panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 24px);
    margin-top: 12px;
    padding: 24px 16px 18px;
  }

  .cpc-consent__actions,
  .cpc-consent__footer {
    flex-direction: column;
  }

  .cpc-consent__btn,
  .cpc-consent-shortcode-button {
    width: 100%;
    justify-content: center;
  }

  .cpc-consent__manage {
    left: 0;
    right: auto;
    top: auto;
    bottom: env(safe-area-inset-bottom, 0px);
    width: auto;
    gap: 6px;
    padding: 14px 10px 14px 12px;
    border-radius: 0 18px 18px 0;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
    transform: translateX(calc(-100% + 44px));
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.04em;
  }

  .cpc-consent__manage:hover,
  .cpc-consent__manage:focus {
    transform: translateX(calc(-100% + 38px));
  }

  .cpc-consent__manage::before {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }
}
