/* merchant.css: what only the merchant hub draws.
 *
 * The kit's tiles carry the screens; this adds the few shapes the hub alone needs: a status tag in a
 * status's colour, a tile that is the chosen one of a set, big chips for a form, a range control,
 * the audience sizer and its private state, the offer preview, a plan's tile, and Ana's answer.
 * Logical properties only; nothing under 12px; a control is 44px or more.
 */

/* ---------------------------------------------------------------- shared */

.t-photo .tag.amber { background: var(--amber); color: var(--amber-ink); }
.t-photo .tag.blue { background: var(--blue); color: var(--blue-ink); }
.t-photo .tag.inv { background: var(--inv); color: var(--inv-ink); }
button.t { text-align: start; font: inherit; }
/* Two grids one under another keep the grid's gap. */
.cs-page > .cgrid + .cgrid { margin-block-start: var(--cs-gap); }
button.t[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--ink); }
button.t.tone-amber[aria-pressed="true"], button.t.tone-mint[aria-pressed="true"] { box-shadow: inset 0 0 0 3px currentColor; }

/* A chip on a surface needs a ground of its own. */
.t.surf .chip:not(.on):not([aria-pressed="true"]):not(.lav):not(.mint):not(.amber):not(.coral),
.sheet .chip:not(.on):not([aria-pressed="true"]):not(.lav):not(.mint):not(.amber):not(.coral) { background: var(--surface2); }
.mh-choice .chip { min-block-size: 48px; padding-inline: 18px; border-radius: 24px; font-size: 14.5px; }
.mh-choice .chip .ico { inline-size: 18px; block-size: 18px; }

.mh-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.mh-actions.start { justify-content: flex-start; }
.mh-cap { font: 500 12px var(--text); color: var(--muted); }
.mh-small { font-size: 13px; color: var(--muted); line-height: 1.45; }
.mh-h3 { margin: 6px 0 0; font: 600 14px var(--text); }
.mh-readout { display: grid; gap: 6px; padding-block: 4px 8px; }
.mh-readout .big { font-size: 52px; }
.mh-readout .un { color: var(--muted); font-weight: 500; }
.mh-deal { font-size: 40px; white-space: normal; line-height: 1.05; }
.t-card .mh-deal + .un { margin-block-start: 6px; color: var(--muted); font-weight: 500; }
.t-card > .note, .t-card .note { font-size: 13.5px; line-height: 1.5; color: var(--muted); margin: 10px 0 0; }
.t-card > .fill { padding-block-start: 14px; }
.t-card > .note + .chips, .t-card > .kv + .chips { margin-block-start: 12px; }
.t-card code, .sheet code { font: 600 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.t-card .because, .sheet .because { background: var(--surface2); }

/* A quiet line of explanation with an icon: something the platform says, set small. */
.mh-quiet { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 22px; background: var(--surface); color: var(--muted); }
.t-card .mh-quiet { background: var(--surface2); margin-block-end: 14px; }
.mh-quiet .ico { inline-size: 18px; block-size: 18px; flex: none; margin-block-start: 2px; }
.mh-quiet b { display: block; font: 600 13px var(--text); color: var(--ink); }
.mh-quiet small { display: block; font-size: 13px; line-height: 1.5; }

/* How ready a draft is: a ring, a count, and what is still missing. */
.mh-ready { display: flex; gap: 16px; align-items: center; }
.mh-ready b { display: block; font: 600 16px var(--display); letter-spacing: -0.01em; }
.mh-ready small { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; margin-block-start: 2px; }
.mh-ready .ringbox { flex: none; position: relative; display: grid; place-items: center; }
.mh-ready .ringbox b { position: absolute; font: 700 14px var(--display); }
.mh-unmet { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; line-height: 1.45; color: var(--bad); }
.mh-unmet:empty { display: none; }

/* ---------------------------------------------------------------- the campaign's panel */

.sheet .mh-panel { --cs-row: 132px; }
.sheet .mh-panel .t.surf { background: var(--surface); }
@media (min-width: 900px) { .sheet .mh-panel { grid-template-columns: repeat(12, minmax(0, 1fr)); } .sheet .mh-panel > .s7 { grid-column: span 7; } .sheet .mh-panel > .s5 { grid-column: span 5; } .sheet .mh-panel > .s6 { grid-column: span 6; } }
@media (max-width: 899px) { .sheet .mh-panel > * { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- the new campaign form */

.mh-form .form { gap: 18px; }
.t h3.mh-step { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin: 10px 0 0; font: 600 18px var(--display); letter-spacing: -0.02em; }
.t h3.mh-step:first-child { margin-block-start: 0; }
.mh-form textarea.inp { min-block-size: 76px; }
.mh-step i { inline-size: 28px; block-size: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--inv); color: var(--inv-ink); font: 700 13px var(--display); font-style: normal; flex: none; }
.inp.mh-bignum { font: 700 26px var(--display); min-block-size: 60px; }
.mh-side { gap: 16px; align-self: start; position: sticky; inset-block-start: 16px; }
.mh-preview { display: grid; gap: 10px; }
.mh-offer { min-block-size: 260px; }
.mh-offer .big { font-size: 28px; }
.mh-copy { margin: 0; font-size: 14.5px; line-height: 1.5; }
.mh-copy.soft { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- the audience builder */

.mh-crits { display: grid; gap: 22px; }
.mh-crit { display: grid; gap: 10px; }
.mh-crit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mh-crit-head b { font: 600 14.5px var(--text); }
.mh-val { font: 700 15px var(--display); white-space: nowrap; }
.mh-range { appearance: none; -webkit-appearance: none; inline-size: 100%; block-size: 44px; background: none; margin: 0; cursor: pointer; }
.mh-range::-webkit-slider-runnable-track { block-size: 8px; border-radius: 4px; background: linear-gradient(to right, var(--ink) calc(var(--p, 0) * 1%), var(--surface2) 0); }
[dir="rtl"] .mh-range::-webkit-slider-runnable-track { background: linear-gradient(to left, var(--ink) calc(var(--p, 0) * 1%), var(--surface2) 0); }
.mh-range::-moz-range-track { block-size: 8px; border-radius: 4px; background: var(--surface2); }
.mh-range::-moz-range-progress { block-size: 8px; border-radius: 4px; background: var(--ink); }
.mh-range::-webkit-slider-thumb { -webkit-appearance: none; inline-size: 26px; block-size: 26px; border-radius: 50%; background: var(--ink); border: 4px solid var(--surface); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); margin-block-start: -9px; }
.mh-range::-moz-range-thumb { inline-size: 18px; block-size: 18px; border-radius: 50%; background: var(--ink); border: 4px solid var(--surface); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.mh-range:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 8px; }

.mh-sizer { transition: opacity 0.16s; gap: 8px; }
.mh-sizer.busy { opacity: 0.6; }
.mh-sizer .big { font-size: clamp(48px, 4.6vw, 64px); letter-spacing: -0.04em; padding-block-start: 0; margin-block-start: 28px; }
.mh-push { flex: 1 1 auto; }
.mh-sizer .un { font-size: 14px; }
.mh-sizer .bar { block-size: 10px; margin-block: 10px 4px; }
.mh-sizer .chips { margin-block-start: 10px; }
.mh-sizer .chip { background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; }
.mh-save { display: flex; gap: 8px; margin-block-start: 14px; }
.mh-save .inp { background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; box-shadow: none; }
.mh-save .inp::placeholder { color: inherit; opacity: 0.7; }
.mh-save .btn { flex: none; }
.mh-sizer.mh-private .big { font-size: 40px; white-space: normal; line-height: 1.05; margin-block-start: 0; }
.mh-sizer.mh-private .un { font-weight: 500; color: var(--muted); line-height: 1.5; max-inline-size: 36ch; }
.mh-shield { inline-size: 96px; block-size: 96px; border-radius: 34px; display: grid; place-items: center; background: var(--inv); color: var(--inv-ink); margin-block: 30px 22px; box-shadow: 0 0 0 10px color-mix(in srgb, var(--ink) 8%, transparent), 0 0 0 22px color-mix(in srgb, var(--ink) 4%, transparent); margin-inline-start: 22px; }
.mh-shield .ico { inline-size: 40px; block-size: 40px; }

/* ---------------------------------------------------------------- business */

.mh-contract .kv { margin-block-start: 14px; }
.mh-contract .kv > div { font-size: 13.5px; padding-block: 8px; }
.mh-plan { gap: 6px; }
.mh-plan .lbl { font: 600 18px var(--display); letter-spacing: -0.02em; }
.mh-plan .big { font-size: 44px; margin-block-start: 0; padding-block-start: 14px; }
.mh-plan .un { margin-block-start: 2px; opacity: 0.75; font-weight: 500; }
.mh-feats { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; font-weight: 500; }
.mh-feats li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; }
.mh-feats li.lead { font-size: 12.5px; opacity: 0.7; }
.mh-feats .ico { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 2px; stroke-width: 2.4; }
.mh-plan .mh-actions { margin-block-start: auto; padding-block-start: 14px; }
/* The plan the merchant is on: marked with a ring, not with a colour that means something else. */
.mh-plan.mh-current { box-shadow: inset 0 0 0 3px var(--ink); }
.mh-when { display: block; font: 600 22px/1.2 var(--display); letter-spacing: -0.02em; margin-block-start: 10px; }
.t-card .switchrow + .switchrow { border-block-start: 1px solid var(--line); }
.mh-secret { display: block; padding: 18px; border-radius: 20px; background: var(--surface2); font-size: 15px !important; line-height: 1.5; user-select: all; }

/* ---------------------------------------------------------------- Ana */

.mh-hello { border-radius: 36px; padding: 40px 32px; display: grid; justify-items: start; gap: 8px; }
.mh-hello h2 { margin: 12px 0 0; font: 700 34px/1.1 var(--display); letter-spacing: -0.035em; }
.mh-hello p { margin: 0; font-size: 15.5px; line-height: 1.5; max-inline-size: 46ch; opacity: 0.85; }
.mh-orb { inline-size: 64px; block-size: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--lav-ink); color: var(--lav); }
.mh-orb .ico { inline-size: 30px; block-size: 30px; }
.mh-suggest { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.mh-suggest small { font: 600 13px var(--text); color: var(--muted); }
.mh-suggest .chip { min-block-size: 44px; padding-inline: 16px; border-radius: 22px; font-size: 14px; }
.ask .bubble p { margin: 0; }
.ask .bubble.ana { max-inline-size: 92%; display: grid; gap: 14px; }
.mh-art { display: grid; gap: 12px; padding: 16px; border-radius: 20px; background: color-mix(in srgb, currentColor 8%, transparent); justify-items: start; }
.mh-art > b { font: 600 14px var(--text); }
.mh-art .rank { inline-size: 100%; }
.mh-art .rank .pos, .mh-art .rank small { color: inherit; opacity: 0.7; }
.mh-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 20px; inline-size: 100%; }
.mh-figs .big { font-size: 30px; }
.mh-figs small { display: block; font-size: 13px; line-height: 1.35; opacity: 0.8; margin-block-start: 4px; }
.mh-asof { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; opacity: 0.75; }
.mh-asof .ico { inline-size: 14px; block-size: 14px; }

/* The city a payment did not name: last in its list, and quiet. */
.dist .rowd.mh-dim { color: var(--muted); }
.dist .rowd.mh-dim b { font-weight: 500; }
.dist .rowd.mh-dim .bar { opacity: 0.5; }
.rank li.mh-dim { color: var(--muted); }
.rank li.mh-dim b { font-weight: 500; }
.rank li.mh-dim .bar { opacity: 0.5; }

@media (max-width: 1180px) {
  .mh-side { position: static; }
  /* Six columns: a gallery's odd tile out takes the whole row. */
  .cgrid > .t.mh-odd { grid-column: span 6; }
  /* A state sized for twelve columns must not ask six for eight; and the door beside a wide list or state takes the row under it. */
  .cgrid > .state.s8, .cgrid > .state.s6 { grid-column: span 6; }
  .cgrid > .state.s4 { grid-column: span 3; }
  .cgrid > .state.s8 + .t-door, .cgrid > .t-list.s8 + .t-door { grid-column: span 6; }
}
@media (max-width: 640px) {
  .cgrid > .state.s4 { grid-column: span 6; }
  /* A date as a tile's number has to fit half a phone. */
  .t-kpi.mh-fit .big { font-size: 28px; }
  .mh-save { flex-direction: column; }
  .mh-hello { padding: 28px 22px; }
  .mh-hello h2 { font-size: 28px; }
  .mh-readout .big { font-size: 42px; }
}
