.ppmp-checkout {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px;
  color: #1f2937;
}

.ppmp-checkout h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

.ppmp-subtitle {
  margin: 0 0 26px;
  color: #64748b;
  line-height: 1.7;
}

.ppmp-section {
  margin: 0 0 30px;
}

.ppmp-section h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.ppmp-plan-grid {
  display: grid;
  gap: 12px;
}

.ppmp-plan-grid.count-1,
.ppmp-pay-grid.count-1 {
  grid-template-columns: minmax(220px, 260px);
}

.ppmp-plan-grid.count-2,
.ppmp-pay-grid.count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ppmp-plan-grid.count-3,
.ppmp-pay-grid.count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ppmp-plan-grid.count-4,
.ppmp-pay-grid.count-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ppmp-plan-grid.count-many,
.ppmp-pay-grid.count-many {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.ppmp-plan-card,
.ppmp-pay-card {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  box-sizing: border-box;
  color: inherit;
  text-decoration: none;
}

.ppmp-plan-card:hover,
.ppmp-pay-card:hover,
.ppmp-plan-card.is-selected {
  border-color: #ec4899;
  box-shadow: 0 10px 30px rgba(236, 72, 153, .13);
}

.ppmp-plan-card.is-selected {
  transform: translateY(-1px);
}

.ppmp-plan-card strong,
.ppmp-pay-card strong {
  display: block;
  font-size: 18px;
  color: #111827;
}

.ppmp-plan-card span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
}

.ppmp-plan-card b,
.ppmp-plan-card em {
  color: #ec4899;
  font-size: 24px;
  font-style: normal;
  font-weight: 800;
}

.ppmp-plan-card small,
.ppmp-pay-card small,
.ppmp-pay-card span {
  display: block;
  margin-top: 8px;
  color: #64748b;
  line-height: 1.5;
}

.ppmp-pay-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.ppmp-pay-grid.one {
  grid-template-columns: minmax(220px, 360px);
}

.ppmp-pay-card {
  min-height: 96px;
}

.ppmp-pay-card.is-disabled {
  background: #f8fafc;
  cursor: not-allowed;
  opacity: .7;
}

.ppmp-link-card {
  display: block;
}

.ppmp-redeem-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.ppmp-redeem-inline input {
  min-height: 38px;
  width: min(260px, 100%);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 12px;
  box-sizing: border-box;
  color: #111827;
  background: #fff;
}

.ppmp-redeem-inline a,
.ppmp-redeem-inline button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #111827;
  background: #fff;
  cursor: pointer;
}

.ppmp-redeem-inline a.primary,
.ppmp-redeem-inline button.primary {
  color: #fff;
  border-color: #ec4899;
  background: #ec4899;
}

.ppmp-empty {
  margin: 0;
  color: #64748b;
}

.ppmp-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .46);
  padding: 20px;
}

.ppmp-modal[hidden] {
  display: none;
}

.ppmp-modal-panel {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .26);
  box-sizing: border-box;
}

.ppmp-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.ppmp-chain-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.ppmp-chain-btn,
.ppmp-copy-row button,
.ppmp-copy-row a {
  border: 0;
  border-radius: 8px;
  background: #ec4899;
  color: #fff;
  cursor: pointer;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ppmp-order-box {
  margin-top: 18px;
  border-top: 1px solid #e5e7eb;
  padding-top: 18px;
}

.ppmp-status {
  color: #475569;
  font-weight: 700;
}

.ppmp-status.is-error {
  color: #dc2626;
}

.ppmp-status.is-ok {
  color: #16a34a;
}

.ppmp-qr {
  width: 200px;
  min-height: 200px;
  margin: 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-all;
  text-align: center;
  color: #64748b;
}

.ppmp-qr canvas,
.ppmp-qr img {
  display: block;
  width: 188px;
  height: 188px;
  max-width: 100%;
  background: #fff;
  border: 8px solid #fff;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  box-sizing: content-box;
}

.ppmp-qr.is-text {
  font-size: 14px;
  line-height: 1.5;
}

.ppmp-order-box dl {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 12px;
}

.ppmp-order-box dt {
  color: #64748b;
}

.ppmp-order-box dd {
  margin: 0;
  min-width: 0;
}

.ppmp-order-box code {
  white-space: normal;
  word-break: break-all;
}

.ppmp-countdown-row {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  align-items: baseline;
  color: #475569;
}

.ppmp-countdown-row strong {
  color: #16a34a;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
}

.ppmp-countdown-row strong.is-warning {
  color: #f97316;
}

.ppmp-countdown-row strong.is-expired {
  color: #dc2626;
}

.ppmp-countdown-row small {
  grid-column: 1 / -1;
  color: #64748b;
}

.ppmp-copy-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.ppmp-copy-row [data-ppmp-payment-url] {
  display: none !important;
}

@media (max-width: 760px) {
  .ppmp-checkout {
    padding: 22px 14px;
  }

  .ppmp-plan-grid,
  .ppmp-pay-grid,
  .ppmp-pay-grid.one,
  .ppmp-plan-grid.count-1,
  .ppmp-plan-grid.count-2,
  .ppmp-plan-grid.count-3,
  .ppmp-plan-grid.count-4,
  .ppmp-plan-grid.count-many,
  .ppmp-pay-grid.count-1,
  .ppmp-pay-grid.count-2,
  .ppmp-pay-grid.count-3,
  .ppmp-pay-grid.count-4,
  .ppmp-pay-grid.count-many,
  .ppmp-chain-list {
    grid-template-columns: 1fr;
  }

  .ppmp-redeem-inline {
    align-items: stretch;
  }

  .ppmp-redeem-inline input,
  .ppmp-redeem-inline button {
    width: 100%;
  }

  .ppmp-modal {
    align-items: flex-end;
    padding: 12px;
  }

  .ppmp-modal-panel {
    max-height: calc(100dvh - 24px);
    padding: 22px 16px;
  }
}
