.woocommerce-checkout #payment .payment_box.payment_method_instapay_eg,
.wc-block-components-payment-method__content .ipegw-card,
.woocommerce-order-details__instapay .ipegw-card {
  margin-top: 14px;
}

.woocommerce-checkout #payment .payment_box.payment_method_instapay_eg::before {
  display: none !important;
}

.ipegw-card {
  background: linear-gradient(180deg, #ffffff 0%, var(--ipegw-card-bg) 100%);
  border: 1px solid #dfd7fb;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
  position: relative;
  overflow: hidden;
}

.ipegw-card::before {
  content: "";
  position: absolute;
  inset-inline-start: -24px;
  top: -24px;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: rgba(109, 40, 217, 0.09);
}

.ipegw-card > * {
  position: relative;
  z-index: 1;
}

.ipegw-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.ipegw-card__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
  color: #111827;
}

.ipegw-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(109, 40, 217, 0.10);
  color: var(--ipegw-accent);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.ipegw-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
}

.ipegw-info-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ipegw-label,
.ipegw-field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
}

.ipegw-number,
.ipegw-static-value {
  font-size: 18px;
  line-height: 1.4;
  color: #111827;
  word-break: break-word;
}

.ipegw-copy-button.button,
.ipegw-direct-link,
.ipegw-upload-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 11px 18px;
  border-radius: 16px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.ipegw-copy-button.button {
  border: 1px solid #cdbdf7 !important;
  background: #fff !important;
  color: var(--ipegw-accent) !important;
  white-space: nowrap;
  box-shadow: none !important;
}

.ipegw-copy-button.button:hover,
.ipegw-direct-link:hover,
.ipegw-upload-trigger:hover {
  transform: translateY(-1px);
}

.ipegw-direct-link {
  width: 100%;
  background: var(--ipegw-accent);
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(109, 40, 217, 0.22);
}

.ipegw-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 16px 0;
  color: var(--ipegw-accent);
  font-weight: 800;
}

.ipegw-divider::before,
.ipegw-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(109, 40, 217, 0.28) 50%, transparent 100%);
}

.ipegw-qr-wrap {
  text-align: center;
}

.ipegw-qr-heading {
  margin-bottom: 12px;
  color: #374151;
  font-size: 14px;
  font-weight: 800;
}

.ipegw-qr-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(240px, 100%);
  aspect-ratio: 1 / 1;
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  box-shadow: 0 12px 26px rgba(17,24,39,.07);
}

.ipegw-qr-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.ipegw-transaction-field,
.ipegw-upload-section {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
  border: 1px solid #e5e7eb;
}

.ipegw-text-input {
  width: 100%;
  margin-top: 10px;
  min-height: 52px;
  border-radius: 14px !important;
  border: 1px solid #d1d5db !important;
  background: #fff !important;
  padding: 12px 14px !important;
  box-shadow: none !important;
}

.ipegw-text-input:focus {
  border-color: var(--ipegw-accent) !important;
  box-shadow: 0 0 0 3px rgba(109,40,217,0.12) !important;
}

.ipegw-upload-header {
  margin-bottom: 12px;
}

.ipegw-upload-heading {
  color: #111827;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.ipegw-upload-description,
.ipegw-upload-hint,
.ipegw-upload-status,
.ipegw-note {
  font-size: 14px;
  line-height: 1.7;
}

.ipegw-upload-description,
.ipegw-upload-hint,
.ipegw-note {
  color: #4b5563;
}

.ipegw-upload-trigger {
  width: 100%;
  background: #fff;
  border: 1px dashed #cdbdf7;
  color: var(--ipegw-accent);
}

.ipegw-upload-section.is-uploading .ipegw-upload-trigger {
  opacity: .7;
  pointer-events: none;
}

.ipegw-upload-status {
  min-height: 24px;
  margin-top: 10px;
  font-weight: 700;
}

.ipegw-upload-status.is-success {
  color: #15803d;
}

.ipegw-upload-status.is-error {
  color: #b91c1c;
}

.ipegw-upload-hint {
  margin-top: 6px;
}

.ipegw-upload-preview {
  margin-top: 14px;
  display: none;
}

.ipegw-upload-preview.ipegw-upload-preview--visible {
  display: block;
}

.ipegw-upload-preview img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 24px rgba(17,24,39,.08);
}

.ipegw-note {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px dashed #cdbdf7;
  border-radius: 16px;
  background: rgba(255,255,255,.7);
}

.ipegw-note p:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .ipegw-card {
    padding: 18px;
    border-radius: 20px;
  }

  .ipegw-card__header,
  .ipegw-info-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ipegw-card__title {
    font-size: 24px;
  }

  .ipegw-copy-button.button,
  .ipegw-badge {
    align-self: flex-start;
  }

  .ipegw-qr-shell {
    width: min(220px, 100%);
  }
}
