/* The Modules and "Make it yours" sections (modules.js). Uses the tokens in styles.css. */

/* ---------- Modules: pick a plan, switch modules on and off ---------- */
.mod-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.mod-plan { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 12px; cursor: pointer; background: var(--card); border: 1px solid var(--line); color: var(--muted); font: 500 13px/1.4 "Space Grotesk", sans-serif; }
.mod-plan b { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--text); }
.mod-plan:hover { border-color: color-mix(in srgb, var(--pc) 45%, var(--line-2)); }
.mod-plan[aria-checked="true"] { background: color-mix(in srgb, var(--pc) 12%, var(--card)); border-color: var(--pc); }
.mod-plan[aria-checked="true"] b { color: var(--pc); }
.mod-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--pc); }
/* Two columns of modules, each plan's heading across both. */
.mod-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.mod-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 10px 0 2px; }
.mod-group:first-child { margin-top: 0; }
.mod-list { align-items: start; }
.mod-item { border-radius: 10px; background: var(--card); border: 1px solid var(--line); transition: border-color .2s; }
.mod-item:hover, .mod-item.open { border-color: color-mix(in srgb, var(--pc) 50%, var(--line-2)); }
.mod-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 14px; border-radius: 10px; cursor: pointer; background: none; border: 0; color: var(--text); font: inherit; }
.mod-chev { flex: none; color: var(--dim); transition: transform .25s; }
.mod-item.open .mod-chev { transform: rotate(180deg); color: var(--pc); }
.mod-snip { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.mod-item.open .mod-snip { grid-template-rows: 1fr; }
.mod-snip-in { overflow: hidden; padding: 0 14px; }
.mod-item.open .mod-snip-in { padding-bottom: 14px; }
.mod-item.locked .mod-row { opacity: .6; }

/* the snippets */
.sn-card, .sn-label, .sn-import, .sn-weigh, .sn-cust, .sn-screen, .sn-online { display: flex; flex-direction: column; gap: 9px; padding: 14px; border-radius: 10px; background: var(--inset); border: 1px solid var(--line); font-size: 13px; }
.sn-cap { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 10px; }
.sn-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sn-dim { color: var(--dim); }
.sn-small { font-size: 11px; }
.sn-big { font-size: 20px; font-variant-numeric: tabular-nums; }
.sn-green { color: var(--green); }
.sn-btn { display: flex; align-items: center; justify-content: center; height: 34px; border-radius: 8px; background: var(--btn); color: var(--on-btn); font-weight: 700; font-size: 12px; }
.sn-btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.sn-tag { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--t) 22%, transparent); color: color-mix(in srgb, var(--t) 70%, #fff); }
.sn-lines { display: flex; flex-direction: column; }
.sn-lines > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sn-lines > div:last-child { border-bottom: 0; }
.sn-line { padding: 4px 0; border-bottom: 1px solid var(--line); }
.sn-save { color: #5eead4; }
/* shelf label */
.sn-label { background: #fff; color: #111; border: 0; max-width: 280px; }
.sn-label-name { font-weight: 700; font-size: 14px; }
.sn-label-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.sn-bars { width: 120px; height: 44px; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px, #111 8px 11px, transparent 11px 12px); }
.sn-label-price { font-size: 30px; font-weight: 700; line-height: 1; }
.sn-label-foot { display: flex; justify-content: space-between; font: 10px ui-monospace, Consolas, monospace; color: #555; }
/* import */
.sn-file { display: flex; align-items: center; gap: 10px; }
.sn-file > span:last-child { display: flex; flex-direction: column; }
.sn-file-icon { width: 36px; height: 36px; border-radius: 8px; background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.sn-bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.sn-bar i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.mod-item.open .sn-bar i { animation: sn-fill 1.2s ease; }
@keyframes sn-fill { from { width: 0 !important; } }
.sn-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12px; }
.sn-checks span { display: flex; align-items: center; gap: 5px; }
.sn-checks svg { color: var(--green); }
/* weigh */
.sn-scale { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 10px; border-radius: 8px; background: #0a0f0d; border: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.sn-scale span { font-size: 30px; font-weight: 700; color: var(--green); }
.sn-scale small { color: var(--dim); }
/* customer */
.sn-cust .sn-row:first-child { justify-content: flex-start; }
.sn-cust .sn-row > span:last-child { display: flex; flex-direction: column; }
.sn-avatar { width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, #14B8A6 30%, transparent); color: #5eead4; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.sn-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sn-stats span { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; background: var(--card); }
.sn-stats small { color: var(--dim); font-size: 11px; }
.sn-stats b { font-size: 17px; }
.sn-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sn-pay span { display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 8px; border: 1px solid #14B8A6; color: #5eead4; font-weight: 700; font-size: 12px; }
/* customer display */
.sn-screen { background: #0a0f0d; }
.sn-hello { font-weight: 700; font-size: 16px; }
/* online shop */
.sn-online { flex-direction: row; gap: 12px; }
.sn-prod { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 8px; border-radius: 8px; background: #f6f7f5; color: #1c2420; }
.sn-img { position: relative; height: 56px; border-radius: 6px; background: linear-gradient(135deg, #ecefec, #dfe4e0); }
.sn-img span { position: absolute; top: 6px; left: 6px; padding: 2px 6px; border-radius: 4px; background: #7a2848; color: #fff; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.sn-prod s { color: #8a948f; font-size: 11px; }
.sn-prod .sn-btn { height: 26px; font-size: 11px; background: #2f7a4f; color: #fff; }
.sn-order { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; justify-content: center; }
.mod-item .so-strip { margin: 4px 2px 0; }
.mod-text { display: flex; flex-direction: column; gap: 2px; margin-right: auto; min-width: 0; }
.mod-text b { font-size: 15px; }
.mod-text span { font-size: 13px; color: var(--dim); line-height: 1.4; }
.mod-lock { font-size: 11px; font-weight: 600; color: var(--amber); white-space: nowrap; }

/* ---------- The heading beside a carousel of module snippets (carousel.js) ---------- */
.mod-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px clamp(32px, 5vw, 64px); align-items: center; margin-bottom: 40px; }
.mod-head .sec-head { margin-bottom: 0; }
.fc { display: flex; flex-direction: column; gap: 12px; }
.fc-stage { position: relative; height: 262px; }
.fc-slide { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; transform: translateX(24px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.fc-slide.on { opacity: 1; transform: none; pointer-events: auto; }
.fc-card, .fc-screen { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.fc-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; }
.fc-muted { color: var(--dim); }
.fc-sm { font-size: 12px; }
.fc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fc-title { font-size: 13px; font-weight: 600; color: var(--muted); }
.fc-dots { display: flex; gap: 6px; }
.fc-dot { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: var(--line-2); cursor: pointer; transition: width .25s, background .25s; }
.fc-dot[aria-selected="true"] { width: 22px; background: var(--green); }

/* Special orders */
.so-strip { display: flex; align-items: flex-start; margin: 8px 4px 0; }
.so-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; flex: none; width: 22px; }
.so-num { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--dim); border: 2px solid var(--line-2); transition: background .35s, border-color .35s, color .35s; }
.so-step span { font-size: 10px; color: var(--dim); white-space: nowrap; }
.so-step.done .so-num { background: var(--c); border-color: var(--c); color: var(--ink); }
.so-step.current .so-num { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c); color: var(--c); }
.so-step.current span { color: var(--c); font-weight: 700; }
.so-link { flex: 1; height: 2px; margin-top: 10px; background: var(--line-2); position: relative; }
.so-link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--from), var(--to)); transform: scaleX(0); transform-origin: left; transition: transform .45s ease; }
.so-link.on::after { transform: scaleX(1); }
.so-status { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin-top: 4px; }
.so-dot { width: 9px; height: 9px; border-radius: 50%; transition: background .35s; }
.so-mail { color: var(--green); opacity: 0; transition: opacity .3s; min-height: 16px; }
.so-mail.on { opacity: 1; }

/* Staff rota */
.rota-grid { display: grid; grid-template-columns: 52px repeat(6, minmax(0, 1fr)); gap: 4px; font-size: 11px; }
.rota-day { text-align: center; color: var(--dim); font-weight: 600; }
.rota-name { color: var(--muted); align-self: center; }
.rota-cell { height: 30px; border-radius: 6px; background: #1a2120; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 10px; }
.rota-cell.on { background: color-mix(in srgb, #3B82F6 30%, #1a2120); color: #cfe0ff; animation: fc-pop .3s ease; }

/* Customer display */
.fc-screen { background: #0c1110; gap: 8px; padding: 16px 18px; }
.cd-hello { font-size: 17px; font-weight: 700; }
.cd-lines { display: flex; flex-direction: column; gap: 5px; min-height: 84px; }
.cd-line { display: flex; justify-content: space-between; font-size: 14px; padding-bottom: 5px; border-bottom: 1px solid var(--line); animation: fc-pop .3s ease; }
.cd-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--dim); }
.cd-total b { font-size: 26px; color: var(--green); font-variant-numeric: tabular-nums; }
.cd-thanks { display: none; font-weight: 700; font-size: 15px; color: var(--green); }
.cd-thanks span { display: inline; margin-left: 8px; font-weight: 500; font-size: 12px; color: var(--dim); }
.cd-thanks.on { display: block; animation: fc-pop .35s ease; }
.fc-screen.paid .cd-lines { opacity: .45; }

/* Promotions */
.pr-badge { padding: 3px 8px; border-radius: 6px; background: color-mix(in srgb, #14B8A6 25%, transparent); color: #5eead4; font-size: 11px; font-weight: 700; }
.pr-line { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; font-size: 15px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pr-qty { font-weight: 700; color: var(--text); }
.pr-total { font-size: 22px; font-variant-numeric: tabular-nums; }
.pr-total.bump { animation: fc-pop .35s ease; }
.pr-save { display: flex; justify-content: space-between; font-size: 13px; color: #5eead4; opacity: 0; transition: opacity .3s; }
.pr-save.on { opacity: 1; }
@keyframes fc-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- Make it yours: name, colour and card style on a mock online shop and receipt ---------- */
.split-custom { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.cz-controls { display: flex; flex-direction: column; gap: 16px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.cz-field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--dim); }
.cz-field input { height: 42px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--inset); color: var(--text); font: 500 15px "Space Grotesk", sans-serif; }
.cz-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.cz-swatch { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; background: var(--sw); border: 2px solid transparent; }
.cz-swatch[aria-checked="true"] { border-color: var(--text); box-shadow: inset 0 0 0 3px var(--bg); }
.cz-styles { display: flex; gap: 8px; flex-wrap: wrap; }
.cz-style { height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer; background: transparent; color: var(--muted); border: 1px solid var(--line-2); font: 600 13px "Space Grotesk", sans-serif; }
.cz-style[aria-checked="true"] { background: var(--panel); color: var(--green); border-color: var(--green); }
.cz-more { margin-top: 4px; }
.os-eyebrow { display: flex; align-items: center; gap: 8px; color: #c4b5fd; }
.os-try { font-weight: 600; color: var(--text) !important; }
/* The "ready to collect" email, laid over the mock shop. */
.os-mail { position: absolute; right: -10px; bottom: 0; width: 250px; display: flex; flex-direction: column; gap: 7px; padding: 14px 16px; background: #fff; color: #222; border-radius: 10px; font-size: 12px; line-height: 1.45; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); transform: rotate(1.5deg); border-top: 4px solid var(--cz); transition: border-color .25s; }
.os-mail-head { display: flex; align-items: center; gap: 8px; }
.os-mail-head > span:last-child { display: flex; flex-direction: column; }
.os-mail-head small { color: #777; font-size: 11px; }
.os-mail-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--cz); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: background .25s; }
.os-mail-subject { font-size: 14px; }
.os-mail-body { color: #444; }
.os-mail-lines { display: flex; flex-direction: column; padding-top: 6px; border-top: 1px dashed #ccc; color: #555; }
.cz-preview { position: relative; padding-bottom: 165px; }
.cz-site { background: #f6f7f5; color: #1c2420; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); font-size: 13px; }
.cz-top { background: var(--cz); color: #fff; text-align: center; font-size: 11px; padding: 7px 10px; transition: background .25s; }
.cz-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #e3e6e3; }
.cz-logo { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--cz); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; transition: background .25s; }
.cz-shop { font-weight: 700; font-size: 18px; margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-basket { font-size: 12px; color: #55605a; }
.cz-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px 16px 20px; }
.cz-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e3e6e3; border-radius: 10px; overflow: hidden; transition: border-radius .25s; }
.cz-img { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #ecefec, #dfe4e0); }
.cz-badge { position: absolute; top: 8px; left: 8px; padding: 3px 7px; border-radius: 5px; background: var(--cz); color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; transition: background .25s; }
.cz-body { display: flex; flex-direction: column; gap: 4px; padding: 9px 10px 10px; }
.cz-pname { font-weight: 600; font-size: 13px; line-height: 1.25; }
.cz-price { font-weight: 700; font-size: 14px; }
.cz-price s { color: #8a948f; font-weight: 500; font-size: 12px; margin-right: 3px; }
.cz-add { margin-top: 4px; display: flex; align-items: center; justify-content: center; height: 30px; border-radius: 7px; background: var(--cz); color: #fff; font-weight: 700; font-size: 11px; transition: background .25s; }
.cz-cards[data-style="compact"] .cz-img { aspect-ratio: 16 / 9; }
.cz-cards[data-style="compact"] .cz-add { background: transparent; color: var(--cz); border: 1px solid var(--cz); height: 26px; }
.cz-cards[data-style="compact"] .cz-card { border-radius: 6px; }
.cz-cards[data-style="bold"] .cz-card { border: 2px solid var(--cz); border-radius: 16px; }
.cz-cards[data-style="bold"] .cz-img { background: color-mix(in srgb, var(--cz) 18%, #fff); }
.cz-cards[data-style="bold"] .cz-pname { font-size: 14px; font-weight: 700; }
.cz-cards[data-style="bold"] .cz-add { border-radius: 999px; }
.cz-receipt { position: absolute; right: -10px; bottom: 0; width: 190px; display: flex; flex-direction: column; gap: 5px; padding: 14px 14px 16px; background: #fff; color: #222; font: 11px/1.35 ui-monospace, Menlo, Consolas, monospace; border-radius: 4px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); transform: rotate(2.5deg); }
.cz-receipt b { font-size: 13px; text-align: center; font-family: "Space Grotesk", sans-serif; overflow-wrap: anywhere; }
.cz-receipt > span { text-align: center; color: #666; }
.cz-receipt i { border-top: 1px dashed #bbb; margin: 3px 0; }
.cz-receipt div { display: flex; justify-content: space-between; gap: 8px; }
.cz-rtotal { font-weight: 700; }
.cz-receipt .cz-thanks { margin-top: 4px; }

@media (max-width: 900px) {
  .mod-list, .split-custom, .mod-head { grid-template-columns: minmax(0, 1fr); }
  .cz-receipt, .os-mail { right: 8px; }
}
@media (max-width: 560px) {
  .mod-plans { grid-template-columns: minmax(0, 1fr); }
  .mod-plan span { display: none; }
  .cz-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cz-cards .cz-card:nth-child(3) { display: none; }
  .cz-receipt, .os-mail { position: static; width: auto; margin-top: 14px; transform: none; }
  .cz-preview { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fc-slide, .so-num, .so-link::after, .so-dot, .so-mail, .pr-save, .fc-dot { transition: none; }
  .rota-cell.on, .cd-line, .cd-thanks.on, .pr-total.bump { animation: none; }
  .mod-snip, .mod-chev, .mod-item, .cz-top, .cz-logo, .cz-badge, .cz-add, .cz-card { transition: none; }
}
