/* Banner consenso cookie. Non modale. Solo token --pk-*, nessuno stile inline. */

.pk-consent[hidden],
.pk-consent-panel[hidden] {
  display: none;
}

.pk-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--pk-color-crema);
  border-top: 2px solid var(--pk-color-blu-inchiostro);
  color: var(--pk-color-blu-inchiostro);
  font-family: var(--pk-font-body);
  font-size: var(--pk-size-body);
  line-height: var(--pk-line-height-testi);
}

.pk-consent:focus,
.pk-consent-panel:focus {
  outline: none;
}

.pk-consent-inner {
  box-sizing: border-box;
  display: grid;
  gap: 1rem;
  max-width: 72rem;
  max-height: 70vh;
  margin: 0 auto;
  padding: 1rem;
  overflow-y: auto;
}

.pk-consent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.pk-consent-title {
  margin: 0;
  color: var(--pk-color-blu-inchiostro);
  font-family: var(--pk-font-title);
  font-size: var(--pk-size-h4);
  line-height: var(--pk-line-height-titoli);
}

.pk-consent-text {
  margin: 0;
}

.pk-consent-text a {
  color: var(--pk-color-blu-inchiostro);
  text-decoration-color: var(--pk-color-corallo-pragma);
}

.pk-consent-x {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--pk-color-blu-inchiostro);
  border-radius: 999px;
  background: var(--pk-color-bianco);
  color: var(--pk-color-blu-inchiostro);
  font-family: var(--pk-font-body);
  font-size: var(--pk-size-lead);
  line-height: 1;
  cursor: pointer;
}

/* Accetta e Rifiuta: stessa classe = stesso aspetto e peso. */
.pk-consent-btn,
.pk-consent-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--pk-color-blu-inchiostro);
  border-radius: 999px;
  font-family: var(--pk-font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.pk-consent-btn {
  background: var(--pk-color-lime-spunta);
  color: var(--pk-color-blu-inchiostro);
}

.pk-consent-btn-outline {
  background: transparent;
  color: var(--pk-color-blu-inchiostro);
}

.pk-consent-btn:hover,
.pk-consent-btn-outline:hover {
  filter: brightness(0.95);
}

.pk-consent-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pk-consent-panel {
  box-sizing: border-box;
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem;
  border: 2px solid var(--pk-color-blu-inchiostro);
  border-radius: 1rem;
  background: var(--pk-color-bianco);
}

.pk-consent-panel-title {
  margin: 0;
  color: var(--pk-color-blu-inchiostro);
  font-family: var(--pk-font-title);
  font-size: var(--pk-size-h4);
  line-height: var(--pk-line-height-titoli);
}

.pk-consent-panel-lead {
  margin: 0;
}

.pk-consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem;
}

.pk-consent-check {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.1rem 0 0;
  accent-color: var(--pk-color-corallo-scuro-testo);
  cursor: pointer;
}

.pk-consent-check:disabled {
  cursor: not-allowed;
}

.pk-consent-row-title {
  display: block;
  font-weight: 600;
  cursor: pointer;
}

.pk-consent-row-desc {
  margin: 0.25rem 0 0;
  font-size: var(--pk-size-small);
  line-height: var(--pk-line-height-testi);
}

.pk-consent-panel-actions {
  display: flex;
  justify-content: flex-start;
}

.pk-consent-panel-actions .pk-consent-btn {
  width: auto;
}

.pk-consent button:focus-visible,
.pk-consent a:focus-visible,
.pk-consent input:focus-visible,
.pk-consent-reopen:focus-visible {
  outline: 3px solid var(--pk-color-blu-inchiostro);
  outline-offset: 2px;
}

/* Bottone nel footer: aspetto di link. */
.pk-consent-reopen {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0.25rem 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (min-width: 768px) {
  .pk-consent-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .pk-consent-btn,
  .pk-consent-btn-outline {
    width: auto;
    min-width: 11rem;
  }
}

@keyframes pk-consent-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pk-consent:not([hidden]) {
    animation: pk-consent-in 180ms ease-out both;
  }
}
