/* Consent banner, preferences pane, toasts and loading skeletons.
   Uses the design tokens defined in site.css. */

/* ---------- consent banner ---------- */
.giq-consent {
  position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 16px;
  max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: 16px;
  background: var(--panel-solid); color: var(--text-2);
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
  font-size: 14px; line-height: 1.5;
  opacity: 0; transform: translateY(16px);
  transition: opacity .35s ease, transform .35s ease;
}
.giq-consent.in { opacity: 1; transform: none; }
.giq-consent p { flex: 1 1 320px; margin: 0; }
.giq-consent b { color: var(--text); }
.giq-consent a, .giq-prefs a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.giq-consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 520px) {
  .giq-consent { left: 12px; right: 12px; bottom: 12px; }
  .giq-consent-actions { width: 100%; }
  .giq-consent-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- preferences pane ---------- */
.giq-prefs {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center; padding: 16px;
  background: rgba(2, 6, 18, .62); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease;
}
.giq-prefs[hidden] { display: none; }
.giq-prefs.open { opacity: 1; }
.giq-prefs-box {
  position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto;
  padding: 28px; border-radius: 20px;
  background: var(--panel-solid); color: var(--text-2);
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.giq-prefs h2 { margin: 0 0 6px; color: var(--text); font-size: 22px; letter-spacing: -.01em; }
.giq-prefs-lead { margin: 0 0 18px; font-size: 14px; }
.giq-prefs-x {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--tint); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer;
}
.giq-pref {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; cursor: default;
}
label.giq-pref { cursor: pointer; }
.giq-pref b { display: block; color: var(--text); margin-bottom: 2px; }
.giq-pref span { display: block; }
.giq-pref-note { margin-top: 6px; color: var(--warn); }
.giq-pref-fixed { flex: none; font-size: 12px; color: var(--ok); white-space: nowrap; padding-top: 2px; }
.giq-pref input[type="checkbox"] {
  flex: none; appearance: none; -webkit-appearance: none; margin: 2px 0 0;
  width: 42px; height: 24px; border-radius: 999px; position: relative; cursor: pointer;
  background: var(--tint-2); border: 1px solid var(--line-2); transition: background .2s ease;
}
.giq-pref input[type="checkbox"]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-3); transition: transform .2s ease, background .2s ease;
}
.giq-pref input[type="checkbox"]:checked { background: var(--brand); border-color: var(--brand-hi); }
.giq-pref input[type="checkbox"]:checked::after { transform: translateX(18px); background: #fff; }
.giq-pref input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }
.giq-pref input[type="checkbox"]:focus-visible, .giq-prefs-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.giq-prefs-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.giq-prefs-foot { margin: 16px 0 0; font-size: 13px; }

/* ---------- toasts ---------- */
.giq-toasts {
  position: fixed; z-index: 100; top: 16px; right: 16px; left: 16px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none;
}
.giq-toast {
  max-width: 380px; padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.45;
  background: var(--panel-solid); color: var(--text); border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-8px); transition: opacity .3s ease, transform .3s ease;
}
.giq-toast.ok { border-left-color: var(--ok); }
.giq-toast.err { border-left-color: var(--bad); }
.giq-toast.in { opacity: 1; transform: none; }

/* ---------- loading skeleton (pricing) ---------- */
.giq-skel {
  display: inline-block; width: 140px; height: 34px; border-radius: 8px; vertical-align: middle;
  background: linear-gradient(90deg, var(--tint) 0%, var(--tint-2) 50%, var(--tint) 100%);
  background-size: 200% 100%; animation: giq-skel 1.4s ease-in-out infinite;
}
.giq-skel.sm { width: 220px; height: 14px; }
@keyframes giq-skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- visually hidden + inline links + breadcrumbs ---------- */
.giq-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.price-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.giq-crumbs { font-size: 13px; color: var(--text-3); margin: 0 0 14px; }
.giq-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.giq-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--text-3); }
.giq-crumbs a { color: var(--text-2); text-decoration: none; }
.giq-crumbs a:hover { color: var(--text); text-decoration: underline; }
.giq-crumbs [aria-current] { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .giq-consent, .giq-prefs, .giq-toast { transition: none; }
  .giq-skel { animation: none; }
}
