/* Solavey extras — cookie consent (EU/GDPR) + floating crypto-donation + ticker +
   in-content image centering. Plain CSS, enqueued after app.css so it needs no
   Tailwind rebuild. Palette: black #f6f5f9, panel #ffffff, line #e8e8ed,
   signal yellow #7132f5, status green #3b9b4a. */

/* ---------------------------------------------------------------------------
 * In-content images — auto-center.
 * Tailwind preflight makes every <img> display:block, so a parent's
 * text-align:center never moves it; without horizontal auto margins a
 * narrower-than-column image sits flush left.
 * ------------------------------------------------------------------------- */
.prose-crx img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.prose-crx figure {
  text-align: center;
}
.prose-crx figure img,
.prose-crx figcaption {
  margin-left: auto;
  margin-right: auto;
}
/* Keep WordPress' explicit alignment classes working. */
.prose-crx img.alignleft,
.prose-crx .alignleft img {
  display: inline-block;
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
}
.prose-crx img.alignright,
.prose-crx .alignright img {
  display: inline-block;
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
}
/* Emoji-scale icons stay inline so text flow is not broken. */
.prose-crx p img[width="16"],
.prose-crx p img[width="20"],
.prose-crx p img[width="24"],
.prose-crx p img[width="32"] {
  display: inline-block;
  margin: 0 0.25rem;
  vertical-align: middle;
}

/* ---------- Lead image auto-inserted into the first paragraph ---------- */
.slv-lead-img {
  display: block;
  width: 100%;
  max-width: 780px;
  height: auto;
  margin: 1.9rem auto;
  border: 1px solid #e8e8ed;
  border-radius: 0.5rem;
}

/* ---------------------------------------------------------------------------
 * Top ticker — black strip, mono type, yellow signal.
 * Two identical <ul> tracks sit in a flex row; translating the track by -50%
 * lands copy #2 exactly where copy #1 started, so the loop has no seam.
 * `.is-marquee` is toggled by the inline script in header.php.
 * ------------------------------------------------------------------------- */
.slv-ticker {
  background: #ffffff;
  border-bottom: 1px solid #e8e8ed;
  color: #5f5e6b;
}
.slv-ticker__viewport {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.slv-ticker__viewport::-webkit-scrollbar { display: none; }
.slv-ticker__viewport.is-marquee { overflow: hidden; }
.slv-ticker__track {
  display: flex;
  width: max-content;
}
.slv-ticker__list {
  display: flex;
  flex: none;
  align-items: center;
  gap: 1.6rem;
  padding-right: 1.6rem;
  margin: 0;
  list-style: none;
  white-space: nowrap;
}
.slv-ticker__item { flex: none; }
.slv-ticker__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #5f5e6b;
  text-decoration: none;
  font-size: 12px;
}
.slv-ticker__link:hover { color: #7132f5; }
.slv-ticker__link svg { flex: none; opacity: 0.7; }
.slv-ticker__name { font-weight: 600; color: #131118; }
.slv-ticker__bonus { color: #7132f5; font-weight: 500; }
.slv-ticker__days {
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  padding: 0 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #7a7986;
}
.slv-ticker__viewport.is-marquee .slv-ticker__track {
  animation: slv-ticker-scroll var(--slv-ticker-speed, 46s) linear infinite;
}
.slv-ticker__viewport.is-marquee:hover .slv-ticker__track,
.slv-ticker__viewport.is-marquee:focus-within .slv-ticker__track {
  animation-play-state: paused;
}
@keyframes slv-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .slv-ticker__viewport.is-marquee .slv-ticker__track { animation: none; }
  .slv-ticker__viewport.is-marquee { overflow-x: auto; }
}

/* ---------- EU / GDPR cookie consent banner ---------- */
.slv-cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.slv-cookie__inner {
  pointer-events: auto;
  width: 100%;
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f1f0f5;
  color: #5f5e6b;
  border: 1px solid #e8e8ed;
  border-top: 2px solid #7132f5;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}
@media (min-width: 880px) {
  .slv-cookie__inner {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
}
.slv-cookie__text {
  flex: 1;
  font-size: 13px;
  line-height: 1.55;
  color: #7a7986;
}
.slv-cookie__text strong { color: #131118; }
.slv-cookie__text a {
  color: #7132f5;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.slv-cookie__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.slv-cookie__btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 10px 16px;
  border-radius: 6px;
  transition: background 0.12s ease, color 0.12s ease;
}
.slv-cookie__btn--accept { background: #7132f5; color: #f6f5f9; }
.slv-cookie__btn--accept:hover { background: #8b57f7; }
.slv-cookie__btn--reject { background: #e8e8ed; color: #232230; }
.slv-cookie__btn--reject:hover { background: #d3d3d3; }
.slv-cookie__btn--manage {
  background: transparent;
  color: #9497a9;
  text-decoration: underline;
}
.slv-cookie--hidden { display: none !important; }

/* ---------- Floating crypto donation button ---------- */
.slv-donate {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  background: #7132f5;
  color: #f6f5f9;
  box-shadow: 0 12px 28px rgba(113, 50, 245, 0.30);
  transition: transform 0.15s ease, background 0.15s ease;
}
.slv-donate:hover,
.slv-donate:focus-visible {
  transform: translateY(-2px);
  background: #8b57f7;
  color: #f6f5f9;
  outline: none;
}
.slv-donate svg { width: 24px; height: 24px; }
body.slv-cookie-open .slv-donate { bottom: 118px; }
@media (max-width: 879px) {
  body.slv-cookie-open .slv-donate { bottom: 152px; }
}
body.slv-donate-open { overflow: hidden; }

/* ---------- Donation modal ---------- */
.slv-donate-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.slv-donate-modal--hidden { display: none !important; }
.slv-donate-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
}
.slv-donate-modal__card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #f1f0f5;
  color: #131118;
  border: 1px solid #e8e8ed;
  border-top: 2px solid #7132f5;
  border-radius: 12px;
  padding: 24px 22px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  animation: slv-donate-pop 0.18s ease-out;
}
@keyframes slv-donate-pop {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.slv-donate-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #9497a9;
  cursor: pointer;
}
.slv-donate-modal__close:hover { color: #7132f5; }
.slv-donate-modal__title {
  margin: 0 0 6px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #131118;
}
.slv-donate-modal__sub {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.55;
  color: #7a7986;
}
.slv-donate-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.slv-donate-amt {
  appearance: none;
  border: 1px solid #e8e8ed;
  background: #ffffff;
  color: #232230;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  padding: 11px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.slv-donate-amt:hover { border-color: #3a1589; }
.slv-donate-amt.is-active {
  border-color: #7132f5;
  background: #f4f0ff;
  color: #7132f5;
}
.slv-donate-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e8e8ed;
  border-radius: 6px;
  padding: 0 12px;
  margin-bottom: 16px;
  background: #ffffff;
}
.slv-donate-custom:focus-within { border-color: #7132f5; }
.slv-donate-custom__prefix { font-size: 15px; font-weight: 600; color: #9497a9; }
.slv-donate-custom__input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 15px;
  padding: 12px 0;
  background: transparent;
  color: #131118;
}
.slv-donate-submit {
  width: 100%;
  appearance: none;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #f6f5f9;
  padding: 14px 0;
  border-radius: 6px;
  background: #7132f5;
  transition: background 0.12s ease;
}
.slv-donate-submit:hover { background: #8b57f7; }
.slv-donate-submit:disabled { opacity: 0.6; cursor: default; }
.slv-donate-note {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #b0b1bd;
  text-align: center;
}

/* ---------- Thank-you toast ---------- */
.slv-donate-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 90;
  max-width: calc(100vw - 32px);
  background: #7132f5;
  color: #f6f5f9;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.slv-donate-toast--show {
  opacity: 1;
  transform: translate(-50%, 0);
}
