/* Donation sheet: QR is the focal point, bank transfer is the fallback. */
body > .app-shell .donate-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid #83bfa1 !important;
  border-radius: 8px;
  background: #dff4e8 !important;
  color: #145a40 !important;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

body > .app-shell .donate-button svg { width: 17px; height: 17px; flex: 0 0 auto; }
body > .app-shell .donate-button:hover { border-color: #6fa98e; background: #e1f3e9; color: #0f5a3f; }
body > .app-shell .donate-button:focus-visible,
.donate-dialog :is(button, a):focus-visible { outline: 2px solid #23966c; outline-offset: 2px; }

.donate-dialog {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
}

.donate-dialog.hidden { display: none !important; }
.donate-backdrop { position: absolute; inset: 0; background: rgba(20, 35, 28, 0.56); }

.donate-panel {
  position: relative;
  display: flex;
  width: min(100%, 520px);
  max-height: min(92dvh, 800px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #b9cec4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(20, 35, 28, 0.26);
  color: #14231c;
}

.donate-panel__header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid #d9e5df;
  background: #f7faf8;
}

.donate-eyebrow {
  display: block;
  color: #176d4e;
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.donate-panel h2,
.donate-panel h3 {
  margin: 3px 0 0;
  color: #14231c;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.donate-panel h2 { font-size: 1.08rem; }
.donate-panel h3 { font-size: 0.9rem; }
.donate-panel__header p { margin: 5px 0 0; color: #61756b; font-size: 0.74rem; line-height: 1.45; }

.donate-close {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #b9cec4;
  border-radius: 8px;
  background: #fff;
  color: #33473e;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.donate-close:hover { background: #e6f5ee; color: #176d4e; }

.donate-panel__body {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 14px;
  padding: 18px 20px 20px;
  overflow-y: auto;
}

.donate-qris {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
}

.donate-qris img {
  display: block;
  width: min(100%, 270px);
  height: auto;
  max-height: min(54dvh, 410px);
  object-fit: contain;
  border: 1px solid #d9e5df;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(20, 80, 58, 0.08);
}

.donate-qris figcaption { color: #61756b; font-size: 0.68rem; line-height: 1.35; text-align: center; }

.donate-bank {
  width: min(100%, 410px);
  padding: 14px 16px;
  border: 1px solid #bdd9cd;
  border-radius: 10px;
  background: #f0f8f4;
}

.donate-bank h3 { margin-top: 5px; }
.donate-bank > p { margin: 6px 0 0; color: #61756b; font-size: 0.72rem; line-height: 1.35; }

.donate-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #9fc8b6;
  border-radius: 8px;
  background: #fff;
}

.donate-account-row strong {
  color: #14231c;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.015em;
  line-height: 1.3;
}

.donate-copy {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #b9cec4;
  border-radius: 7px;
  background: #fff;
  color: #176d4e;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.donate-copy:hover { border-color: #6fa98e; background: #e6f5ee; }
.donate-copy-status { display: block; min-height: 1.3em; margin-top: 7px; color: #176d4e; font-size: 0.68rem; line-height: 1.35; }

@media (max-width: 720px) {
  body > .app-shell .donate-button { padding-inline: 11px; }
  .donate-dialog { align-items: end; padding: 0; }
  .donate-panel { width: 100%; max-height: 94dvh; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 14px 14px 0 0; }
  .donate-panel__header { padding: 15px 16px 12px; }
  .donate-panel__body { gap: 12px; padding: 15px 16px 18px; }
  .donate-qris img { width: min(100%, 250px); max-height: 48dvh; }
  .donate-bank { width: 100%; padding: 13px; }
}

@media (max-width: 420px) {
  body > .app-shell .donate-button span { display: none; }
  body > .app-shell .donate-button { width: 44px; padding: 0; }
  .donate-account-row { align-items: stretch; flex-direction: column; gap: 8px; }
  .donate-copy { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  body > .app-shell .donate-button, .donate-dialog * { transition-duration: 0.01ms !important; }
}
