/* ND Donation Panel + Donate Button (integrates with #nav-page) */

#nd-donation-panel {
  --nd-panel-bg: #c7e9f5;
  --nd-text-color: #20252a;
  --nd-button-bg: #d25b79;
  --nd-button-bg-hover: #f1b53d;

  position: fixed;
  right: calc(1rem + 3rem + 0.75rem); /* left of the button stack */
  bottom: 1rem;
  z-index: 9998;
  width: min(320px, 90vw);
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--nd-panel-bg);
  border-radius: 0.75rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  color: var(--nd-text-color);
  box-sizing: border-box;
}

#nd-donation-panel.is-collapsed {
  display: none;
}

#nd-donation-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  line-height: 1.25;
  text-transform: none;
  color: var(--nd-text-color);
}

#nd-donation-panel .nd-donation-text {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--nd-text-color);
}

#nd-donation-panel .nd-donation-button {
  display: inline-block;
  padding: 0.875rem;
  background: var(--nd-button-bg);
  border-radius: 0.1875rem;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 400;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  transition: 0.3s;
}

#nd-donation-panel .nd-donation-button:hover,
#nd-donation-panel .nd-donation-button:focus {
  background: var(--nd-button-bg-hover);
  color: #fff;
}

#nd-donation-panel .nd-donation-close {
  position: absolute;
  z-index: 9999;
  top: 0.4rem;
  right: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--nd-text-color);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
}

#nd-donation-panel .nd-donation-close:hover {
  background: rgba(0,0,0,0.06);
  transform: scale(1.05);
}

/* Donate button styled like your other #nav-page FAB buttons */
#ndDonateToggle {
  margin: 0;
  display: inline-flex;
  padding: 1rem;
  width: 3rem;
  height: 3rem;
  background: rgb(255 255 255 / 10%);
  border: 0;
  border-radius: 100%;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
  line-height: 1;
  color: #20252a;
  text-align: center;
  cursor: pointer;
  opacity: 1;
  transition: opacity .3s ease, transform .3s ease, background .3s ease;
}

#ndDonateToggle:hover {
  background: rgb(255 255 255 / 50%);
  transform: scale(1.05);
}

#ndDonateToggle span { display: none; }

#ndDonateToggle::before {
  font-family: 'Font Awesome 6 Pro';
  font-weight: 700;
  font-size: 0.95rem;
  margin: auto;
  content: "\f004";
}

/* Force plugin button visible even if theme hides all #nav-page > button */
#nav-page > button#ndDonateToggle {
  display: inline-flex !important;
}

/* When plugin wants it hidden, respect [hidden] */
#nav-page > button#ndDonateToggle[hidden] {
  display: none !important;
}

/* Ordering inside your existing stack */
#BackToTop          { order: 1; }
#OpenNavigationMenu { order: 2; }
#SkipToNextAnchor   { order: 3; }
#ndDonateToggle     { order: 4; }

/* Small screens: panel stretches left/right but still “points” to button area */
@media (max-width: 480px) {
  #nd-donation-panel {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
}