/* Texas Imaging reusable payment intent modal */
.txpi-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(5px);
}

.txpi-backdrop.txpi-open {
  display: flex;
}

.txpi-card {
  width: min(540px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.36);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.txpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.txpi-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 23px;
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.txpi-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.txpi-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.txpi-body {
  padding: 20px 22px 22px;
}

.txpi-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border: 1px solid #dbeafe;
}

.txpi-price-row span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.txpi-price-row strong {
  display: block;
  margin-top: 2px;
  color: #073b73;
  font-size: 25px;
  font-weight: 950;
}

.txpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.txpi-field label {
  display: block;
  margin: 0 0 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.txpi-field input,
.txpi-field select,
.txpi-field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 10px 12px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  font-size: 15px;
}

.txpi-field textarea {
  min-height: 74px;
  resize: vertical;
}

.txpi-field input:focus,
.txpi-field select:focus,
.txpi-field textarea:focus {
  border-color: #0057b8;
  box-shadow: 0 0 0 4px rgba(0, 87, 184, 0.12);
}

.txpi-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.txpi-submit,
.txpi-pay,
.txpi-wa {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 0;
  text-decoration: none !important;
  cursor: pointer;
  font-weight: 950;
}

.txpi-submit,
.txpi-pay {
  background: #c8102e;
  color: #ffffff !important;
  box-shadow: 0 16px 34px rgba(200, 16, 46, 0.22);
}

.txpi-wa {
  background: #dcfce7;
  color: #166534 !important;
}

.txpi-submit[disabled] {
  opacity: 0.72;
  cursor: not-allowed;
}

.txpi-message {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
}

.txpi-message.txpi-error {
  display: block;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.txpi-message.txpi-success {
  display: block;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.txpi-result {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.txpi-result.txpi-visible {
  display: block;
}

.txpi-small {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.txpi-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (min-width: 640px) {
  .txpi-grid.txpi-two {
    grid-template-columns: 1fr 1fr;
  }
}
