/* Sarbaxio Hosting Store — store6.css (new filename per sarbaxio.com static-cache rule;
 * replaces store5.css — in-panel support chat pass, 2026-11-18: everything from
 * store5.css is kept unchanged (same font as the main sarbaxio.com site —
 * "Avenir Next", "Segoe UI", system-ui, sans-serif — 17px base, line-height
 * 1.6, all responsive rules, the Phase 2 live payment card, the
 * manage-page environment styles and the payment-screen UX styles) and
 * the support-chat styles are appended at the end.) */
* { box-sizing: border-box; }
body { margin: 0; font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif; font-size: 17px; line-height: 1.6; background: #0b0f17; color: #e8edf5; }
button, input, select, textarea { font-family: inherit; }
a { color: #38bdf8; }
img { max-width: 100%; }

/* Header: brand (logo + wordmark) left, nav right; wraps instead of
 * overlapping when the viewport gets narrow. */
.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 18px; padding: 14px 22px; background: #0f1622; border-bottom: 1px solid #1e293b; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 1px; color: #fff; text-decoration: none; white-space: nowrap; }
.brandlogo { height: 34px; width: auto; display: block; }
.brand span { color: #38bdf8; font-weight: 600; }
.topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.topbar nav a { text-decoration: none; white-space: nowrap; }
.topbar nav .cta { background: #0284c7; color: #fff; padding: 7px 12px; border-radius: 8px; }
.who { color: #94a3b8; overflow-wrap: anywhere; }

main { max-width: 1024px; margin: 0 auto; padding: 28px 18px 48px; }
h1 { font-size: 31px; margin: 0 0 8px; }
.sub { color: #94a3b8; margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 22px; }
.card { background: #111a29; border: 1px solid #1e293b; border-radius: 14px; padding: 20px; }
.card.wide { margin-top: 18px; }
.card h2 { margin-top: 0; font-size: 22px; }
.tag { color: #94a3b8; }
.price { font-size: 34px; font-weight: 800; color: #fff; }
.price span { font-size: 15px; color: #94a3b8; font-weight: 500; }
.btn { display: inline-block; background: #0284c7; color: #fff; padding: 10px 16px; border: none; border-radius: 9px; text-decoration: none; cursor: pointer; font-size: 16px; }
.btn.secondary { background: #1e293b; color: #cbd5e1; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.form { max-width: 420px; display: grid; gap: 14px; margin-top: 18px; }
.form label { display: grid; gap: 6px; font-size: 15px; color: #cbd5e1; }
.form input { padding: 11px; border-radius: 9px; border: 1px solid #334155; background: #0f1622; color: #fff; font-size: 16px; width: 100%; min-width: 0; }
.error { background: #450a0a; border: 1px solid #7f1d1d; padding: 10px 14px; border-radius: 9px; max-width: 420px; }
.ok { background: #052e16; border: 1px solid #14532d; padding: 10px 14px; border-radius: 9px; }
.notice { background: #422006; border: 1px solid #713f12; padding: 10px 14px; border-radius: 9px; }
.table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #1e293b; overflow-wrap: break-word; }
.table .totalrow td { font-weight: 800; color: #fff; border-top: 2px solid #334155; border-bottom: none; }
.badge { background: #713f12; color: #fde68a; font-size: 12px; padding: 2px 8px; border-radius: 99px; vertical-align: middle; }
.specs { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 15px; }
.specs th, .specs td { text-align: left; padding: 6px 4px; border-bottom: 1px solid #1e293b; overflow-wrap: break-word; }
.specs th { color: #94a3b8; font-weight: 500; }
.specs td { color: #fff; text-align: right; }
.mt { margin-top: 34px; }
code { background: #0f1622; border: 1px solid #334155; padding: 2px 7px; border-radius: 6px; word-break: break-all; }
.domainsearch { display: flex; gap: 10px; max-width: 560px; margin: 18px 0 6px; }
.domainsearch input { flex: 1 1 auto; min-width: 0; padding: 12px; border-radius: 9px; border: 1px solid #334155; background: #0f1622; color: #fff; font-size: 16px; }
.domainsearch .btn { flex: 0 0 auto; }
.foot { text-align: center; color: #64748b; padding: 22px; border-top: 1px solid #1e293b; font-size: 14px; }
.yearly { color: #4ade80; font-weight: 600; margin: 2px 0 8px; }
.buyform { display: grid; gap: 9px; margin-top: 10px; }
.periodchoice { display: block; font-size: 15px; color: #cbd5e1; cursor: pointer; }
.periodchoice input { margin-right: 7px; }
form.inline { display: inline; }

/* ---------- Small screens (phones, ~<=640px) ---------- */
@media (max-width: 640px) {
  /* Header stacks: brand row on top, nav on its own row below it,
   * wrapped with even gaps — nothing overlaps, nothing is cut off. */
  .topbar { flex-direction: column; align-items: stretch; padding: 12px 16px; gap: 10px; }
  .brand { font-size: 18px; }
  .brandlogo { height: 30px; }
  .topbar nav { gap: 8px 14px; }
  .topbar nav .cta { padding: 7px 10px; }

  main { padding: 20px 14px 40px; }
  h1 { font-size: 27px; }
  .price { font-size: 29px; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }

  /* Stacked-card tables: each row becomes a card, each cell a
   * label/value line — no horizontal scrolling, buttons fully visible. */
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack thead { display: none; }
  .table.stack tr { background: #0f1622; border: 1px solid #1e293b; border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; }
  .table.stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: none; text-align: right; min-width: 0; }
  .table.stack td::before { content: attr(data-label); color: #94a3b8; font-size: 14px; text-align: left; flex: 0 0 auto; }
  .table.stack td:not([data-label])::before { content: none; }
  .table.stack td > * { min-width: 0; }
  .table.stack td strong { overflow-wrap: anywhere; }
  .table.stack td.act { justify-content: flex-end; }
  .table.stack td.act:empty { display: none; }
  .table.stack td .btn { white-space: normal; }
  .table.stack .totalrow td { border-top: none; justify-content: space-between; }
}

/* ---------- Phase 2: live payment card + client environment ---------- */
.paycard { border-color: #14532d; }
.paysteps { margin: 0 0 6px; padding-left: 22px; display: grid; gap: 10px; }
.payaddr { display: inline-block; margin-top: 6px; font-size: 16px; padding: 8px 10px; }
.amountgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 18px 0 6px; }
.amountbox { background: #0f1622; border: 1px solid #1e293b; border-radius: 12px; padding: 14px; display: grid; gap: 4px; }
.amountlabel { color: #94a3b8; font-size: 14px; }
.amountvalue { color: #fff; font-size: 22px; font-weight: 800; }
.amountnote { color: #94a3b8; font-size: 13px; }
.bigterms { font-size: 21px; font-weight: 800; line-height: 1.45; color: #fde68a; background: #422006; border: 1px solid #713f12; border-radius: 12px; padding: 16px; margin: 18px 0; }
.paystatus { display: flex; align-items: center; gap: 12px; background: #0f1622; border: 1px solid #334155; border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.paystatus.paid { border-color: #14532d; background: #052e16; display: grid; gap: 4px; }
.spinner { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #334155; border-top-color: #38bdf8; animation: sb-spin 0.9s linear infinite; }
@keyframes sb-spin { to { transform: rotate(360deg); } }
.paidbig { font-size: 30px; font-weight: 800; color: #4ade80; margin: 0; }
.sigform { max-width: 560px; margin-top: 16px; }
.credbox { background: #0f1622; border: 1px solid #1e293b; border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; margin: 10px 0; }
.credbox .row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }
.credbox .k { color: #94a3b8; min-width: 92px; }
.statusdot { font-weight: 700; }
.instructions { background: #0f1622; border: 1px solid #1e293b; border-radius: 12px; padding: 14px 16px; }
.instructions code { display: inline-block; margin: 2px 0; }

/* ---------- Payment-screen UX (2026-11-18): QR + copy + collapsed signature ---------- */
.payaddrrow { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-top: 8px; }
.payaddrmain { display: grid; gap: 10px; justify-items: start; align-content: start; min-width: 0; flex: 1 1 250px; }
.payaddrmain .payaddr { margin-top: 0; }
.copybtn { padding: 9px 16px; font-size: 15px; }
.copybtn.copied { background: #15803d; }
.payqrbox { background: #fff; border-radius: 12px; padding: 10px 10px 8px; display: grid; gap: 6px; justify-items: center; flex: 0 0 auto; }
.payqr { width: 132px; height: 132px; }
.payqr svg { width: 132px; height: 132px; display: block; }
.payqrlabel { color: #0f1622; font-size: 13px; font-weight: 600; }
.sigwrap { margin-top: 18px; }
.sigtoggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; max-width: 560px; background: none; border: none; border-top: 1px solid #1e293b; padding: 14px 2px 4px; color: #38bdf8; font-family: inherit; font-size: 16px; cursor: pointer; text-align: left; }
.sigarrow { font-size: 22px; line-height: 1; flex: 0 0 auto; transition: transform .18s ease; }
.sigtoggle[aria-expanded="true"] .sigarrow { transform: rotate(90deg); }
.sigbody .sigform { margin-top: 10px; }
.sigbody .error { margin-top: 12px; }

/* ---------- In-panel support chat (2026-11-18) ---------- */
.chatlog { display: flex; flex-direction: column; gap: 12px; max-height: 520px; overflow-y: auto; padding: 4px 2px 10px; }
.chatempty { color: #94a3b8; margin: 6px 0; }
.msg { max-width: 78%; display: grid; gap: 3px; }
.msg .bubble { padding: 11px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .meta { font-size: 13px; color: #94a3b8; }
.msg.client { align-self: flex-end; justify-items: end; }
.msg.client .bubble { background: #0284c7; color: #fff; border-bottom-right-radius: 4px; }
.msg.agent { align-self: flex-start; justify-items: start; }
.msg.agent .bubble { background: #0f1622; border: 1px solid #1e293b; border-bottom-left-radius: 4px; }
.chatform { display: flex; gap: 10px; align-items: flex-end; margin-top: 14px; border-top: 1px solid #1e293b; padding-top: 16px; }
.chatform textarea { flex: 1 1 auto; min-width: 0; min-height: 50px; resize: vertical; padding: 11px; border-radius: 9px; border: 1px solid #334155; background: #0f1622; color: #fff; font-size: 16px; font-family: inherit; }
.chatform .btn { flex: 0 0 auto; }
@media (max-width: 640px) {
  .msg { max-width: 92%; }
  .chatform { flex-direction: column; align-items: stretch; }
}
