/* ===== PAC.CO Store Checkout / Payment ===== */

.shipping-method-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink);
}

.checkout-subtotal-line {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.checkout-shipping-line {
  font-size: 0.95rem;
}

.shipping-fee-time {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.order-total-line {
  border-top: 1px solid #ededf0 !important;
  padding-top: 12px !important;
  margin-top: 4px !important;
}

.btn-flex-1 {
  flex: 1;
}

.btn-flex-2 {
  flex: 2;
}

.btn-slate {
  background: #475569 !important;
}

.pp-logo-slate {
  background: #475569;
}

/* ===== Bank Transfer Details ===== */

.bt-section {
  margin-bottom: 12px;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bt-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  display: block;
  margin-bottom: 2px;
}

.bt-value {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
}

.bt-value-acc {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.bt-value-ref {
  color: #475569;
  font-size: 1.15rem;
  font-weight: 900;
}

.bt-row-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bt-amount-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pp-instructions--bt {
  text-align: center;
  margin-bottom: 20px;
}

.pp-instructions ol {
  margin: 0;
  padding-left: 20px;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ===== Storefront Receipt Upload UI ===== */
:root {
  --border: var(--ink); /* Flat black border fallback */
}

.receipt-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 110px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 100ms ease;
  text-align: center;
  padding: 12px;
  box-sizing: border-box;
  margin-bottom: 8px;
  width: 100%;
}

.receipt-dropzone:hover {
  background: var(--soft);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.receipt-dropzone:active {
  transform: translateY(1px);
}

.receipt-dropzone.dragover {
  background: var(--soft);
  border-color: var(--ink);
  border-style: solid;
}

.receipt-dropzone-icon {
  margin-bottom: 6px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 150ms ease;
}

.receipt-dropzone:hover .receipt-dropzone-icon {
  color: var(--ink);
}

.receipt-dropzone-title {
  font-size: 13px;
  font-weight: 850;
  color: var(--ink);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.receipt-dropzone-subtitle {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

/* preview card style */
.receipt-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  margin-bottom: 8px;
  position: relative;
  box-sizing: border-box;
  width: 100%;
}

.receipt-preview-thumb-wrap {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--soft);
}

.receipt-preview-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.receipt-preview-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.receipt-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.receipt-filename {
  font-size: 13px;
  font-weight: 850;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.receipt-filesize {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.receipt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 850;
  color: #166534; /* Green */
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.receipt-remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: color 150ms ease, transform 100ms ease;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: auto;
}

.receipt-remove-btn:hover {
  color: var(--danger);
  transform: scale(1.1);
  background: rgba(217, 52, 52, 0.05);
}

.receipt-remove-btn:active {
  transform: scale(0.95);
}

/* ===== Storefront Modal Layout Improvements ===== */
@media (min-width: 821px) {
.promptpay-panel {
  max-height: calc(var(--real-vh, 1vh) * 100 - 40px);
  overflow-y: auto;
  scrollbar-width: none; /* Hide scrollbar Firefox */
  -ms-overflow-style: none; /* Hide scrollbar IE 10+ */
}
}

.promptpay-panel::-webkit-scrollbar {
  display: none !important; /* Hide scrollbar Chrome/Safari */
  width: 0 !important;
  height: 0 !important;
}

.promptpay-modal {
  padding: 24px 20px !important;
}

.promptpay-header {
  margin-bottom: 12px !important;
}

.promptpay-header h2 {
  font-size: 1.25rem !important;
}

.pp-logo-circle {
  width: 44px !important;
  height: 44px !important;
  margin: 0 auto 8px !important;
}

.qr-card {
  width: 180px !important;
  height: 180px !important;
  padding: 12px !important;
  margin-bottom: 12px !important;
  max-width: 180px !important;
}

.payment-amount-card {
  padding: 10px 16px !important;
  margin-bottom: 12px !important;
}

.payment-amount-card strong {
  font-size: 1.5rem !important;
}

.pp-id-box {
  margin-bottom: 12px !important;
  padding: 6px 12px !important;
}

/* Reference Input Spacing Polish */
.evidence-upload-section {
  margin-top: 8px !important;
  padding-top: 8px !important;
}

.evidence-upload-section label {
  font-size: 11px !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
  color: var(--muted) !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
}

#ppTransactionRef, #btTransactionRef {
  height: 44px !important;
  padding: 0 12px !important;
  font-size: 15px !important;
  min-height: auto !important;
  margin-bottom: 8px !important;
}

/* Compressed instructions section */
.pp-instructions {
  padding: 12px 16px !important;
  margin-bottom: 8px !important;
  border-radius: var(--radius) !important;
}

.pp-instructions ol {
  font-size: 0.8rem !important;
  line-height: 1.3 !important;
  gap: 8px !important;
  padding-left: 16px !important;
}

/* Modal Actions and Timer spacing */
.promptpay-actions {
  margin-top: 8px !important;
  gap: 8px !important;
}

.pp-timer {
  margin-top: 8px !important;
}

/* Mobile responsive scaling */
@media (max-width: 576px) {
  .qr-card {
    width: 160px !important;
    height: 160px !important;
    padding: 10px !important;
  }
  .promptpay-modal {
    padding: 20px 16px !important;
  }
}

/* Success and loading styles for receipt submission */
.btn-confirmed {
  background-color: #22c55e !important;
  border-color: #22c55e !important;
  color: var(--paper) !important;
  opacity: 1 !important;
}

.store-btn-loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: buttonSpinner 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes buttonSpinner {
  to { transform: rotate(360deg); }
}

/* ===== Stripe Preferred Payment Methods Redesign ===== */
:root {
  --soft-blue: rgba(21, 174, 229, 0.05);
}

.stripe-methods-container {
  display: none;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 18px;
}

.stripe-sub-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 20px;
  border-radius: 20px;
  background: #fcfcfc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 200ms ease;
  width: 100%;
  text-align: left;
  min-height: 84px;
}



.stripe-sub-method:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.15);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.stripe-sub-method.active {
  border: 2px solid var(--blue) !important;
  background: var(--soft-blue) !important;
  box-shadow: 0 4px 14px rgba(21, 174, 229, 0.1);
}

.stripe-sub-method.active .payment-icon {
  background: rgba(21, 174, 229, 0.1) !important;
  color: var(--blue) !important;
}

.stripe-sub-method .payment-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f1f4;
  color: var(--ink);
  flex-shrink: 0;
}

.stripe-sub-method .stripe-method-status {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 4px;
  display: none;
}

.stripe-sub-method .stripe-method-status.active-tag {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
}

.stripe-sub-method .stripe-method-status.supported-tag {
  display: inline-block;
  background: #ecfeff;
  color: #0e7490;
}

.stripe-sub-method .stripe-method-status.unsupported {
  display: inline-block;
  background: #fee2e2;
  color: #b91c1c;
}

/* ===== iPad Checkout Panel ===== */
#checkoutPanelIpad {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 95;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
}
#checkoutPanelIpad.open {
  display: flex;
}
#checkoutPanelIpad .ipad-checkout-panel {
  width: 92vw;
  max-width: 1280px;
  height: 88vh;
  max-height: 920px;
  display: flex;
  flex-direction: column;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
  overflow: hidden;
}
#checkoutPanelIpad .ipad-checkout-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--paper);
  z-index: 10;
}
#checkoutPanelIpad .ipad-checkout-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 950;
}
#checkoutPanelIpad .ipad-checkout-head-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
#checkoutPanelIpad .checkout-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  background: var(--soft);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
#checkoutPanelIpad .ipad-checkout-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.7fr 0.9fr;
  column-gap: 24px;
  overflow: hidden;
  min-height: 0;
}
#checkoutPanelIpad .ipad-checkout-col-left {
  overflow-y: auto;
  padding: 28px 32px 120px;
  background: var(--paper);
  scrollbar-width: thin;
}
#checkoutPanelIpad .ipad-checkout-col-right {
  overflow-y: auto;
  padding: 44px 28px 28px 24px;
  background: var(--paper);
  border-left: 1px solid #ededf0;
  scrollbar-width: thin;
}
#checkoutPanelIpad .ipad-checkout-col-right h3 {
  margin: 0 0 20px;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--ink);
}
#checkoutPanelIpad .ipad-checkout-foot {
  flex: 0 0 auto;
  padding: 14px 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--paper);
  z-index: 10;
  min-height: 72px;
  display: flex;
  align-items: center;
}
#checkoutPanelIpad .ipad-checkout-foot-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  width: 100%;
}
#checkoutPanelIpad .ipad-foot-pricing {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}
#checkoutPanelIpad .ipad-foot-pricing .line-between {
  gap: 8px;
  font-size: 0.95rem;
}
#checkoutPanelIpad .ipad-foot-total-label {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
#checkoutPanelIpad .ipad-foot-total-price {
  font-weight: 950;
  font-size: 1.15rem;
  color: var(--ink);
}
#checkoutPanelIpad .ipad-foot-pricing .order-total-line {
  font-weight: 950;
  font-size: 1.05rem;
}
#checkoutPanelIpad .ipad-foot-pricing .price {
  font-weight: 850;
  white-space: nowrap;
}
#checkoutPanelIpad .ipad-foot-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
#checkoutPanelIpad .ipad-foot-actions .primary-cta {
  width: auto;
  min-width: 240px;
  height: 48px;
  font-size: 1rem;
  border-radius: 20px;
}
#checkoutPanelIpad .ipad-foot-actions .minimal-btn {
  width: auto;
  height: 40px;
  font-size: 0.85rem;
  padding: 0 10px;
  white-space: nowrap;
}
#checkoutPanelIpad .ipad-order-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
#checkoutPanelIpad .ipad-order-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f2;
  align-items: center;
}
#checkoutPanelIpad .ipad-order-item:last-child {
  border-bottom: none;
}
#checkoutPanelIpad .ipad-order-item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border: 1.5px solid #ededf0;
  border-radius: 10px;
  background: var(--soft);
}
#checkoutPanelIpad .ipad-order-item-info {
  min-width: 0;
}
#checkoutPanelIpad .ipad-order-item-name {
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
#checkoutPanelIpad .ipad-order-item-qty {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
#checkoutPanelIpad .ipad-order-item-price {
  font-size: 0.88rem;
  font-weight: 850;
  color: var(--ink);
  white-space: nowrap;
}
#checkoutPanelIpad .ipad-summary-pricing {
  padding-top: 16px;
  border-top: 1px solid #ededf0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#checkoutPanelIpad .ipad-summary-pricing .line-between {
  font-size: 0.88rem;
}
#checkoutPanelIpad .ipad-summary-pricing .summary-total {
  font-weight: 950;
  font-size: 1.1rem;
  padding-top: 8px;
  border-top: 1px dashed rgba(0,0,0,0.08);
}
#checkoutPanelIpad .ipad-summary-pricing .price {
  font-weight: 850;
}
#checkoutPanelIpad .ipad-payment-step {
  display: none;
}
#checkoutPanelIpad .ipad-payment-step.active {
  display: block;
}
#checkoutPanelIpad .ipad-shipping-row {
  display: none;
}
#checkoutPanelIpad .ipad-shipping-row.show {
  display: flex;
}
#checkoutPanelIpad .ipad-foot-actions-payment {
  display: none;
}
#checkoutPanelIpad .ipad-foot-actions-payment.active {
  display: flex;
  gap: 12px;
  align-items: center;
}
#checkoutPanelIpad .ipad-foot-actions-shipping {
  display: flex;
}
#checkoutPanelIpad .ipad-foot-actions-shipping.hidden {
  display: none;
}
#checkoutPanelIpad .account-box {
  margin-bottom: 24px;
}
#checkoutPanelIpad .form-grid {
  grid-template-columns: 1fr 1fr;
}
#checkoutPanelIpad .form-grid .full {
  grid-column: 1 / -1;
}
#checkoutPanelIpad .shipping-methods-wrapper {
  grid-column: 1 / -1;
}

@media (max-width: 820px) {
  #checkoutPanelIpad .ipad-checkout-body { grid-template-columns: 1fr; }
  #checkoutPanelIpad .ipad-checkout-col-right {
    border-left: none;
    border-top: 1px solid #ededf0;
    padding: 20px 32px;
  }
  #checkoutPanelIpad .ipad-checkout-foot-row { flex-direction: column; gap: 12px; }
  #checkoutPanelIpad .ipad-foot-pricing { width: 100%; justify-content: space-between; }
  #checkoutPanelIpad .ipad-foot-actions .primary-cta { min-width: 160px; }
}
@media (max-width: 768px) and (orientation: portrait) {
  #checkoutPanelIpad .ipad-checkout-body { grid-template-columns: 1fr; }
  #checkoutPanelIpad .ipad-checkout-col-right {
    border-left: none;
    border-top: 1px solid #ededf0;
    padding: 20px 24px;
  }
}

/* ===== iPad Payment Modals ===== */
/* Payment modals must render ABOVE the iPad checkout panel (z-index 95) */
#checkoutPanelIpad.open ~ #promptPayModal.open,
#checkoutPanelIpad.open ~ #bankTransferModal.open {
  z-index: 100 !important;
}

/* ===== iPad Payment Panels (PromptPay & Bank Transfer) ===== */
#ipadPromptPayPanel,
#ipadBankTransferPanel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
}
#ipadPromptPayPanel.open,
#ipadBankTransferPanel.open {
  display: flex;
}
#ipadPromptPayPanel .ipad-payment-inner,
#ipadBankTransferPanel .ipad-payment-inner {
  width: 88vw;
  max-width: 1100px;
  height: 75vh;
  max-height: 750px;
  display: flex;
  flex-direction: column;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
  overflow: hidden;
}
/* Head */
#ipadPromptPayPanel .ipad-payment-head,
#ipadBankTransferPanel .ipad-payment-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: var(--paper);
  z-index: 10;
}
#ipadPromptPayPanel .ipad-payment-head-left,
#ipadBankTransferPanel .ipad-payment-head-left,
#ipadPaymentReview .ipad-payment-head-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
#ipadPromptPayPanel .ipad-payment-head-left h2,
#ipadBankTransferPanel .ipad-payment-head-left h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 950;
}
#ipadPromptPayPanel .ipad-payment-head-sub,
#ipadBankTransferPanel .ipad-payment-head-sub {
  font-size: 0.78rem;
  color: var(--muted);
  display: block;
  margin-top: 1px;
}
#ipadPromptPayPanel .ipad-payment-head-icon,
#ipadBankTransferPanel .ipad-payment-head-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  flex-shrink: 0;
}
#ipadPromptPayPanel .ipad-payment-head-icon-bank svg {
  stroke: var(--ink);
}
/* Body: 2 columns */
#ipadPromptPayPanel .ipad-payment-body,
#ipadBankTransferPanel .ipad-payment-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  overflow: hidden;
  min-height: 0;
}
#ipadPromptPayPanel .ipad-payment-col-left.ipad-payment-col-qr {
  overflow-y: auto;
  padding: 28px 24px 28px 32px;
  display: flex;
  flex-direction: column;
}
#ipadBankTransferPanel .ipad-payment-col-left {
  overflow-y: auto;
  padding: 28px 24px 28px 32px;
}
#ipadPromptPayPanel .ipad-payment-col-right,
#ipadBankTransferPanel .ipad-payment-col-right {
  overflow-y: auto;
  padding: 28px 32px 28px 24px;
  border-left: 1px solid #ededf0;
}
/* QR area - fill available space, make QR the focal element */
#ipadPromptPayPanel .ipad-pp-qr-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--soft);
  border: 2px solid #ededf0;
  border-radius: 20px;
  padding: 32px;
  flex: 1;
  min-height: 320px;
}
#ipadPromptPayPanel .ipad-pp-qr-area img {
  max-width: 280px;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
#ipadPromptPayPanel .qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}
#ipadPromptPayPanel .ipad-pp-id {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
}
#ipadPromptPayPanel .ipad-pp-id strong {
  color: var(--ink);
}
/* Payment summary */
.ipad-payment-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ipad-pp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f2;
  font-size: 0.9rem;
}
.ipad-pp-row:last-child { border-bottom: none; }
.ipad-pp-row span { color: var(--muted); }
.ipad-pp-row strong { font-weight: 850; color: var(--ink); }
.ipad-pp-row-highlight {
  background: #fffbe6;
  border-radius: 10px;
  padding: 12px 14px;
  border-bottom: none;
  margin: 4px 0;
}
.ipad-pp-row-highlight span { font-weight: 800; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.ipad-pp-row-highlight strong { font-size: 1.2rem; font-weight: 950; }
/* Evidence */
.ipad-payment-evidence {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #ededf0;
}
.ipad-evidence-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
/* Bank Transfer details */
.ipad-bt-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ipad-bt-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ipad-bt-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ipad-bt-value {
  font-size: 1rem;
  font-weight: 850;
}
.ipad-bt-value-acc {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}
.ipad-bt-value-ref {
  font-size: 0.95rem;
  font-weight: 850;
}
.ipad-bt-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Footer */
#ipadPromptPayPanel .ipad-payment-foot,
#ipadBankTransferPanel .ipad-payment-foot {
  flex: 0 0 auto;
  padding: 14px 28px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 64px;
}
#ipadPromptPayPanel .ipad-payment-foot .primary-cta,
#ipadBankTransferPanel .ipad-payment-foot .primary-cta {
  min-width: 160px;
}

/* Responsive: single column on smaller screens */
@media (max-width: 820px) {
  #ipadPromptPayPanel .ipad-payment-body,
  #ipadBankTransferPanel .ipad-payment-body {
    grid-template-columns: 1fr;
  }
  #ipadPromptPayPanel .ipad-payment-col-right,
  #ipadBankTransferPanel .ipad-payment-col-right {
    border-left: none;
    border-top: 1px solid #ededf0;
  }
}

/* ===== iPad Payment Review Screen ===== */
#ipadPaymentReview {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 105;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
}
#ipadPaymentReview.open {
  display: flex;
}
#ipadPaymentReview .ipad-payment-inner {
  display: flex;
  flex-direction: column;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
  overflow: hidden;
}
#ipadPaymentReview .ipad-payment-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: var(--paper);
  z-index: 10;
}
#ipadPaymentReview .ipad-checkout-body {
  flex: 1;
  overflow-y: auto;
}
#ipadPaymentReview .ipad-payment-foot {
  flex: 0 0 auto;
  padding: 14px 28px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 64px;
}

/* Desktop-only: premium Payment Submitted layout
   - Slightly wider & taller box (500×600)
   - Centered column header (icon above title above subtitle)
   - More vertical breathing room in head/body/foot
   - iPad (≤1024px) and phone (≤767px) keep the compact default */
@media (min-width: 1025px) {
  #ipadPaymentReview .ipad-payment-inner {
    width: 500px !important;
    max-width: 500px !important;
    min-height: 600px;
  }
  #ipadPaymentReview .ipad-payment-head {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    padding: 32px 40px 24px;
  }
  #ipadPaymentReview .ipad-payment-head-left {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
  }
  #ipadPaymentReview .ipad-payment-head-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: 2px solid #22c55e;
    background: #f0fdf4;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #ipadPaymentReview .ipad-payment-head-icon svg {
    width: 32px;
    height: 32px;
  }
  #ipadPaymentReview .ipad-payment-head h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
  }
  #ipadPaymentReview .ipad-payment-head-sub {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    margin-top: 2px;
  }
  #ipadPaymentReview .ipad-checkout-body {
    padding: 32px 40px !important;
  }
  #ipadPaymentReview .ipad-payment-foot {
    padding: 24px 40px 32px;
  }
}


/* Ghost / secondary button — used in checkout Payment footer.
   Compact nav-style button: white bg, 2px black border, 14px radius,
   fit-content width, 16px h-padding, height 40px. Visual hierarchy:
   stays a lightweight nav action, doesn't compete with the primary CTA.
   Defined here (store-checkout.css) so it loads AFTER components.css
   and overrides the base `.button` primary black-pill styles. */
.ghost-btn,
.store-btn-ghost {
  background: #fff !important;
  color: #000 !important;
  border: 2px solid #000 !important;
  border-radius: 14px !important;
  font-weight: 600 !important;
  width: fit-content !important;
  height: 40px !important;
  min-width: 96px !important;
  padding: 0 16px !important;
  box-shadow: none !important;
  letter-spacing: 0 !important;
  white-space: nowrap;
}

.ghost-btn:hover,
.store-btn-ghost:hover {
  background: #f6f6f7 !important;
  color: #000 !important;
  border-color: #000 !important;
  box-shadow: none !important;
  transform: none !important;
}

.ghost-btn:active,
.store-btn-ghost:active {
  background: #ececef !important;
  color: #000 !important;
  border-color: #000 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* ===== Shipping Details & Payment modals — Medium rounded border style ===== */

/* Modal panels — medium rounded corners (16px), 3px solid black border, no heavy shadows */
#checkoutModal .checkout-panel,
#promptPayModal .promptpay-panel,
#bankTransferModal .promptpay-panel {
  border-radius: 16px !important;
}

/* iPad checkout panel */
#checkoutPanelIpad .ipad-checkout-panel {
  border-radius: 16px !important;
}

/* iPad payment panels */
#ipadPromptPayPanel .ipad-payment-inner,
#ipadBankTransferPanel .ipad-payment-inner,
#ipadPaymentReview .ipad-payment-inner {
  border-radius: 16px !important;
}

/* Remove shadows from checkout/payment panels */
#checkoutModal .checkout-panel,
#checkoutPanelIpad .ipad-checkout-panel,
#promptPayModal .promptpay-panel,
#bankTransferModal .promptpay-panel,
#ipadPromptPayPanel .ipad-payment-inner,
#ipadBankTransferPanel .ipad-payment-inner,
#ipadPaymentReview .ipad-payment-inner {
  box-shadow: none !important;
}

/* ===== Phone: full-screen checkout panel, no rounded border ===== */
@media (max-width: 600px) {
  /* Backdrop: hide on phone so the panel can be edge-to-edge */
  #checkoutPanelIpad,
  #checkoutModal {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Desktop modal strip 16px rounded corners & 3px border on phone */
  #checkoutModal .checkout-panel {
    border: none !important;
    border-radius: 0 !important;
  }
  /* PromptPay / BankTransfer modals: strip rounded corners & border on phone */
  #promptPayModal .promptpay-panel,
  #bankTransferModal .promptpay-panel {
    border: none !important;
    border-radius: 0 !important;
  }
  /* iPad panel: full screen, no rounded corners, no border */
  #checkoutPanelIpad .ipad-checkout-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  /* iPad payment panels: also full screen on phone */
  #ipadPromptPayPanel,
  #ipadBankTransferPanel,
  #ipadPaymentReview {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  #ipadPromptPayPanel .ipad-payment-inner,
  #ipadBankTransferPanel .ipad-payment-inner,
  #ipadPaymentReview .ipad-payment-inner {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  /* Payment footer: vertical stacked buttons on phone (override store-nav row) */
  #checkoutModal #footerPayment.checkout-actions {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  #footerPayment .primary-cta,
  #footerPayment .ghost-btn {
    width: 100% !important;
    min-height: 48px !important;
    height: 48px !important;
    border: 2px solid #000 !important;
    border-radius: 14px !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   CHECKOUT LOADING SPINNER
   ════════════════════════════════════════════════════════════════ */

/* Spinner element placed inside .primary-cta when loading */
.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.65s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* Loading state for the checkout button */
#footerPayment .primary-cta.is-loading,
#checkoutPanelIpad .ipad-foot-actions .primary-cta.is-loading {
  pointer-events: none;
  cursor: wait;
  opacity: 0.85;
}

/* Subtle overlay behind the checkout panel during loading */
.checkout-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.15);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(1px);
  transition: opacity 0.2s ease;
}

.checkout-loading-overlay .loading-msg {
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 24px 36px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.checkout-loading-overlay .loading-msg .btn-spinner {
  width: 22px;
  height: 22px;
  border-color: rgba(0,0,0,0.15);
  border-top-color: #000;
}

