/* ============================================================
   Physical Formula, cookie consent banner.
   Self-injected by cookies.js. Two-state UI:
     - banner: bottom-left bar with Accept / Reject / Manage
     - modal:  centred preferences dialog with category toggles
   Brand styling, no shadows, no gradients, rounded surfaces.
   ============================================================ */

.pf-cookie {
  position: fixed;
  left: clamp(16px, 2vw, 32px);
  bottom: clamp(16px, 2vw, 32px);
  right: clamp(16px, 2vw, 32px);
  max-width: 520px;
  background: #0A0A0A;
  color: #F4F2EE;
  border-radius: 18px;
  padding: 26px 28px;
  z-index: 9998;
  font-family: 'Inter', system-ui, sans-serif;
  transform: translateY(140%);
  opacity: 0;
  transition: transform .6s cubic-bezier(.22,1,.36,1), opacity .4s ease;
  pointer-events: none;
}
.pf-cookie.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pf-cookie__title {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #F4F2EE;
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.pf-cookie__title::before {
  content: '';
  width: 28px;
  height: 1px;
  background: rgba(244,242,238,0.45);
}

.pf-cookie__body {
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(244,242,238,0.78);
  margin: 0 0 22px;
}
.pf-cookie__body a {
  color: #F4F2EE;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(244,242,238,0.35);
  transition: text-decoration-color .25s ease;
}
.pf-cookie__body a:hover {
  text-decoration-color: #F4F2EE;
}

.pf-cookie__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pf-cookie__btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.pf-cookie__btn--primary {
  background: #F4F2EE;
  color: #0A0A0A;
}
.pf-cookie__btn--primary:hover {
  background: #FFFFFF;
  transform: translateY(-1px);
}
.pf-cookie__btn--ghost {
  background: transparent;
  color: #F4F2EE;
  border-color: rgba(244,242,238,0.28);
}
.pf-cookie__btn--ghost:hover {
  border-color: #F4F2EE;
  background: rgba(244,242,238,0.06);
}
.pf-cookie__btn--text {
  background: transparent;
  color: rgba(244,242,238,0.75);
  padding-left: 12px;
  padding-right: 12px;
}
.pf-cookie__btn--text:hover {
  color: #F4F2EE;
}

/* ====================== Preferences modal ====================== */
.pf-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px);
  background: rgba(10,10,10,0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.pf-cookie-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pf-cookie-modal__panel {
  background: #F4F2EE;
  color: #0A0A0A;
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  max-height: min(86vh, 720px);
  overflow-y: auto;
  padding: clamp(28px, 3.5vw, 44px);
  transform: translateY(16px);
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.pf-cookie-modal.is-open .pf-cookie-modal__panel {
  transform: translateY(0);
}

.pf-cookie-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 8px;
}
.pf-cookie-modal__title {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: uppercase;
  margin: 0;
}
.pf-cookie-modal__close {
  background: transparent;
  border: 1px solid rgba(10,10,10,0.18);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 16px;
  color: #0A0A0A;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .25s ease, border-color .25s ease;
}
.pf-cookie-modal__close:hover {
  background: #0A0A0A;
  color: #F4F2EE;
}

.pf-cookie-modal__intro {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(10,10,10,0.65);
  margin: 0 0 24px;
}

.pf-cookie-cat {
  border-top: 1px solid rgba(10,10,10,0.10);
  padding: 18px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
}
.pf-cookie-cat:last-of-type { border-bottom: 1px solid rgba(10,10,10,0.10); }
.pf-cookie-cat__head {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #0A0A0A;
  margin: 0 0 6px;
}
.pf-cookie-cat__copy {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(10,10,10,0.62);
  margin: 0;
}

/* Toggle switch */
.pf-cookie-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.pf-cookie-toggle input {
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  position: absolute;
  inset: 0;
  z-index: 2;
}
.pf-cookie-toggle__track {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.18);
  border-radius: 999px;
  transition: background .25s ease;
}
.pf-cookie-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: transform .25s ease;
}
.pf-cookie-toggle input:checked ~ .pf-cookie-toggle__track {
  background: #0A0A0A;
}
.pf-cookie-toggle input:checked ~ .pf-cookie-toggle__track::after {
  transform: translateX(18px);
}
.pf-cookie-toggle input:disabled ~ .pf-cookie-toggle__track {
  background: rgba(10,10,10,0.7);
  cursor: not-allowed;
}

.pf-cookie-modal__actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.pf-cookie-modal__actions .pf-cookie__btn--primary {
  background: #0A0A0A;
  color: #F4F2EE;
}
.pf-cookie-modal__actions .pf-cookie__btn--primary:hover {
  background: #1A1A1A;
}
.pf-cookie-modal__actions .pf-cookie__btn--ghost {
  color: #0A0A0A;
  border-color: rgba(10,10,10,0.22);
}
.pf-cookie-modal__actions .pf-cookie__btn--ghost:hover {
  border-color: #0A0A0A;
  background: rgba(10,10,10,0.05);
}

/* Small "manage cookies" floating link, appears for users who already chose. */
.pf-cookie-settings-link {
  position: fixed;
  left: 16px;
  bottom: 14px;
  z-index: 90;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(10,10,10,0.45);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  transition: color .25s ease;
  opacity: 0;
  pointer-events: none;
}
.pf-cookie-settings-link.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.pf-cookie-settings-link:hover { color: #0A0A0A; }
body.pf-dark-bg .pf-cookie-settings-link { color: rgba(244,242,238,0.55); }
body.pf-dark-bg .pf-cookie-settings-link:hover { color: #F4F2EE; }

/* Mobile, banner becomes full-width strip */
@media (max-width: 560px) {
  .pf-cookie {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 22px 22px;
    max-width: none;
  }
  .pf-cookie__actions { gap: 8px; }
  .pf-cookie__btn { padding: 12px 18px; font-size: 10.5px; letter-spacing: 0.2em; flex: 1 1 auto; }
  .pf-cookie__btn--text { flex: 1 1 100%; order: 3; }
  .pf-cookie-settings-link { left: 12px; bottom: 8px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pf-cookie, .pf-cookie-modal, .pf-cookie-modal__panel { transition: none; }
}

/* Print, hide everything */
@media print {
  .pf-cookie, .pf-cookie-modal, .pf-cookie-settings-link { display: none !important; }
}
