#wcp-banner,
#wcp-modal {
  font-family: inherit;
}

.wcp-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  background: #111;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.wcp-banner__content {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.wcp-banner__text p,
.wcp-banner__text strong {
  color: #fff;
}

.wcp-banner__links a,
.wcp-footer-links a {
  color: inherit;
  margin-right: 12px;
  text-decoration: underline;
}

.wcp-banner__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.wcp-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.wcp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.wcp-modal__dialog {
  position: relative;
  width: min(720px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.wcp-modal__header,
.wcp-modal__footer {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.wcp-modal__footer {
  border-top: 1px solid #e5e7eb;
  border-bottom: 0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.wcp-modal__body {
  padding: 20px;
}

.wcp-close-modal {
  background: transparent;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.wcp-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wcp-category-list {
  display: grid;
  gap: 12px;
}

.wcp-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.wcp-category-item small {
  display: block;
  margin-top: 4px;
  color: #4b5563;
}

.wcp-service-list {
  margin-top: 24px;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

.wcp-footer-links {
  margin: 24px 0 0;
  text-align: center;
  font-size: 14px;
}

.wcp-embed {
  position: relative;
  min-height: 220px;
}

.wcp-embed iframe {
  width: 100%;
  max-width: 100%;
  display: block;
}

.wcp-embed__placeholder {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  text-align: center;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 12px;
}

body.wcp-modal-open {
  overflow: hidden;
}

@media (max-width: 782px) {
  .wcp-banner__content {
    flex-direction: column;
    align-items: stretch;
  }

  .wcp-banner__actions {
    width: 100%;
  }

  .wcp-banner__actions .button {
    flex: 1 1 auto;
    text-align: center;
  }
}


.wcp-modal__dialog {
  width: min(580px, calc(100% - 32px));
  max-height: calc(100vh - 72px);
}

.wcp-modal__header,
.wcp-modal__footer {
  padding: 12px 16px;
}

.wcp-modal__body {
  padding: 16px;
  font-size: 14px;
}

.wcp-modal__body p,
.wcp-modal__body li,
.wcp-modal__body small,
.wcp-modal__body label,
.wcp-modal__footer .button {
  font-size: 13px;
}

.wcp-modal__header h2 {
  margin: 0;
  font-size: 20px;
}

.wcp-modal__intro {
  margin-top: 0;
  margin-bottom: 12px;
}

.wcp-close-modal {
  font-size: 22px;
}

.wcp-category-list {
  gap: 10px;
}

.wcp-category-item {
  gap: 12px;
  padding: 10px 12px;
}

.wcp-consent-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 6px;
}

.wcp-consent-summary__col h3,
.wcp-service-list h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.wcp-consent-summary__box {
  min-height: 84px;
  max-height: 180px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.wcp-consent-summary__box ul,
.wcp-service-list ul {
  margin: 0;
  padding-left: 18px;
}

.wcp-consent-summary__box li,
.wcp-service-list li {
  margin: 0 0 6px;
  line-height: 1.35;
}

.wcp-consent-summary__cookie {
  color: #4b5563;
  font-size: 12px;
}

.wcp-service-list {
  margin-top: 16px;
  padding-top: 12px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .wcp-modal__dialog {
    width: min(96vw, 520px);
    max-height: calc(100vh - 24px);
    margin: 12px auto;
  }

  .wcp-consent-summary {
    grid-template-columns: 1fr;
  }
}


.wcp-category-item {
  grid-template-columns: minmax(0, 1fr) auto auto;
  display: grid;
  align-items: center;
}

.wcp-category-item__text {
  min-width: 0;
}

.wcp-switch-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.wcp-category-toggle {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.wcp-switch {
  width: 36px;
  height: 22px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: background .2s ease;
}

.wcp-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
  transition: transform .2s ease;
}

.wcp-category-toggle:checked + .wcp-switch {
  background: #111;
}

.wcp-category-toggle:checked + .wcp-switch::after {
  transform: translateX(14px);
}

.wcp-category-toggle:disabled + .wcp-switch {
  background: #6b7280;
  opacity: .9;
}

.wcp-category-item__status {
  font-size: 11px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.wcp-category-item__status--active,
.wcp-category-item__status--locked {
  background: #ecfdf5;
  color: #065f46;
}

.wcp-category-item__status--inactive {
  background: #fef2f2;
  color: #991b1b;
}

.wcp-service-list {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
  padding: 0;
  overflow: hidden;
}

.wcp-service-list summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
}

.wcp-service-list summary::-webkit-details-marker { display: none; }
.wcp-service-list[open] summary { border-bottom: 1px solid #e5e7eb; }
.wcp-service-list ul { padding: 10px 16px 10px 28px; }

@media (max-width: 640px) {
  .wcp-category-item {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'text status'
      'text switch';
    row-gap: 8px;
  }
  .wcp-category-item__text { grid-area: text; }
  .wcp-category-item__status { grid-area: status; justify-self: end; }
  .wcp-switch-wrap { grid-area: switch; justify-self: end; }
}

.wcp-revoke-notice{position:fixed;right:16px;bottom:16px;max-width:420px;background:#111;color:#fff;padding:12px 14px;border-radius:10px;z-index:999999;font-size:13px;line-height:1.4;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.wcp-revoke-notice[hidden]{display:none!important}


.wcp-embed__badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  font-size: 12px;
  line-height: 1.2;
}

.wcp-embed__title {
  margin: 0;
}

.wcp-embed__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.wcp-embed__actions .button {
  margin: 0;
}

.wcp-modal__hero {
  margin-bottom: 14px;
}

.wcp-modal__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #4b5563;
}

.wcp-modal__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .95fr);
  gap: 14px;
  align-items: start;
}

.wcp-panel {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
  padding: 12px;
}

.wcp-panel__header {
  margin-bottom: 10px;
}

.wcp-panel__header h3,
.wcp-panel__header h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.wcp-panel__header p {
  margin: 0;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}

.wcp-consent-summary {
  margin: 0;
  grid-template-columns: 1fr;
}

.wcp-consent-summary__col h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.wcp-consent-summary__box {
  min-height: 110px;
  background: #fff;
}

.wcp-service-list {
  margin-top: 14px;
}

.wcp-modal__footer {
  position: sticky;
  bottom: 0;
  background: #fff;
}

@media (max-width: 760px) {
  .wcp-modal__grid {
    grid-template-columns: 1fr;
  }
}


/* ── AREA 4 Accessibilità: focus visible, tap target, skip-to-content ─────── */
.wcp-banner button:focus-visible,
.wcp-modal button:focus-visible,
.wcp-banner a:focus-visible,
.wcp-modal a:focus-visible,
.wcp-category-toggle:focus-visible + .wcp-switch {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Tap target minimo 44×44px su mobile (WCAG 2.5.5) */
@media (max-width: 767px) {
  .wcp-category-item--mobile .wcp-switch-wrap {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .wcp-banner__actions .button {
    min-height: 44px;
  }
  .wcp-modal__footer .button {
    min-height: 44px;
  }
}

/* Modale: tap target pulsante chiudi */
.wcp-close-modal {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

/* High-contrast mode */
@media (forced-colors: active) {
  .wcp-switch { forced-color-adjust: none; }
  .wcp-banner, .wcp-modal__dialog { border: 2px solid ButtonText; }
}
