/* Peka consent.css: the cookie choice, and the policy page's table and button.
   Glass card, hairline border, no radius, circles only. Accept and Reject look the same on purpose. */

.pk-consent {
  position: fixed; z-index: 1000; box-sizing: border-box;
  left: clamp(12px, 2.5vw, 32px); bottom: clamp(12px, 2.5vw, 32px);
  width: min(440px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow-y: auto;
  padding: 22px 22px 20px;
  background: rgba(10,10,10,.88);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--line2); color: var(--light); font-family: var(--sans);
  animation: pk-consent-in 520ms var(--ease-notice) both;
}
.pk-consent[hidden] { display: none; }
@keyframes pk-consent-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.pk-consent__mark { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; pointer-events: none; }
.pk-consent__mark circle { fill: none; stroke: var(--fg3); stroke-width: 1; }
.pk-consent__title { margin: 0 44px 10px 0; font: 800 1.375rem/1.15 var(--display); letter-spacing: -.025em; color: var(--light); }
.pk-consent__body { margin: 0 0 18px; font-size: .9375rem; line-height: 1.55; color: var(--fg2); }
.pk-consent__body a, .pk-consent__note a { color: var(--light); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 1px; }
.pk-consent__body a:hover { background-size: 100% 2px; }

.pk-consent__actions { display: grid; grid-template-columns: repeat(3, auto); gap: 8px; }
.pk-consent__btn {
  appearance: none; cursor: pointer; min-height: 44px; padding: 0 14px; border-radius: 0;
  font: 600 .875rem/1 var(--sans); white-space: nowrap;
  background: var(--light); color: var(--ink); border: 1px solid var(--light);
  transition: background-color 180ms var(--ease-notice), color 180ms var(--ease-notice), border-color 180ms var(--ease-notice);
}
.pk-consent__btn:hover { background: transparent; color: var(--light); }
.pk-consent__btn.is-ghost { background: transparent; color: var(--light); border-color: var(--line2); }
.pk-consent__btn.is-ghost:hover { border-color: var(--light); }
.pk-consent__btn:focus-visible, .pk-consent__back:focus-visible, .pk-consent a:focus-visible, .pk-consent input:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.pk-consent__back { margin: 14px 0 0; padding: 0; background: none; border: 0; color: var(--fg2); font: 500 .8125rem/1 var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pk-consent__back:hover { color: var(--light); }

.pk-consent__cats { list-style: none; margin: 14px 0 16px; padding: 0; display: grid; }
.pk-consent__cat { border-top: 1px solid var(--line-dark); }
.pk-consent__cat:last-child { border-bottom: 1px solid var(--line-dark); }
.pk-consent__cat label { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center; padding: 12px 0; cursor: pointer; }
.pk-consent__t { font: 600 .9375rem/1.3 var(--sans); color: var(--light); }
.pk-consent__d { grid-column: 1; font-size: .8125rem; line-height: 1.45; color: var(--fg2); }
.pk-consent__cat input { grid-column: 2; grid-row: 1 / span 2; }
.pk-consent__note { margin: 0 0 14px; font-size: .8125rem; line-height: 1.45; color: var(--fg2); }

/* switch, built on the native checkbox so it keeps its semantics */
.pk-consent input[type=checkbox] {
  appearance: none; -webkit-appearance: none; position: relative; width: 44px; height: 26px; margin: 0; flex: none;
  border: 1px solid var(--line2); background: transparent; border-radius: 13px; cursor: pointer;
  transition: background-color 180ms var(--ease-notice), border-color 180ms var(--ease-notice);
}
.pk-consent input[type=checkbox]::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--fg2);
  transition: transform 180ms var(--ease-notice), background-color 180ms var(--ease-notice);
}
.pk-consent input[type=checkbox]:checked { background: var(--light); border-color: var(--light); }
.pk-consent input[type=checkbox]:checked::before { transform: translateX(18px); background: var(--ink); }
.pk-consent input[type=checkbox]:disabled { opacity: .55; cursor: default; }

/* while it is open the bottom action bar steps aside */
body.pk-consent-open .peka-actbar { transform: translateY(160%) !important; pointer-events: none; }

@media (max-width: 767px) {
  .pk-consent { left: 8px; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding: 18px 16px 16px; }
  .pk-consent__actions { grid-template-columns: 1fr 1fr; }
  .pk-consent__actions .is-ghost, .pk-consent__actions [data-act=save] { grid-column: 1 / -1; }
  .pk-consent__actions [data-act=save] { order: -1; }
}
@media (prefers-reduced-motion: reduce) { .pk-consent { animation: none; } .pk-consent input[type=checkbox], .pk-consent input[type=checkbox]::before, .pk-consent__btn { transition: none; } }

/* footer: privacy link and cookie settings sit in the base row */
.pk-footer-legal { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.pk-footer-legal a, .pk-footer-legal button {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--fg2); letter-spacing: inherit;
  text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px; padding-bottom: 2px;
  transition: background-size 300ms var(--ease-notice), color 180ms var(--ease-notice);
}
.pk-footer-legal a:hover, .pk-footer-legal button:hover { color: var(--light); background-size: 100% 1px; }

/* policy page */
.pk-cookie-open {
  appearance: none; cursor: pointer; min-height: 48px; padding: 0 20px; border-radius: 0;
  background: transparent; color: var(--light); border: 1px solid var(--line2); font: 600 .9375rem/1 var(--sans);
  transition: background-color 180ms var(--ease-notice), color 180ms var(--ease-notice), border-color 180ms var(--ease-notice);
}
.pk-cookie-open:hover { background: var(--light); color: var(--ink); border-color: var(--light); }
.pk-cookie-open:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.pk-cookie-table { overflow-x: auto; margin: 1.25rem 0 1.75rem; }
.pk-cookie-table table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.45; min-width: 560px; }
.pk-cookie-table th { text-align: left; font: 500 .6875rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--fg3); padding: .6rem .75rem .6rem 0; border-bottom: 1px solid var(--line2); }
.pk-cookie-table td { padding: .7rem .75rem .7rem 0; border-bottom: 1px solid var(--line-dark); vertical-align: top; color: var(--fg2); }
.pk-cookie-table td code { font-size: .8125rem; color: var(--light); background: none; padding: 0; }
