.payment-voucher-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.payment-voucher-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 42, 0.64);
  backdrop-filter: blur(2px);
}

.payment-voucher-dialog {
  position: relative;
  width: min(980px, calc(100vw - 40px));
  height: min(920px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #cbd9e9;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(6, 24, 48, 0.28);
}

.payment-voucher-header,
.payment-voucher-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
}

.payment-voucher-header {
  border-bottom: 1px solid #dce6f1;
}

.payment-voucher-header h2 {
  margin: 0;
  color: #0b274d;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}

.payment-voucher-header p,
.payment-voucher-status {
  margin: 3px 0 0;
  color: #5b6f87;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
}

.payment-voucher-status.is-error {
  color: #b42318;
}

.payment-voucher-icon-button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #d2deeb;
  border-radius: 6px;
  background: #fff;
  color: #233b58;
  font: 500 26px/1 Arial, sans-serif;
  cursor: pointer;
}

.payment-voucher-icon-button:hover {
  background: #f1f6fb;
}

.payment-voucher-preview {
  min-height: 0;
  overflow: auto;
  padding: 22px;
  background: #e9eff6;
  text-align: center;
}

.payment-voucher-preview canvas {
  display: block;
  width: min(100%, 880px);
  height: auto;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 8px 28px rgba(20, 42, 70, 0.16);
}

.payment-voucher-footer {
  border-top: 1px solid #dce6f1;
}

.payment-voucher-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.payment-voucher-actions .btn {
  min-height: 38px;
  white-space: nowrap;
}

.payment-voucher-print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 700px) {
  .payment-voucher-modal {
    padding: 0;
  }

  .payment-voucher-dialog {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .payment-voucher-header,
  .payment-voucher-footer {
    padding: 12px 14px;
  }

  .payment-voucher-preview {
    padding: 12px;
  }

  .payment-voucher-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-voucher-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .payment-voucher-actions .btn {
    min-width: 0;
    padding-inline: 8px;
  }
}
