/* Shared consent, cookie controls and legal microcopy for Shpagin AI. */
:root {
  --privacy-cream: var(--cream, #f1f0ea);
  --privacy-cream-2: var(--cream-2, #e8e7df);
  --privacy-ink: var(--ink, #0b0b0c);
  --privacy-muted: var(--muted, #5c5c58);
  --privacy-blue: var(--blue, #1d2bff);
  --privacy-lime: var(--lime, #c8f135);
}

.privacy-banner,
.privacy-panel,
.privacy-fab {
  font-family: "Archivo", Arial, sans-serif;
}

.privacy-banner[hidden],
.privacy-layer[hidden],
.privacy-fab[hidden] {
  display: none !important;
}

.privacy-banner {
  position: fixed;
  z-index: 940;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(380px, calc(100vw - 32px));
  padding: 16px;
  color: var(--privacy-ink);
  background: var(--privacy-cream);
  border: 1px solid rgba(11, 11, 12, 0.24);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(11, 11, 12, 0.12);
  animation: privacy-enter 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.privacy-banner h2 {
  margin: 0;
  color: var(--privacy-ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.privacy-banner p {
  margin: 5px 0 0;
  color: var(--privacy-muted);
  font-size: 13px;
  font-weight: 520;
  line-height: 1.52;
}

.privacy-banner a,
.privacy-panel a {
  color: var(--privacy-blue);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.privacy-banner__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.privacy-btn,
.privacy-link-btn {
  min-height: 44px;
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease,
    border-color 180ms ease;
}

.privacy-btn {
  padding: 10px 14px;
  border: 1.5px solid var(--privacy-ink);
  color: var(--privacy-ink);
  background: #fff;
}

.privacy-btn--primary {
  background: var(--privacy-lime);
}

.privacy-btn:hover {
  transform: translateY(-1px);
  background: var(--privacy-ink);
  color: var(--privacy-cream);
}

.privacy-link-btn {
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  color: var(--privacy-muted);
  background: transparent;
}

.privacy-link-btn:hover {
  color: var(--privacy-blue);
}

.privacy-fab {
  position: fixed;
  z-index: 850;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  min-width: 82px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1.5px solid rgba(11, 11, 12, 0.32);
  border-radius: 999px;
  color: var(--privacy-ink);
  background: rgba(241, 240, 234, 0.94);
  box-shadow: 0 7px 22px rgba(11, 11, 12, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.035em;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.privacy-fab:hover {
  transform: translateY(-2px);
  background: #fff;
}

.privacy-layer {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 11, 12, 0.56);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: privacy-fade 180ms ease both;
}

.privacy-panel {
  width: min(520px, 100%);
  max-height: min(680px, calc(100dvh - 40px));
  overflow: auto;
  padding: 26px;
  color: var(--privacy-ink);
  background: var(--privacy-cream);
  border: 1.5px solid var(--privacy-ink);
  border-radius: 24px;
  box-shadow: 10px 12px 0 rgba(11, 11, 12, 0.96);
  animation: privacy-panel-enter 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.privacy-panel__head {
  display: flex;
  gap: 18px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 21px;
}

.privacy-panel__eyebrow {
  margin: 0 0 7px;
  color: var(--privacy-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.privacy-panel h2 {
  margin: 0;
  font-size: clamp(25px, 5vw, 34px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.privacy-panel__close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: var(--privacy-ink);
  background: var(--privacy-cream-2);
  font-size: 22px;
  cursor: pointer;
}

.privacy-panel__intro {
  margin: 0 0 20px;
  color: var(--privacy-muted);
  font-size: 14px;
  font-weight: 520;
  line-height: 1.55;
}

.privacy-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-top: 1.5px solid rgba(11, 11, 12, 0.13);
}

.privacy-option h3 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.privacy-option p {
  margin: 0;
  color: var(--privacy-muted);
  font-size: 12.5px;
  font-weight: 520;
  line-height: 1.48;
}

.privacy-option__status {
  color: var(--privacy-blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.privacy-switch {
  position: relative;
  width: 54px;
  height: 44px;
  display: inline-flex;
  flex: 0 0 auto;
}

.privacy-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.privacy-switch span {
  position: absolute;
  inset: 6px 0;
  border: 1.5px solid rgba(11, 11, 12, 0.34);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition: background 190ms ease, border-color 190ms ease;
}

.privacy-switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--privacy-ink);
  transition: transform 190ms cubic-bezier(0.22, 1, 0.36, 1), background 190ms ease;
}

.privacy-switch input:checked + span {
  border-color: var(--privacy-blue);
  background: var(--privacy-blue);
}

.privacy-switch input:checked + span::after {
  transform: translateX(22px);
  background: #fff;
}

.privacy-switch input:focus-visible + span,
.privacy-btn:focus-visible,
.privacy-link-btn:focus-visible,
.privacy-fab:focus-visible,
.privacy-panel__close:focus-visible {
  outline: 3px solid var(--privacy-blue);
  outline-offset: 3px;
}

.privacy-panel__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 22px;
}

.privacy-panel__foot {
  margin: 15px 0 0;
  color: var(--privacy-muted);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}

.privacy-live {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Explicit, separate consent next to lead forms. */
.legal-consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  margin: 11px 0 2px;
  padding: 4px 2px;
  color: var(--privacy-muted);
  font-size: 11.75px;
  font-weight: 560;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
}

.legal-consent input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--privacy-blue);
  cursor: pointer;
}

.legal-consent input:focus-visible {
  outline: 3px solid var(--privacy-blue);
  outline-offset: 2px;
}

.legal-consent a,
.legal-privacy-note a {
  color: inherit;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.legal-consent a:hover,
.legal-privacy-note a:hover {
  color: var(--privacy-blue);
}

.legal-consent--dark,
.legal-privacy-note--dark {
  color: rgba(255, 255, 255, 0.76);
}

.legal-consent--dark input {
  accent-color: var(--privacy-lime);
}

.legal-consent--dark a:hover,
.legal-privacy-note--dark a:hover {
  color: var(--privacy-lime);
}

.legal-privacy-note {
  margin: 5px 0 0;
  color: var(--privacy-muted);
  font-size: 10.75px;
  font-weight: 520;
  line-height: 1.45;
  text-align: center;
}

.lead-reference {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  color: var(--privacy-ink);
  background: var(--privacy-lime);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.035em;
}
.lead-reference[hidden] { display: none; }
.legal-privacy-note--dark { color: rgba(255,255,255,.76); }
body.privacy-modal-open { overflow: hidden; }
body.privacy-footer-visible .privacy-fab { visibility: hidden; }
body.privacy-inline-form-visible .privacy-fab { visibility: hidden; }
body.privacy-form-open .privacy-banner,
body.privacy-form-open .privacy-fab { display: none !important; }
body .cm-err, body .pm-err { color: #ad2929; }
body .cm-input::placeholder, body .pm-input::placeholder,
body .oform .o-contact::placeholder { color: #686864; opacity: 1; }
body footer .fine { color: rgba(241,240,234,.68); }
body footer .fine a { color: rgba(241,240,234,.85); }

.offer-legal-note {
  max-width: 760px;
  margin: 18px auto 0;
  color: var(--privacy-muted);
  font-size: 12px;
  font-weight: 540;
  line-height: 1.55;
  text-align: center;
  text-wrap: balance;
}

.legal-footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  justify-content: center;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.privacy-notice-open .fcta,
body.privacy-footer-visible .fcta,
body.privacy-modal-open .fcta {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.site-operator {
  max-width: 1180px;
  margin: 24px auto 0;
  padding-inline: 24px;
  color: inherit;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  overflow-wrap: anywhere;
}
.site-operator span { display: block; }

/* Shared responsive safety for the main site's public pages. */
h1, h2, h3 { text-wrap: balance; }
.legal-footer-links, .doc-footer__links { min-width: 0; }
@media (max-width: 560px) {
  .site-operator { padding-inline: 20px; font-size: 12px; }
  .cm-field input, .cm-field textarea,
  .pm-field input, .pm-field textarea,
  .offer-card input, .offer-card textarea { font-size: 16px; }
}

@keyframes privacy-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes privacy-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes privacy-panel-enter {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .privacy-banner {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-height: calc(100dvh - 20px);
    overflow: auto;
    padding: 16px;
    border-radius: 16px;
  }

  .privacy-btn { padding-inline: 10px; font-size: 11.75px; }

  .privacy-layer {
    align-items: end;
    padding: 0;
  }

  .privacy-panel {
    width: 100%;
    max-height: 92dvh;
    padding: 22px 18px max(26px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 34px rgba(11, 11, 12, 0.2);
  }

  .privacy-panel__actions { grid-template-columns: 1fr; }
  .legal-consent { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .privacy-banner,
  .privacy-layer,
  .privacy-panel {
    animation: none !important;
  }

  .privacy-btn,
  .privacy-link-btn,
  .privacy-fab,
  .privacy-switch span,
  .privacy-switch span::after {
    transition: none !important;
  }
}
