/* Privacy: consent banner, embed placeholders, form notice, affiliate disclosure and footer legal links.
   Loaded on every layout, including the home page, which does not load liquid-glass.css. */
.sj-consent[hidden],
.sj-consent [hidden] {
  display: none !important;
}

.sj-consent {
  position: fixed;
  /* Above Ghost Portal's floating trigger (z-index 3999999), which sits bottom-right. */
  z-index: 4000000;
  right: 16px;
  bottom: 16px;
  left: 16px;
  max-width: 560px;
  margin-right: auto;
  padding: 20px 22px;
  color: var(--text-color-main);
  background: color-mix(in srgb, var(--card-background-color, #ffffff) 86%, transparent);
  /* The plate is translucent; blur what scrolls underneath so the text stays legible. */
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-16, 16px);
  box-shadow: 0 18px 48px rgba(16, 24, 48, 0.22);
}

.sj-consent__title {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.sj-consent__text {
  margin: 0 0 12px;
  font-size: 0.875rem;
  line-height: 1.55;
}

.sj-consent__text a,
.sj-privacy-notice a,
.sj-legal-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sj-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* Reject and Accept share one style so neither choice is visually favored. */
.sj-consent__btn {
  min-width: 120px;
  flex: 1 1 120px;
  font-weight: 700;
}

.sj-consent__btn:focus-visible,
.sj-embed-consent:focus-visible {
  outline: 3px solid var(--theme-color, #3c00ff);
  outline-offset: 2px;
}

/* Until consent, TikTok and Reddit embeds stay as their plain quote plus this button. */
.sj-embed-consent {
  display: flex;
  margin: 8px auto 24px;
  font-weight: 700;
}

.sj-privacy-notice {
  flex-basis: 100%;
  width: 100%;
  margin: 10px 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: left;
  color: inherit;
}

.hero-subscription-form {
  flex-wrap: wrap;
}

/* Outside the home page the newsletter card is a dark blue-green gradient in both color modes. */
body.liquid-glass-theme:not(.home-template) .esub-form-wrap .sj-privacy-notice {
  color: #ffffff;
}

.sj-affiliate-disclosure {
  margin: 0 0 1.5rem;
  padding: 10px 14px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-color-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-8, 8px);
}

.post-content-area:not(:has(a[href*="amazon."], a[href*="amzn.to"], a[rel~="sponsored"])) .sj-affiliate-disclosure {
  display: none;
}

.sj-legal-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-left: 14px;
}

.sj-footer-disclosure {
  margin: 6px 0 0;
  font-size: 0.8125rem;
}

@media (max-width: 600px) {
  .sj-consent {
    right: 12px;
    bottom: 12px;
    left: 12px;
    padding: 16px;
  }

  .sj-legal-links {
    display: flex;
    justify-content: center;
    margin: 8px 0 0;
  }

  /* The legal links widen .copyright, so center its text to match the stacked footer. */
  .copyright,
  .sj-footer-disclosure {
    text-align: center;
  }
}

@media print {
  .sj-consent,
  .sj-embed-consent {
    display: none !important;
  }
}
