.download-pay-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
}

.download-pay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(2px);
}

.download-pay-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.download-pay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.download-pay-head {
  padding-right: 36px;
}

.download-pay-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 800;
}

.download-pay-head p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.download-pay-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 14px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.download-pay-price span {
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

.download-pay-price strong {
  color: #dc2626;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.download-pay-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.download-pay-methods button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.download-pay-methods button.active {
  border-color: #1269f3;
  background: #eaf4ff;
  color: #1269f3;
}

.download-pay-methods [data-icon] {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: currentColor;
}

.download-pay-methods [data-icon]::after,
.download-pay-cashier [data-icon]::after,
.download-pay-noqr [data-icon]::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

.download-pay-checkout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.download-pay-checkout:empty {
  display: none;
}

.download-pay-qr,
.download-pay-cashier,
.download-pay-noqr {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.download-pay-qr img {
  display: block;
  width: 132px;
  height: 132px;
}

.download-pay-cashier {
  grid-column: 1 / -1;
  gap: 8px;
  padding: 18px;
}

.download-pay-cashier [data-icon],
.download-pay-noqr [data-icon] {
  width: 28px;
  height: 28px;
  color: #1269f3;
}

.download-pay-cashier strong,
.download-pay-order strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 800;
}

.download-pay-cashier p,
.download-pay-order p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.download-pay-cashier a,
.download-pay-order a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: 8px;
  padding: 0 14px;
  border-radius: 8px;
  background: #1269f3;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.download-pay-order {
  min-width: 0;
}

.download-pay-order small {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.download-pay-status {
  min-height: 20px;
  margin: 12px 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.download-pay-status[data-state="success"] {
  color: #059669;
}

.download-pay-status[data-state="warning"] {
  color: #b45309;
}

.download-pay-status[data-state="error"] {
  color: #dc2626;
}

.download-pay-panel [data-download-pay-submit] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #1269f3;
  border-radius: 8px;
  background: #1269f3;
  color: #fff;
  font-size: 15px;
  line-height: 42px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(18, 105, 243, 0.18);
  cursor: pointer;
}

.download-pay-panel [data-download-pay-submit]:hover {
  border-color: #0f5edb;
  background: #0f5edb;
}

.download-pay-panel [data-download-pay-submit]:disabled {
  opacity: 0.72;
  cursor: wait;
  box-shadow: none;
}

@media (max-width: 860px) {
  .download-pay-modal {
    padding: 14px;
  }

  .download-pay-panel {
    max-height: calc(100vh - 28px);
    padding: 20px;
  }

  .download-pay-methods,
  .download-pay-checkout {
    grid-template-columns: minmax(0, 1fr);
  }

  .download-pay-qr,
  .download-pay-noqr {
    min-height: 132px;
  }
}

.article-attachment-item {
  display: grid;
