/* Molly Cart Rules – bill view. Scoped to .molly-bill-root so The7 styles are not affected elsewhere. */
.molly-bill-root {
  --mb-plum: #302333; --mb-pink: #FF3B93; --mb-cream: #FFF9F6; --mb-blush: #FCE6EF;
  --mb-line: rgba(48, 35, 51, 0.10); --mb-muted: #6b5a6e; --mb-soft: #8a748d;
  font-family: "Molly Prompt", "Prompt", "Noto Sans Thai", "Sarabun", sans-serif;
  color: var(--mb-plum); line-height: 1.5; -webkit-font-smoothing: antialiased;
  max-width: 640px; margin: 0 auto; padding: 4px 0 32px; box-sizing: border-box;
}
.molly-bill-root *, .molly-bill-root *::before, .molly-bill-root *::after { box-sizing: border-box; }
.molly-bill-page .molly-bill-root { background: transparent; }
.molly-bill-root h2, .molly-bill-root h3, .molly-bill-root p, .molly-bill-root dl, .molly-bill-root dd, .molly-bill-root ol { margin: 0; padding: 0; font-family: inherit; color: inherit; letter-spacing: normal; text-transform: none; }
.molly-bill-root a { text-decoration: none; }
.molly-bill-root img { max-width: 100%; display: block; }

.molly-bill-root .mb-bill { background: var(--mb-card, #fff); border: 1px solid var(--mb-line); border-radius: var(--mb-radius, 14px); padding: 18px 16px 16px; box-shadow: 0 1px 2px rgba(48,35,51,.04); }
.molly-bill-root .mb-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--mb-line); }
.molly-bill-root .mb-head img { width: 56px; height: 56px; flex: 0 0 56px; }
.molly-bill-root .mb-brand { font-size: calc(1.15rem * var(--molly-fs, 1)); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.molly-bill-root .mb-tag { font-size: calc(.75rem * var(--molly-fs, 1)); color: var(--mb-muted); margin-top: 2px; }
.molly-bill-root .mb-meta { margin-top: 10px; font-size: calc(.8rem * var(--molly-fs, 1)); color: var(--mb-muted); }
.molly-bill-root .mb-ref { display: block; font-size: calc(.98rem * var(--molly-fs, 1)); font-weight: 700; color: var(--mb-plum); letter-spacing: .02em; margin-bottom: 2px; }
.molly-bill-root .mb-disclaimer { margin-top: 8px; background: var(--mb-blush); font-size: calc(.78rem * var(--molly-fs, 1)); font-weight: 600; padding: 7px 10px; border-radius: 8px; }

.molly-bill-root .mb-group { margin-top: 14px; }
.molly-bill-root .mb-group-head { display: flex; flex-direction: column; gap: 1px; padding-bottom: 6px; border-bottom: 2px solid var(--mb-plum); }
.molly-bill-root .mb-group-head h2 { font-size: calc(.92rem * var(--molly-fs, 1)); font-weight: 700; line-height: 1.4; }
.molly-bill-root .mb-gnote { font-size: calc(.72rem * var(--molly-fs, 1)); color: var(--mb-muted); }
.molly-bill-root .mb-subhead { font-size: calc(.78rem * var(--molly-fs, 1)); font-weight: 600; margin: 8px 0 0; }
.molly-bill-root .mb-row { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 7px 0; border-bottom: 1px solid var(--mb-line); font-size: calc(.82rem * var(--molly-fs, 1)); align-items: end; }
.molly-bill-root .mb-color { font-weight: 600; font-size: calc(.88rem * var(--molly-fs, 1)); line-height: 1.3; }
.molly-bill-root .mb-prod { color: var(--mb-muted); font-size: calc(.75rem * var(--molly-fs, 1)); line-height: 1.3; }
.molly-bill-root .mb-sku { color: var(--mb-soft); font-size: calc(.72rem * var(--molly-fs, 1)); letter-spacing: .01em; }
.molly-bill-root .mb-qtyline { grid-column: 1; color: var(--mb-muted); font-size: calc(.78rem * var(--molly-fs, 1)); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; }
.molly-bill-root .mb-line { grid-column: 2; grid-row: 1 / span 4; align-self: center; font-weight: 700; font-size: calc(.92rem * var(--molly-fs, 1)); text-align: right; white-space: nowrap; }
.molly-bill-root .mb-qty { display: inline-flex; align-items: center; gap: 0; }
.molly-bill-root .mb-qty .mb-step {
  width: 32px; height: 32px; min-height: 0; padding: 0; margin: 0; border: 1px solid rgba(48,35,51,.18); background: var(--mb-cream);
  color: var(--mb-plum); font-family: inherit; font-size: calc(1.15rem * var(--molly-fs, 1)); font-weight: 600; line-height: 1; border-radius: 8px; cursor: pointer; box-shadow: none; text-shadow: none;
}
.molly-bill-root .mb-qty .mb-step:first-child { border-radius: 8px 0 0 8px; }
.molly-bill-root .mb-qty .mb-step:nth-child(3) { border-radius: 0 8px 8px 0; }
.molly-bill-root .mb-qty input[type="number"] {
  width: 52px; height: 32px; min-height: 0; margin: 0; padding: 0 2px; border: 1px solid rgba(48,35,51,.18); border-left: 0; border-right: 0;
  border-radius: 0; text-align: center; font-family: inherit; font-size: calc(.95rem * var(--molly-fs, 1)); font-weight: 600; line-height: 1; color: var(--mb-plum); background: #fff; box-shadow: none; -moz-appearance: textfield;
}
.molly-bill-root .mb-qty input::-webkit-outer-spin-button, .molly-bill-root .mb-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.molly-bill-root .mb-unitword { margin-left: 6px; }
.molly-bill-root .mb-remove { margin-left: auto; color: var(--mb-pink); font-size: calc(.75rem * var(--molly-fs, 1)); font-weight: 600; padding: 4px 2px; }
.molly-bill-root .mb-print-only { display: none; }
.molly-bill-root .mb-group-foot { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0 0; font-size: calc(.8rem * var(--molly-fs, 1)); color: var(--mb-muted); }
.molly-bill-root .mb-group-foot strong { color: var(--mb-plum); font-weight: 600; }

.molly-bill-root .mb-ship-flag { margin-top: 12px; background: #fff6ea; border: 1px solid rgba(48,35,51,.12); border-radius: 8px; padding: 8px 10px; font-size: calc(.78rem * var(--molly-fs, 1)); line-height: 1.45; }
.molly-bill-root .mb-special { margin-top: 8px; background: var(--mb-blush); border-radius: 8px; padding: 8px 10px; font-size: calc(.8rem * var(--molly-fs, 1)); font-weight: 600; color: var(--mb-plum); border-left: 3px solid var(--mb-pink); }

.molly-bill-root .mb-sum { margin-top: 12px; border-top: 2px solid var(--mb-plum); padding-top: 8px; }
.molly-bill-root .mb-sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 3px 0; font-size: calc(.88rem * var(--molly-fs, 1)); }
.molly-bill-root .mb-sum-row dt { color: var(--mb-muted); font-weight: 400; }
.molly-bill-root .mb-sum-row dd { font-weight: 600; margin: 0; }
.molly-bill-root .mb-sum-row.is-disc dd { color: var(--mb-pink); }
.molly-bill-root .mb-sum-row.is-grand { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--mb-line); align-items: center; }
.molly-bill-root .mb-sum-row.is-grand dt { color: var(--mb-plum); font-weight: 700; font-size: calc(.95rem * var(--molly-fs, 1)); }
.molly-bill-root .mb-sum-row.is-grand dd { font-size: calc(1.55rem * var(--molly-fs, 1)); font-weight: 700; letter-spacing: -.03em; line-height: 1; }

.molly-bill-root .mb-steps { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--mb-line); }
.molly-bill-root .mb-steps h3 { font-size: calc(.8rem * var(--molly-fs, 1)); font-weight: 700; margin-bottom: 6px; }
.molly-bill-root .mb-steps ol { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.molly-bill-root .mb-steps li { display: flex; align-items: center; gap: 8px; font-size: calc(.78rem * var(--molly-fs, 1)); margin: 0; }
.molly-bill-root .mb-num { flex: 0 0 18px; height: 18px; border-radius: 50%; background: var(--mb-pink); color: #fff; font-size: calc(.7rem * var(--molly-fs, 1)); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.molly-bill-root .mb-foot { margin-top: 10px; text-align: center; font-size: calc(.72rem * var(--molly-fs, 1)); color: var(--mb-soft); }

.molly-bill-root .mb-update { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.molly-bill-root .mb-btn-ghost { background: #fff; border: 1px solid rgba(48,35,51,.2); color: var(--mb-plum); font-family: inherit; font-size: calc(.82rem * var(--molly-fs, 1)); font-weight: 600; line-height: 1.2; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.molly-bill-root.js-on .mb-btn-ghost { display: none; }
.molly-bill-root .mb-more { color: var(--mb-pink); font-weight: 600; font-size: calc(.85rem * var(--molly-fs, 1)); margin-left: auto; }
.molly-bill-root .mb-actions { margin-top: 14px; display: grid; grid-template-columns: 1fr; gap: 8px; }
.molly-bill-root .mb-btn-plum, .molly-bill-root .mb-btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 46px;
  font-family: inherit; font-size: calc(.92rem * var(--molly-fs, 1)); font-weight: 600; line-height: 1.2; padding: 12px; border-radius: 10px; border: 0; cursor: pointer; text-decoration: none;
}
.molly-bill-root .mb-btn-plum { background: var(--mb-plum); color: #fff; }
.molly-bill-root .mb-btn-plum:hover { background: #23181f; color: #fff; }
.molly-bill-root .mb-btn-plum:disabled { opacity: .5; cursor: wait; }
.molly-bill-root .mb-btn-line { background: var(--mb-line-green, #06C755); color: #fff; }
.molly-bill-root .mb-btn-line:hover { filter: brightness(.95); color: #fff; }
.molly-bill-root .mb-btn-line svg { width: 18px; height: 18px; flex: 0 0 18px; }
.molly-bill-root .mb-hint { margin-top: 8px; font-size: calc(.75rem * var(--molly-fs, 1)); color: var(--mb-soft); text-align: center; }
.molly-bill-root .mb-empty { text-align: center; padding: 40px 16px; }
.molly-bill-root .mb-empty p { margin-bottom: 14px; color: var(--mb-muted); }
.molly-bill-root .mb-empty .mb-btn-plum { width: auto; padding: 10px 22px; }
.molly-bill-root .mb-notices { margin-bottom: 10px; font-size: calc(.85rem * var(--molly-fs, 1)); }
.molly-bill-root.is-busy .mb-bill { opacity: .6; transition: opacity .2s; }

/* capture mode (used only inside the html2canvas clone) */
.molly-bill-root.is-capture .mb-no-print { display: none !important; }
.molly-bill-root.is-capture .mb-print-only { display: inline !important; }
.molly-bill-root.is-capture .mb-bill { box-shadow: none; }

@media (min-width: 721px) {
  .molly-bill-root .mb-bill { padding: 28px 28px 22px; }
  .molly-bill-root .mb-head img { width: 64px; height: 64px; flex-basis: 64px; }
  .molly-bill-root .mb-brand { font-size: calc(1.28rem * var(--molly-fs, 1)); }
  .molly-bill-root .mb-row { font-size: calc(.88rem * var(--molly-fs, 1)); }
  .molly-bill-root .mb-color { font-size: calc(.95rem * var(--molly-fs, 1)); }
  .molly-bill-root .mb-sum-row.is-grand dd { font-size: calc(1.8rem * var(--molly-fs, 1)); }
  .molly-bill-root .mb-actions { grid-template-columns: 1fr 1fr; }
}
@media print {
  .molly-bill-root .mb-no-print { display: none !important; }
  .molly-bill-root .mb-print-only { display: inline !important; }
}
.molly-bill-root .mb-ship-flag strong { font-weight: 700; color: var(--mb-plum); }

/* 1.2.0: two big buttons, numbered next steps, image preview for long-press saving */
.molly-bill-root .mb-btn-big { min-height: 54px; font-size: calc(1rem * var(--molly-fs, 1)); font-weight: 700; border-radius: 12px; gap: 10px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.molly-bill-root .mb-btn-big svg { width: 20px; height: 20px; flex: 0 0 20px; }
.molly-bill-root .mb-btn-big small { font-weight: 500; opacity: .85; font-size: .8em; margin-left: 4px; }
.molly-bill-root .mb-btn-big span { display: inline-flex; align-items: baseline; flex-wrap: wrap; justify-content: center; }
.molly-bill-root .mb-steps .mb-num { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; background: var(--mb-pink); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.molly-bill-root .mb-preview { margin-top: 12px; text-align: center; }
.molly-bill-root .mb-preview img { max-width: 100%; border: 1px solid var(--mb-line); border-radius: 10px; -webkit-touch-callout: default; }
.molly-bill-root .mb-preview-hint { font-size: calc(.82rem * var(--molly-fs, 1)); font-weight: 600; color: var(--mb-plum); margin: 0 0 8px; }

/* 1.2.0: bill page layout inside The7 – no sidebar column, no checkout steps (checkout is off), centred */
body.molly-bill-page #sidebar, body.molly-bill-page .checkout-page-title { display: none !important; }
body.molly-bill-page .wf-container-main { display: block !important; grid-template-columns: 100% !important; grid-template-areas: "content" !important; }
body.molly-bill-page #content { width: 100% !important; max-width: 100% !important; float: none !important; }
