/* Shared checkout on home and in the deposit dialog. */
.qo-section { padding: 1rem 0 3.25rem; }
.qo-sub { margin: 0 auto 1.5rem; max-width: 640px; color: var(--muted-foreground); }
.qo-preview {
  display: inline-block;
  margin: -0.75rem 0 1.25rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: color-mix(in srgb, var(--warning) 18%, var(--card));
  color: var(--foreground);
}
.qo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--foreground) 5%, transparent);
}
.qo-card [hidden] { display: none !important; }
.qo-form { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.qo-fields { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.5rem; min-width: 0; }
.qo-fields .shadcn-form-input { min-width: 0; font-size: 16px; scroll-margin: 8rem 0 14rem; }
.qo-label { margin: 0.6rem 0 0; font-weight: 600; font-size: 0.9rem; color: var(--foreground); }
.qo-fields > .qo-label:first-child { margin-top: 0; }
.qo-label-note { font-weight: 400; color: var(--muted-foreground); }
.qo-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.qo-chip {
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--foreground);
  font-size: 0.875rem;
  cursor: pointer;
}
.qo-chip:hover { border-color: var(--foreground); }
.qo-chip[aria-checked="true"], .qo-chip[aria-pressed="true"] {
  border-color: var(--primary); background: var(--primary); color: var(--primary-foreground);
}
.qo-chip:focus-visible, .qo-method:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 3px; }
.qo-duration-select { display: none; }
.qo-count-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.qo-count { width: 7rem; flex: 0 0 auto; }
.qo-hint { margin: 0.15rem 0 0; font-size: 0.8rem; color: var(--muted-foreground); line-height: 1.5; }
.qo-payment { margin: 0.3rem 0 0; padding: 0; border: 0; min-width: 0; }
.qo-payment legend { float: none; margin: 0 0 0.5rem; }
.qo-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.qo-method {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  font-size: 0.875rem;
  cursor: pointer;
}
.qo-method input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.qo-method:has(input:checked) { border-color: var(--foreground); background: var(--accent); color: var(--foreground); font-weight: 600; }
.qo-method span { font-size: 0.8rem; }
.qo-email-field { display: flex; flex-direction: column; gap: 0.4rem; }
.qo-summary {
  align-self: start;
  margin: 1.5rem 1.5rem 1.5rem 0;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--secondary) 55%, var(--card));
}
.qo-review { padding: 1.25rem; }
.qo-review-title { margin: 0 0 0.65rem; font-size: 0.8rem; color: var(--muted-foreground); }
.qo-selection { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--foreground); }
.qo-channel-summary { margin: 0.25rem 0 1rem; color: var(--muted-foreground); font-size: 0.875rem; overflow-wrap: anywhere; }
.qo-price-line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; color: var(--foreground); font-size: 0.875rem; }
.qo-price-muted { color: var(--muted-foreground); }
.qo-warn { margin: 0 0 0.75rem; font-size: 0.8rem; line-height: 1.5; color: var(--muted-foreground); }
.qo-card-help { margin-top: 0.8rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.qo-card-help .shadcn-button { width: 100%; margin: 0.6rem 0 0.2rem; white-space: normal; }
.qo-balance-help { margin-top: 0.8rem; }
.qo-actions { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
.qo-footer-summary { display: none; }
.qo-checkout-main { display: flex; flex-direction: column; gap: 0.8rem; }
.qo-checkout-price { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; color: var(--foreground); }
.qo-total-label { font-size: 0.8rem; color: var(--muted-foreground); }
.qo-checkout-price strong { font-size: 1.35rem; letter-spacing: -0.03em; }
.qo-pay { width: 100%; min-height: 44px; padding: 0.75rem 0.9rem; white-space: normal; }
.qo-card button:disabled { opacity: 0.55; cursor: not-allowed; }
.qo-checkout-note { margin: 0.5rem 0 0; font-size: 0.75rem; color: var(--muted-foreground); }
.qo-error { margin: 0 0 0.75rem; padding: 0.6rem 0.75rem; border-radius: 8px; background: color-mix(in srgb, var(--destructive) 12%, var(--card)); color: var(--foreground); font-size: 0.85rem; }
.qo-card [aria-invalid="true"] { border-color: var(--destructive); }

@media (max-width: 767px) {
  .qo-form { display: block; }
  .qo-fields { padding: 1.1rem; }
  .qo-durations { display: none; }
  .qo-duration-select { display: block; }
  .qo-count { width: 100%; }
  .qo-presets { width: 100%; flex-wrap: nowrap; }
  .qo-presets .qo-chip { flex: 1; min-width: 0; padding: 0.4rem 0.3rem; }
  /* The footer shares the form's containing block, so it stays reachable
     while editing fields, both in the page and in the scrollable dialog. */
  .qo-summary { display: contents; }
  .qo-review { padding: 1rem 1.1rem; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--secondary) 55%, var(--card)); }
  .qo-review-title, .qo-selection, .qo-channel-summary { display: none; }
  .qo-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 0.75rem 1.1rem max(0.75rem, env(safe-area-inset-bottom));
    border-radius: 0 0 var(--radius, 12px) var(--radius, 12px);
    background: var(--card);
    box-shadow: 0 -5px 16px rgb(0 0 0 / 5%);
  }
  .qo-footer-summary { display: block; margin: 0 0 0.5rem; font-size: 0.75rem; color: var(--muted-foreground); overflow-wrap: anywhere; }
  .qo-checkout-main { flex-direction: row; align-items: center; gap: 0.8rem; }
  .qo-checkout-price { flex: 0 0 auto; flex-direction: column; gap: 0; align-items: flex-start; }
  .qo-pay { flex: 1; min-width: 0; }
  .qo-checkout-note { margin-top: 0.4rem; }
}
