/* Her Routine Co — checkout replica of the Shopify checkout (values measured live, 2026-10-05). */
:root {
  --accent: #175e17;
  --accent-dark: #0e440e;
  --accent-ring: rgba(23, 94, 23, 0.3);
  --text: #000;
  --muted: rgba(0, 0, 0, 0.56);
  --label: #707070;
  --border: #dedede;
  --line: #dfdfdf;
  --grey: #f6f6f6;
  --selected: #f3f8f3;
  --error: #d91c1c;
  --radius: 12px;
  --heading: Montserrat, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 14px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.hdr { height: 80px; border-bottom: 1px solid var(--line); background: #fff; }
.hdr-in { position: relative; height: 100%; width: min(980px, calc(100% - 28px)); margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.hdr .logo img { display: block; width: 120px; height: auto; }
.hdr .bag { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; color: var(--accent); display: block; }

/* ---------- layout ---------- */
.wrap { width: min(980px, calc(100% - 64px)); margin: 0 auto; display: grid; grid-template-columns: 55.1% 44.9%; }
.col-main { padding: 40px 40px 64px 0; min-width: 0; }
.col-side { border-left: 1px solid var(--line); padding: 40px 0 40px 40px; min-height: calc(100vh - 81px); min-width: 0; }
.side-in { position: sticky; top: 40px; }

/* ---------- headings ---------- */
.h2 { font: 700 20px/24px var(--heading); margin: 0 0 14px; color: var(--text); }
.h3 { font: 700 16px/19.2px var(--heading); margin: 0 0 14px; color: var(--text); }
.sec { margin-top: 32px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.sec-head a { font-size: 14px; text-decoration: underline; }
.sub-muted { margin: -10px 0 14px; color: var(--muted); }

/* ---------- express ---------- */
.express-t { text-align: center; color: var(--muted); font-size: 14px; font-weight: 400; margin: 0 0 14px; }
.express-btns { display: flex; gap: 10px; justify-content: center; }
.express-btns .xbtn { flex: 1 1 0; max-width: 100%; height: 48px; border: 0; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.express-btns.one .xbtn { flex: 0 0 262px; }
.xbtn.paypal { background: #ffc439; }
.xbtn.paypal img { height: 20px; }
.xbtn.paypal_express { background: #ffc439; }
.xbtn.google_pay, .xbtn.apple_pay { background: #000; color: #fff; }
.express-legal { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.express-legal a { color: var(--muted); }
.or { display: flex; align-items: center; gap: 16px; color: var(--muted); margin: 20px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- fields (floating label) ---------- */
.stack > * + * { margin-top: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.fld { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .12s, box-shadow .12s; }
.fld input, .fld select {
  display: block; width: 100%; height: 47px; margin: 0; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--text); font: inherit; font-size: 14px; line-height: 18.9px;
  padding: 13.55px 10px; outline: none; -webkit-appearance: none; appearance: none;
}
.fld input::placeholder { color: var(--label); opacity: 1; }
.fld > label {
  position: absolute; left: 11px; top: 6px; font-size: 12px; line-height: 16.2px; color: var(--label);
  pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 22px);
}
.fld.filled > label { opacity: 1; transform: none; }
.fld.filled input { padding: 21.05px 10px 6.05px; }
.fld.has-icon input { padding-right: 40px; }
.fld:focus-within { border-color: var(--accent); box-shadow: 0 0 0 0.5px var(--accent); outline: 3px solid var(--accent-ring); outline-offset: 0; }
.fld.err { border-color: var(--error); box-shadow: 0 0 0 0.5px var(--error); }
.fld.err:focus-within { outline-color: rgba(217, 28, 28, 0.3); }
.err-msg { color: var(--error); font-size: 14px; margin-top: 6px; display: flex; gap: 6px; align-items: flex-start; }

/* selects: label always on top once a value exists; empty -> label acts as placeholder */
.fld.sel select { height: 49px; padding: 21.05px 30px 6.05px 10px; cursor: pointer; }
.fld.sel > label { opacity: 1; transform: none; }
.fld.sel.empty > label { top: 15px; font-size: 14px; line-height: 18.9px; }
.fld.sel.empty select { color: transparent; }
.fld.sel .chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--label); pointer-events: none; }

/* icons inside fields */
.fld .ico { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--label); display: flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0; cursor: default; }
button.ico { cursor: pointer; }
.tip { position: absolute; bottom: calc(100% + 8px); right: -6px; width: max-content; max-width: 200px; background: #000; color: #fff; font-size: 12px; line-height: 1.35; text-align: center; padding: 8px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5; }
.tip::after { content: ""; position: absolute; top: 100%; right: 12px; border: 6px solid transparent; border-top-color: #000; }
.ico:hover .tip, .ico:focus-visible .tip, .ico.open .tip { opacity: 1; }
@media (hover: none) { .ico:hover .tip { opacity: 0; } .ico.open .tip { opacity: 1; } }

/* checkbox */
.chk { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 14px; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk .box { flex: 0 0 18px; width: 18px; height: 18px; border: 1px solid var(--border); border-radius: 5px; background: #fff; display: flex; align-items: center; justify-content: center; transition: background .12s, border-color .12s; }
.chk .box svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.chk input:checked + .box { background: var(--accent); border-color: var(--accent); }
.chk input:checked + .box svg { opacity: 1; }
.chk input:focus-visible + .box { outline: 3px solid var(--accent-ring); }
.mt10 { margin-top: 10px; }

/* address suggestions */
.suggest { position: absolute; left: -1px; right: -1px; top: calc(100% + 4px); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); z-index: 10; overflow: hidden; padding: 6px 0; }
.suggest button { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; border: 0; background: #fff; padding: 10px 12px; cursor: pointer; font-size: 14px; }
.suggest button:hover, .suggest button.active { background: var(--grey); }
.suggest .pin { width: 16px; height: 16px; color: var(--label); flex: 0 0 16px; }
.suggest .main { font-weight: 600; }
.suggest .sec2 { color: var(--muted); }
.suggest .powered { font-size: 11px; color: var(--muted); text-align: right; padding: 6px 12px 2px; }

/* ---------- shipping method ---------- */
.ship-empty { background: var(--grey); border-radius: var(--radius); padding: 16px; text-align: center; color: var(--muted); }
.ship-warn { display: flex; gap: 10px; align-items: flex-start; background: #fff8ed; border: 1px solid #f3d9b1; border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.ship-warn svg { flex: 0 0 18px; width: 18px; height: 18px; color: #8a5300; margin-top: 1px; }
.ship-label { font-weight: 700; font-size: 14px; margin: 14px 0 10px; }
.ship-label:first-child { margin-top: 0; }
.opts { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.opt { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; position: relative; }
.opt + .opt { border-top: 1px solid var(--border); }
.opt.sel { background: var(--selected); }
.opts.single { border-color: var(--accent); box-shadow: 0 0 0 0.5px var(--accent); }
.opts:not(.single) .opt.sel { box-shadow: inset 0 0 0 1px var(--accent); }
.opts:not(.single) .opt.sel:first-child { border-radius: 11px 11px 0 0; }
.opts:not(.single) .opt.sel:last-child { border-radius: 0 0 11px 11px; }
.opts:not(.single) .opt.sel:only-child { border-radius: 11px; }
.opt .txt { flex: 1; min-width: 0; }
.opt .nm { font-weight: 600; }
.opt .price { font-weight: 600; white-space: nowrap; }
.recurring-box { background: var(--grey); border-radius: var(--radius); padding: 14px; }

/* radio */
.rad { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; }
.sel > .rad, .rad.on, .acc-item.sel .acc-head .rad { background: var(--accent); border-color: var(--accent); }
.sel > .rad::after, .rad.on::after, .acc-item.sel .acc-head .rad::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }

/* ---------- payment accordion ---------- */
.acc { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.acc-item + .acc-item { border-top: 1px solid var(--border); }
.acc-head { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; min-height: 50px; position: relative; }
.acc-item.sel .acc-head { background: var(--selected); box-shadow: inset 0 0 0 1px var(--accent); }
.acc-item.sel:first-child .acc-head { border-radius: 11px 11px 0 0; }
.acc-item.sel:last-child:not(.open) .acc-head { border-radius: 0 0 11px 11px; }
.acc-head .nm { flex: 1; }
.acc-head .nm small { display: block; color: var(--muted); font-size: 14px; }
.logos { display: flex; gap: 4px; align-items: center; }
.logos img { display: block; width: 38px; height: 24px; }
.logos .more { min-width: 24px; height: 24px; padding: 0 4px; border: 1px solid var(--border); border-radius: 4px; font-size: 11px; display: flex; align-items: center; justify-content: center; background: #fff; }
.acc-body { background: var(--grey); padding: 16px; border-top: 1px solid var(--border); }
.acc-body .row2 { gap: 11px; }
.pp-note { text-align: center; color: var(--muted); padding: 6px 12px; }

/* Whop hosted card fields sit inside .fld.card; our label + icons are overlays */
.fld.card { height: 49px; }
.fld.card .frame { position: absolute; left: 0; right: 0; bottom: 0; top: 0; overflow: hidden; border-radius: var(--radius); }
/* Empty + unfocused: the label is a white mask over the hosted input, so the buyer sees "Card number" exactly like Shopify
   (Whop's own placeholder text cannot be changed). Focused or filled: it floats to the top as a 12px label. */
.fld.card > label { top: 1px; left: 1px; right: 1px; bottom: 1px; max-width: none; display: flex; align-items: center; padding: 0 10px; background: #fff; border-radius: 11px; z-index: 2; font-size: 14px; line-height: 18.9px; opacity: 1; transform: none; transition: none; }
.fld.card.has-icon > label { right: 40px; border-radius: 11px 0 0 11px; }
.fld.card .ico { z-index: 3; }
.fld.card.filled > label, .fld.card.focused > label { top: 6px; left: 11px; right: auto; bottom: auto; display: block; padding: 0; background: transparent; font-size: 12px; line-height: 16.2px; }
.fld.card.focused { border-color: var(--accent); box-shadow: 0 0 0 0.5px var(--accent); outline: 3px solid var(--accent-ring); }

/* ---------- legal + pay ---------- */
.legal { margin: 32px 0 0; font-size: 14px; line-height: 1.35; }
.legal a { color: inherit; text-decoration: underline; }
.pay-btn { display: block; width: 100%; height: 50px; margin-top: 24px; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; padding: 14px; }
.pay-btn:hover { background: var(--accent-dark); }
.pay-btn[disabled] { cursor: progress; opacity: .85; }
.pay-btn .spin { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-err { margin-top: 12px; }
.branding { margin-top: 12px; }
.foot { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.foot a { font-size: 14px; text-decoration: underline; }

/* ---------- summary ---------- */
.items > * + * { margin-top: 16px; }
.item { display: flex; align-items: center; gap: 14px; }
.thumb { position: relative; flex: 0 0 64px; width: 64px; height: 64px; border-radius: 16px; background: var(--grey); }
.thumb img { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 16px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.thumb .q { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #000; color: #fff; font: 600 12px/20px -apple-system, sans-serif; text-align: center; }
.item .ttl { flex: 1; min-width: 0; }
.item .ttl small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.item .pr { white-space: nowrap; }
.item .pr s { color: var(--muted); display: block; font-size: 12px; text-align: right; }
.disc { display: flex; gap: 10px; margin-top: 20px; align-items: flex-start; }
.disc .fld { flex: 1; }
.disc .apply { height: 49px; padding: 14px; border: 0; border-radius: var(--radius); background: var(--grey); color: var(--muted); font-weight: 600; cursor: default; }
.disc .apply.ready { background: var(--accent); color: #fff; cursor: pointer; }
.disc .apply.ready:hover { background: var(--accent-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #e8e8e8; border-radius: 6px; padding: 4px 6px 4px 8px; font-size: 12px; font-weight: 600; }
.chip svg { width: 12px; height: 12px; }
.chip button { border: 0; background: none; padding: 0; display: flex; cursor: pointer; color: var(--muted); }
.lines { margin-top: 20px; }
.ln { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ln + .ln { margin-top: 8px; }
.ln .q-ico { display: inline-flex; vertical-align: middle; margin-left: 4px; position: relative; color: var(--label); background: none; border: 0; padding: 0; cursor: pointer; transform: none; top: auto; right: auto; width: auto; height: auto; }
.ln .q-ico svg { width: 14px; height: 14px; }
.ln .q-ico .tip { right: auto; left: 50%; transform: translateX(-50%); bottom: calc(100% + 8px); font-weight: 400; width: 220px; white-space: normal; }
.ln .q-ico .tip::after { right: auto; left: 50%; margin-left: -6px; }
.ln .muted { color: var(--muted); }
.ln.total { margin-top: 16px; font-size: 18px; font-weight: 600; }
.ln.total .cur { font-size: 12px; font-weight: 400; color: var(--muted); margin-right: 8px; }
.ln.recurring { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; font-weight: 600; }

/* ---------- policy pop-up ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.modal-box { position: relative; background: #fff; border-radius: 16px; width: min(480px, 100%); max-height: min(80vh, 640px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-title { margin: 0; font: 700 20px/24px var(--heading); }
.modal-x { width: 32px; height: 32px; border: 0; background: none; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-x:hover { background: var(--grey); }
.modal-body { padding: 20px 24px 28px; overflow-y: auto; line-height: 1.5; }
.modal-body h1, .modal-body h2, .modal-body h3 { font-family: var(--heading); }
.modal-body a { color: var(--accent); }
.modal-body .loading { color: var(--muted); }
body.modal-open { overflow: hidden; }

/* ---------- mobile ---------- */
.m-bar, .m-sum, .m-bottom { display: none; }
@media (max-width: 749px) {
  .hdr-in { width: calc(100% - 28px); }
  .wrap { display: block; width: auto; }
  .col-side { display: none; }
  .col-main { padding: 0 14px 40px; }
  .m-bar { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 14px; background: var(--grey); border-bottom: 1px solid var(--line); width: 100%; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; }
  .m-bar .lbl { color: var(--accent); display: flex; align-items: center; gap: 4px; }
  .m-bar .lbl svg { width: 14px; height: 14px; transition: transform .15s; }
  .m-bar[aria-expanded="true"] .lbl svg { transform: rotate(180deg); }
  .m-bar .amt { font-size: 18px; font-weight: 600; }
  .m-sum { display: block; padding: 20px 14px; border-bottom: 1px solid var(--line); }
  .m-sum[hidden] { display: none !important; }
  .express { padding-top: 28px; }
  .row2.names, .row3, .acc-body .row2 { grid-template-columns: 1fr; }
  .row2.names > * + *, .row3 > * + *, .acc-body .row2 > * + * { margin-top: 0; }
  .row2:not(.names):not(.cardrow).addr2 { grid-template-columns: 1fr; }
  .express-btns { flex-direction: column; }
  .express-btns.one .xbtn { flex: 0 0 48px; width: 100%; }
  .m-bottom { display: block; margin-top: 32px; }
  .m-bottom .add-disc { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; font-weight: 600; cursor: pointer; }
  .m-bottom .add-disc svg { width: 16px; height: 16px; }
  .m-tot { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
  .m-tot .thumb { flex-basis: 48px; width: 48px; height: 48px; border-radius: 12px; }
  .m-tot .thumb img { width: 48px; height: 48px; border-radius: 12px; }
  .m-tot .t { flex: 1; }
  .m-tot .t b { display: block; font-size: 18px; }
  .m-tot .t span { color: var(--muted); }
  .m-tot .cur { background: var(--grey); border-radius: 12px; padding: 2px 8px; font-size: 12px; color: var(--muted); margin-right: 8px; }
  .m-tot .amt { font-size: 18px; font-weight: 600; }
  .legal { margin-top: 24px; }
  .pay-btn { margin-top: 16px; }
}
