.bnk-donation-dialog[hidden],
.bnk-donation-receipt[hidden],
.bnk-donation-qr[hidden] {
  display: none;
}

.bnk-donation-dialog {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow-y: auto;
  background: rgba(36, 29, 23, 0.68);
  backdrop-filter: blur(5px);
}

.bnk-donation-panel {
  position: relative;
  width: min(100%, 680px);
  max-height: none;
  overflow: visible;
  padding: 22px 26px 20px;
  border: 1px solid #e8e0d3;
  background: #fffdf8;
  box-shadow: 0 24px 80px rgba(29, 22, 17, 0.32);
}

.bnk-donation-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid #ded5c8;
  background: transparent;
  color: #51483f;
  font: 400 26px/1 var(--sans, Arial, sans-serif);
  cursor: pointer;
}

.bnk-donation-eyebrow {
  margin: 0 0 6px;
  color: #936447;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bnk-donation-title {
  max-width: 600px;
  margin: 0 44px 5px 0;
  color: #302820;
  font: 500 clamp(27px, 4.4vw, 36px)/1 var(--serif, Georgia, serif);
}

.bnk-donation-intro {
  margin: 0 0 14px;
  color: #756b60;
  font-size: 12px;
  line-height: 1.45;
}

.bnk-donation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.bnk-donation-field {
  display: grid;
  gap: 4px;
  color: #51483f;
  font-size: 10px;
  font-weight: 700;
}

.bnk-donation-field-full {
  grid-column: 1 / -1;
}

.bnk-donation-field input,
.bnk-donation-field select,
.bnk-donation-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d9cfc0;
  border-radius: 0;
  outline: none;
  background: #fffefa;
  color: #302820;
  font: 400 12px var(--sans, Arial, sans-serif);
}

.bnk-donation-field textarea {
  min-height: 52px;
  resize: vertical;
}

.bnk-donation-field input:focus,
.bnk-donation-field select:focus,
.bnk-donation-field textarea:focus {
  border-color: #a9613e;
  box-shadow: 0 0 0 3px rgba(169, 97, 62, 0.13);
}

.bnk-donation-help {
  margin: -1px 0 0;
  color: #756b60;
  font-size: 9px;
  font-weight: 400;
  line-height: 1.35;
}

.bnk-donation-status {
  min-height: 16px;
  margin: 9px 0 0;
  color: #7a392e;
  font-size: 11px;
  line-height: 1.4;
}

.bnk-donation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
}

.bnk-donation-submit,
.bnk-donation-print,
.bnk-certificate-download,
.bnk-donation-paid {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #884b34;
  background: #884b34;
  color: #fffaf1;
  font: 700 10px var(--sans, Arial, sans-serif);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
}

.bnk-certificate-download {
  border-color: #b98232;
  background: #9b0e26;
}

.bnk-donation-submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

.bnk-donation-paid:disabled {
  cursor: wait;
  opacity: 0.62;
}

.bnk-donation-legal {
  margin: 10px 0 0;
  color: #756b60;
  font-size: 9px;
  line-height: 1.4;
}

.bnk-donation-qr {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid #e5d7c5;
  background: #fff8ee;
  text-align: center;
}

.bnk-donation-qr h3 {
  margin: 0 0 6px;
  color: #800b23;
  font: 600 24px/1.1 var(--serif, Georgia, serif);
}

.bnk-donation-qr-summary {
  margin: 0 0 12px;
  color: #5e5148;
  font-size: 12px;
  font-weight: 700;
}

.bnk-donation-qr img {
  width: min(100%, 310px);
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid #eadcc9;
  background: #fff;
}

.bnk-donation-qr-note {
  max-width: 430px;
  margin: 12px auto 10px;
  color: #756b60;
  font-size: 11px;
  line-height: 1.45;
}

.bnk-donation-qr-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #884b34;
  color: #884b34;
  font: 700 10px var(--sans, Arial, sans-serif);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.bnk-donation-reference {
  max-width: 430px;
  margin: 12px auto 0;
  text-align: left;
}

.bnk-donation-qr-actions {
  justify-content: center;
}

.bnk-receipt-heading {
  margin: 18px 0 6px;
  color: #723d31;
  font: 500 clamp(30px, 5vw, 42px)/1 var(--serif, Georgia, serif);
}

.bnk-receipt-thanks {
  margin: 0 0 23px;
  color: #756b60;
  font: italic 17px/1.5 var(--serif, Georgia, serif);
}

.bnk-receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.bnk-receipt-table th,
.bnk-receipt-table td {
  padding: 11px 8px;
  border-bottom: 1px solid #e8e0d3;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.bnk-receipt-table th {
  width: 38%;
  color: #756b60;
  font-weight: 600;
}

.bnk-certificate {
  margin-top: 18px;
  padding: 8px;
  border: 1px solid #d9b36f;
  background: linear-gradient(135deg, #fffaf0, #f8e8c7 58%, #fff4d8);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.72);
}

.bnk-certificate-border {
  padding: 28px 24px;
  border: 2px solid #c48a32;
  text-align: center;
}

.bnk-certificate-kicker {
  margin: 0;
  color: #b77a2f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.bnk-certificate h3 {
  margin: 12px 0 14px;
  color: #800b23;
  font: 500 clamp(30px, 5vw, 46px)/0.96 var(--serif, Georgia, serif);
}

.bnk-certificate-text {
  max-width: 520px;
  margin: 0 auto 13px;
  color: #5e4b40;
  font: 400 15px/1.5 var(--serif, Georgia, serif);
}

.bnk-certificate-text span {
  color: #800b23;
  font-weight: 600;
}

.bnk-certificate-name {
  display: block;
  margin: 6px auto 16px;
  color: #800b23;
  font: 600 clamp(28px, 5vw, 44px)/1 var(--serif, Georgia, serif);
  overflow-wrap: anywhere;
}

.bnk-certificate-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 18px;
  color: #6b5a4d;
  font-size: 11px;
}

.bnk-certificate-blessing {
  margin: 18px 0 0;
  color: #a86f2e;
  font: italic 15px/1.45 var(--serif, Georgia, serif);
}

@media (max-width: 560px) {
  .bnk-donation-dialog {
    align-items: end;
    padding: 0;
  }

  .bnk-donation-panel {
    width: 100%;
    max-height: 94dvh;
    overflow: auto;
    padding: 22px 16px 18px;
  }

  .bnk-donation-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .bnk-donation-field-full {
    grid-column: auto;
  }

  .bnk-donation-actions > button {
    width: 100%;
  }

  .bnk-certificate-border {
    padding: 22px 14px;
  }
}

@media print {
  body * {
    visibility: hidden !important;
  }

  .bnk-donation-dialog,
  .bnk-donation-dialog *,
  .bnk-donation-receipt,
  .bnk-donation-receipt * {
    visibility: visible !important;
  }

  .bnk-donation-dialog {
    position: absolute;
    inset: 0;
    display: block;
    padding: 0;
    background: white;
    backdrop-filter: none;
  }

  .bnk-donation-panel {
    display: none !important;
  }

  .bnk-donation-panel:has(.bnk-donation-receipt:not([hidden])) {
    display: block !important;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 12mm;
    border: 0;
    box-shadow: none;
  }

  .bnk-donation-close,
  .bnk-donation-print,
  .bnk-certificate-download {
    display: none !important;
  }
}

.bnk-donation-field input[type="checkbox"] {width:18px;min-height:18px;height:18px;padding:0;margin:0 7px 0 0;vertical-align:middle;accent-color:#800b23;}
