/* Donate / steun UI — loaded on public pages + Education */
.ce-donate-cta {
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 22rem;
}
.ce-donate-cta__label {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0.85;
}
.ce-donate-cta__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.ce-donate-cta__btn {
  appearance: none;
  border: 1px solid rgba(125, 211, 192, 0.35);
  background: rgba(62, 207, 172, 0.1);
  color: inherit;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.ce-donate-cta__btn:hover {
  background: rgba(62, 207, 172, 0.2);
}
.ce-donate-cta__btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.ce-donate-cta__msg {
  margin: 0;
  font-size: 0.75rem;
  color: #f87171;
}
.ce-donate-banner {
  border: 1px solid rgba(125, 211, 192, 0.28);
  background: rgba(13, 26, 36, 0.75);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin: 1rem auto;
  max-width: 960px;
}
.ce-donate-banner .ce-donate-cta {
  max-width: none;
}

.ce-donate-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.ce-donate-nav__trigger {
  appearance: none;
  border: 1px solid rgba(125, 211, 192, 0.32);
  background: rgba(62, 207, 172, 0.08);
  color: inherit;
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
.ce-donate-nav__trigger:hover,
.ce-donate-nav__trigger[aria-expanded="true"] {
  background: rgba(62, 207, 172, 0.16);
  border-color: rgba(62, 207, 172, 0.5);
}
.ce-donate-nav__panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  left: auto;
  z-index: 1300;
  min-width: 11.5rem;
  max-width: min(16rem, calc(100vw - 1rem));
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 192, 0.28);
  background: rgba(8, 16, 24, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.ce-donate-nav__panel.is-open {
  display: block;
}
.ce-donate-nav__panel p {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  line-height: 1.35;
  opacity: 0.85;
}
.ce-donate-nav__amounts {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.ce-donate-nav__amounts button {
  appearance: none;
  flex: 1 1 auto;
  min-width: 2.6rem;
  border: 1px solid rgba(125, 211, 192, 0.3);
  background: rgba(62, 207, 172, 0.1);
  color: inherit;
  border-radius: 999px;
  padding: 0.4rem 0.55rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.ce-donate-nav__amounts button:hover {
  background: rgba(62, 207, 172, 0.22);
}
.ce-donate-nav__amounts button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.ce-donate-nav__err {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: #f87171;
  min-height: 1em;
}
.site-header .ce-donate-nav {
  margin-right: 0.15rem;
}
.ce-top-actions .ce-donate-nav {
  order: -1;
}

/* Soft timed nudge — bottom sheet, never fullscreen */
.ce-coffee-nudge {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  max-width: 26rem;
  margin: 0 auto;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(125, 211, 192, 0.35);
  background: rgba(8, 16, 24, 0.97);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.ce-coffee-nudge.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.ce-coffee-nudge__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}
.ce-coffee-nudge__text {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  line-height: 1.45;
  opacity: 0.88;
}
.ce-coffee-nudge__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.ce-coffee-nudge__row button {
  appearance: none;
  border: 1px solid rgba(125, 211, 192, 0.35);
  background: rgba(62, 207, 172, 0.14);
  color: inherit;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.ce-coffee-nudge__row button:hover {
  background: rgba(62, 207, 172, 0.26);
}
.ce-coffee-nudge__row button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.ce-coffee-nudge__dismiss {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  margin-left: auto;
  text-decoration: underline;
}
.ce-coffee-nudge__msg {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: #f87171;
  min-height: 1em;
}

/* Education fallback ebook styles (when site.css absent) */
.ce-ebook-offer {
  margin: 1.25rem 0;
  padding: 1.25rem 1.3rem;
  border-radius: 16px;
  border: 1px solid rgba(125, 211, 192, 0.32);
  background: linear-gradient(
    145deg,
    rgba(62, 207, 172, 0.12),
    rgba(13, 26, 36, 0.92) 45%,
    rgba(91, 184, 232, 0.08)
  );
}
.ce-ebook-offer__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3ecfac;
}
.ce-ebook-offer__title {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}
.ce-ebook-offer__text {
  margin: 0 0 0.85rem;
  opacity: 0.88;
  font-size: 0.95rem;
  line-height: 1.5;
}
.ce-ebook-offer__perks {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
}
.ce-ebook-offer__perks li {
  display: flex;
  gap: 0.45rem;
}
.ce-ebook-offer__perks li::before {
  content: "→";
  color: #3ecfac;
  font-weight: 700;
}
.ce-ebook-offer__cta-label {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.9;
}
.ce-ebook-offer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ce-ebook-offer__btn {
  appearance: none;
  border: 1px solid rgba(125, 211, 192, 0.4);
  background: rgba(62, 207, 172, 0.16);
  color: inherit;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
.ce-ebook-offer__btn:hover {
  background: rgba(62, 207, 172, 0.28);
}
.ce-ebook-offer__btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.ce-ebook-offer__btn--primary {
  background: linear-gradient(135deg, #3ecfac, #5bb8e8);
  border-color: transparent;
  color: #041018;
}
.ce-ebook-offer__msg {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: #f87171;
  min-height: 1em;
}
.ce-ebook-offer__fine {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  opacity: 0.75;
}

@media (max-width: 560px) {
  .site-header .nav {
    flex-wrap: wrap;
    row-gap: 0.45rem;
  }
  .site-header .nav-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .ce-donate-nav__panel {
    right: 0;
    max-width: calc(100vw - 1rem);
  }
}
@media (max-width: 480px) {
  .ce-donate-nav__trigger {
    padding: 0.34rem 0.65rem;
    font-size: 0.78rem;
  }
  .ce-donate-nav__panel {
    right: 0;
    min-width: 10.5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ce-coffee-nudge {
    transition: none;
  }
}
