/* PH Consent 1.1.1 — styled to the PixelHardwares theme (--phx-* tokens, with fallbacks) */
.phc-banner[hidden], .phc-modal[hidden], .phc-banner [hidden], .phc-modal [hidden] { display: none !important; }

.phc-banner, .phc-modal {
  --phc-blue: var(--phx-blue-600, #2563EB);
  --phc-blue-hover: var(--phx-blue-700, #1D4ED8);
  --phc-blue-50: var(--phx-blue-50, #EFF6FF);
  --phc-cyan: var(--phx-cyan, #22D3EE);
  --phc-navy: var(--phx-navy-900, #0A1633);
  --phc-navy-2: var(--phx-navy-800, #0F2150);
  --phc-navy-3: var(--phx-navy-950, #050B1F);
  --phc-ink: var(--phx-ink, #0B1324);
  --phc-text: var(--phx-text, #334155);
  --phc-mute: var(--phx-mute, #64748B);
  --phc-line: var(--phx-line, #E2E8F0);
  --phc-panel: var(--phx-panel, #F6F8FC);
  --phc-ok: var(--phx-ok, #15803D);
  --phc-r-sm: var(--phx-r-sm, 10px);
  --phc-r: var(--phx-r, 16px);
  --phc-r-lg: var(--phx-r-lg, 22px);
  --phc-ease: var(--phx-ease, cubic-bezier(.2, .7, .2, 1));
  --phc-body: var(--phx-body, Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --phc-head: var(--phx-head, "Plus Jakarta Sans", Inter, system-ui, sans-serif);
  font-family: var(--phc-body);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.phc-banner *, .phc-modal * { box-sizing: border-box; }

/* ---------- Banner (bottom-left floating card) ---------- */
.phc-banner {
  position: fixed; left: 24px; bottom: 24px; z-index: 2147483000;
  width: 440px; max-width: calc(100vw - 32px);
  padding: 22px 22px 18px;
  color: #CBD5E1;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(34, 211, 238, .16) 0%, rgba(34, 211, 238, 0) 55%),
    linear-gradient(160deg, var(--phc-navy-2) 0%, var(--phc-navy) 55%, var(--phc-navy-3) 100%);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--phc-r-lg);
  box-shadow: 0 2px 6px rgba(5, 11, 31, .25), 0 28px 60px rgba(5, 11, 31, .45);
  font-size: 14px; line-height: 1.55;
  animation: phc-in .45s var(--phc-ease) both;
}
/* Transform-only entrance: never starts at opacity 0, so the banner stays a valid LCP candidate (PageSpeed). */
@keyframes phc-in { from { transform: translateY(14px); } to { transform: none; } }

.phc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.phc-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(34, 211, 238, .12); color: var(--phc-cyan);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .25);
}
.phc-icon svg { width: 22px; height: 22px; }
.phc-title { font-family: var(--phc-head); font-weight: 800; font-size: 17px; letter-spacing: -.01em; color: #fff; }
.phc-text { margin: 0; color: #CBD5E1; }
.phc-links { margin-top: 8px; font-size: 13px; }
.phc-banner a { color: #93C5FD; text-decoration: none; border-bottom: 1px solid rgba(147, 197, 253, .35); transition: color .2s, border-color .2s; }
.phc-banner a:hover { color: #fff; border-bottom-color: #fff; }
.phc-dot { color: rgba(255, 255, 255, .3); margin: 0 6px; }

.phc-gpc-line {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 8px 11px; border-radius: var(--phc-r-sm);
  background: rgba(34, 197, 94, .12); color: #86EFAC; font-size: 12.5px;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .25);
}

/* ---------- Buttons ---------- */
.phc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.phc-btn {
  appearance: none; border: 0; cursor: pointer; margin: 0;
  height: 44px; padding: 0 18px; border-radius: 12px;
  font: 600 14.5px/1 var(--phc-body); letter-spacing: .005em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color .2s var(--phc-ease), color .2s, box-shadow .2s, transform .15s var(--phc-ease);
}
.phc-btn:active { transform: translateY(1px); }
.phc-btn:focus-visible { outline: 3px solid rgba(34, 211, 238, .55); outline-offset: 2px; }

.phc-primary { background: var(--phc-blue); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .35); }
.phc-primary:hover { background: var(--phc-blue-hover); }

/* Same weight as primary on purpose (equal-prominence choices) */
.phc-banner .phc-secondary { background: #fff; color: var(--phc-ink); }
.phc-banner .phc-secondary:hover { background: #E2E8F0; }

.phc-linkbtn {
  grid-column: 1 / -1; justify-self: center;
  appearance: none; background: none; border: 0; cursor: pointer; padding: 6px 8px; margin-top: 2px;
  font: 500 13.5px/1.2 var(--phc-body); color: #93C5FD;
  display: inline-flex; align-items: center; gap: 6px; border-radius: 8px;
}
.phc-linkbtn:hover { color: #fff; }
.phc-linkbtn:focus-visible { outline: 3px solid rgba(34, 211, 238, .55); }
.phc-linkbtn svg { width: 15px; height: 15px; }

/* ---------- Preferences modal ---------- */
.phc-modal {
  position: fixed; inset: 0; z-index: 2147483001;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(5, 11, 31, .58);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: phc-fade .25s ease both;
}
@keyframes phc-fade { from { background-color: rgba(5, 11, 31, 0); } to { background-color: rgba(5, 11, 31, .58); } }

.phc-box {
  width: 100%; max-width: 560px; max-height: min(90vh, 760px); overflow: auto;
  background: #fff; color: var(--phc-text);
  border-radius: var(--phc-r-lg);
  box-shadow: 0 2px 6px rgba(11, 19, 36, .06), 0 24px 48px rgba(11, 19, 36, .14), 0 40px 90px rgba(5, 11, 31, .35);
  font-size: 14px; line-height: 1.55;
  animation: phc-in .35s var(--phc-ease) both;
}
.phc-box-head {
  position: relative; padding: 24px 24px 18px;
  background: linear-gradient(160deg, var(--phc-navy-2), var(--phc-navy));
  color: #CBD5E1; border-radius: var(--phc-r-lg) var(--phc-r-lg) 0 0;
}
.phc-box-head h3 { margin: 0 0 4px; font: 800 20px/1.25 var(--phc-head); letter-spacing: -.01em; color: #fff; }
.phc-box-head p { margin: 0; font-size: 13.5px; color: #CBD5E1; }
.phc-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 10px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center;
  transition: background .2s;
}
.phc-close:hover { background: rgba(255, 255, 255, .16); }
.phc-close:focus-visible { outline: 3px solid rgba(34, 211, 238, .55); }
.phc-close svg { width: 16px; height: 16px; }

.phc-body { padding: 18px 24px 8px; }
.phc-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 0 14px; padding: 11px 13px; border-radius: 12px;
  background: #ECFDF3; color: #14532D; font-size: 13px;
  box-shadow: inset 0 0 0 1px #BBF7D0;
}
.phc-note svg { flex: none; width: 18px; height: 18px; color: var(--phc-ok); margin-top: 1px; }

.phc-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 16px; margin-bottom: 10px;
  background: var(--phc-panel); border: 1px solid var(--phc-line); border-radius: var(--phc-r);
  transition: border-color .2s, background .2s;
}
.phc-row:hover { border-color: #CBD5E1; }
.phc-row-text { min-width: 0; }
.phc-row strong { display: block; margin-bottom: 2px; font: 700 14.5px/1.35 var(--phc-head); color: var(--phc-ink); }
.phc-row span.phc-desc { display: block; font-size: 13px; color: var(--phc-mute); }
.phc-pill {
  flex: none; padding: 5px 10px; border-radius: 999px;
  background: var(--phc-blue-50); color: var(--phc-blue); font: 600 12px/1 var(--phc-body);
}

/* Switch */
.phc-switch { position: relative; flex: none; width: 46px; height: 26px; cursor: pointer; }
.phc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.phc-slider {
  position: absolute; inset: 0; border-radius: 999px; background: #CBD5E1;
  transition: background .25s var(--phc-ease);
}
.phc-slider::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(11, 19, 36, .25);
  transition: transform .25s var(--phc-ease);
}
.phc-switch input:checked + .phc-slider { background: var(--phc-blue); }
.phc-switch input:checked + .phc-slider::after { transform: translateX(20px); }
.phc-switch input:focus-visible + .phc-slider { outline: 3px solid rgba(37, 99, 235, .4); outline-offset: 2px; }
.phc-switch input:disabled { cursor: not-allowed; }
.phc-switch input:disabled + .phc-slider { opacity: .5; }

.phc-small { margin: 6px 0 0; font-size: 12.5px; color: var(--phc-mute); }
.phc-small a, .phc-box-links a { color: var(--phc-blue); text-decoration: none; font-weight: 500; }
.phc-small a:hover, .phc-box-links a:hover { text-decoration: underline; }

.phc-foot {
  position: sticky; bottom: 0;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  padding: 16px 24px 20px; background: #fff; border-top: 1px solid var(--phc-line);
  border-radius: 0 0 var(--phc-r-lg) var(--phc-r-lg);
}
.phc-modal .phc-secondary { background: #fff; color: var(--phc-ink); box-shadow: inset 0 0 0 1px var(--phc-line); }
.phc-modal .phc-secondary:hover { background: var(--phc-panel); box-shadow: inset 0 0 0 1px #CBD5E1; }
.phc-modal .phc-dark { background: var(--phc-ink); color: #fff; }
.phc-modal .phc-dark:hover { background: var(--phc-navy-2); }

/* Floating "Your Privacy Choices" (only if no footer Cookie Policy link exists) */
.phc-float {
  position: fixed; left: 16px; bottom: 16px; z-index: 2147482999;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--phx-navy-900, #0A1633); color: #fff !important; text-decoration: none !important;
  font: 500 12.5px/1.2 var(--phx-body, Inter, system-ui, sans-serif);
  box-shadow: 0 8px 24px rgba(11, 19, 36, .25);
}

/* ---------- Mobile: bottom sheet ---------- */
@media (max-width: 560px) {
  .phc-banner {
    left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none;
    padding: 18px 16px 14px; border-radius: 20px;
  }
  .phc-title { font-size: 16px; }
  .phc-modal { align-items: flex-end; padding: 0; }
  .phc-box { max-height: 92vh; border-radius: 22px 22px 0 0; }
  .phc-box-head { padding: 20px 18px 16px; }
  .phc-body { padding: 16px 16px 6px; }
  .phc-foot { grid-template-columns: 1fr 1fr; padding: 14px 16px 18px; border-radius: 0; }
  .phc-foot .phc-dark { grid-column: 1 / -1; order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .phc-banner, .phc-box, .phc-modal { animation: none; }
  .phc-slider, .phc-slider::after, .phc-btn { transition: none; }
}
