/* PerkMedia consent banner.
 * Brand-tokenised per site: --pkx-accent, --pkx-accent-soft, --pkx-ink.
 */
#pkx-consent-root {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
#pkx-consent-root.pkx-consent-ready {
  opacity: 1;
  pointer-events: auto;
}
#pkx-consent-root.pkx-consent-hidden {
  opacity: 0;
  pointer-events: none;
}

.pkx-consent-panel {
  width: min(760px, 100%);
  background: var(--pkx-card, #ffffff);
  color: var(--pkx-ink, #1a1208);
  border: 1px solid var(--pkx-border, #e6e3f0);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(10, 8, 24, .18);
  padding: 22px 24px;
  max-height: min(86vh, 720px);
  overflow-y: auto;
}

.pkx-consent-head { margin-bottom: 16px; }
.pkx-consent-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--pkx-ink, #1a1208);
}
.pkx-consent-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--pkx-muted, #5d5872);
}

.pkx-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.pkx-btn {
  appearance: none;
  border: 1px solid var(--pkx-border, #e6e3f0);
  background: transparent;
  color: var(--pkx-ink, #1a1208);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pkx-btn:hover { background: var(--pkx-accent-soft, rgba(255,90,31,0.10)); }
.pkx-btn-accept {
  background: var(--pkx-accent, #ff5a1f);
  border-color: var(--pkx-accent, #ff5a1f);
  color: #fff;
}
.pkx-btn-accept:hover { filter: brightness(1.06); background: var(--pkx-accent, #ff5a1f); }
.pkx-btn-reject { background: var(--pkx-ink, #1a1208); border-color: var(--pkx-ink, #1a1208); color: #fff; }
.pkx-btn-reject:hover { background: var(--pkx-ink, #1a1208); filter: brightness(1.15); }
.pkx-btn-prefs, .pkx-btn-back {
  background: transparent;
  color: var(--pkx-muted, #5d5872);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pkx-consent-prefs { margin-top: 4px; }
.pkx-consent-list { list-style: none; margin: 14px 0 0; padding: 0; }
.pkx-consent-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--pkx-border, #e6e3f0);
}
.pkx-consent-label { display: block; }
.pkx-consent-name { display: block; font-size: 14px; font-weight: 650; color: var(--pkx-ink, #1a1208); }
.pkx-consent-desc { display: block; font-size: 13px; line-height: 1.5; color: var(--pkx-muted, #5d5872); margin-top: 3px; }

.pkx-switch { position: relative; display: inline-block; flex: 0 0 auto; margin-top: 2px; }
.pkx-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.pkx-switch-track {
  display: block; width: 42px; height: 24px; border-radius: 999px;
  background: #d6d3e2; transition: background .18s ease; position: relative;
}
.pkx-switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .18s ease; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.pkx-switch input:checked + .pkx-switch-track { background: var(--pkx-accent, #ff5a1f); }
.pkx-switch input:checked + .pkx-switch-track::after { transform: translateX(18px); }
.pkx-switch input:focus-visible + .pkx-switch-track {
  outline: 2px solid var(--pkx-accent, #ff5a1f); outline-offset: 2px;
}

.pkx-consent-legal { margin: 14px 0 0; font-size: 12px; color: var(--pkx-muted, #5d5872); }
.pkx-consent-legal a { color: var(--pkx-accent, #ff5a1f); }

/* Footer "Cookie settings" control. It sits in a line of text links, so
 * it is styled to match them exactly: same size, same colour, same
 * underline. A button that looks like a button in a list of links reads
 * as a mistake. */
.pkx-footer-consent {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pkx-footer-consent:hover { color: var(--pkx-accent, #ff5a1f); }
.pkx-footer-consent:focus-visible {
  outline: 2px solid var(--pkx-accent, #ff5a1f);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (max-width: 560px) {
  .pkx-consent-panel { padding: 18px 16px; border-radius: 12px; }
  .pkx-consent-actions .pkx-btn { flex: 1 1 auto; text-align: center; }
}

/* ── mobile: the banner was eating the first screen ──────────────
   At 390px it covered roughly a third of the viewport and sat on top of
   the open navigation drawer (9999 vs the menu's 2000), so the lower menu
   links were unreachable until the banner was dismissed. Compact the panel
   and let the drawer have the screen while it is open. */
@media (max-width: 560px) {
  #pkx-consent-root { padding: 8px; }
  .pkx-consent-panel {
    padding: 14px 14px 12px;
    border-radius: 14px;
    max-height: min(66vh, 460px);
  }
  .pkx-consent-head { margin-bottom: 10px; }
  .pkx-consent-title { font-size: 15.5px; margin-bottom: 4px; }
  .pkx-consent-text { font-size: 13px; line-height: 1.45; }
  .pkx-consent-actions { gap: 8px; margin-top: 12px; }
  .pkx-consent-actions .pkx-btn { padding: 11px 12px; font-size: 13.5px; }
}

body.sml-open #pkx-consent-root {
  opacity: 0;
  pointer-events: none;
}
