/* Try-it-yourself demos on the branch pages: the order slip (Handwerk), the appointment book
   (Friseure), the menu board and receipt (Gastronomie). Controls are glass, results are white
   "paper" objects, as they would look on the customer's phone. */

.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.demo--gastro { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.demo__ctrl { display: grid; gap: 26px; min-width: 0; }
.demo__out { min-width: 0; }
.js .demo__out { position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 960px) { .demo, .demo--gastro { grid-template-columns: minmax(0, 1fr); } .js .demo__out { position: relative; top: auto; } }
.demo__step { display: grid; gap: 12px; border: 0; padding: 0; margin: 0; min-width: 0; }
.demo__step > .lbl, .demo__step > legend { font-weight: 600; font-size: 1.05rem; padding: 0; margin-bottom: 4px; }
.demo__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.demo__note { color: var(--text-2); font-size: 0.95rem; max-width: 46ch; }
.range-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.range-row output { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; }
.range { width: 100%; accent-color: var(--a1); height: 28px; }
.file { position: relative; display: inline-flex; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file:focus-within .btn { outline: 2px solid var(--a1); outline-offset: 3px; }
.hint { font-size: 0.9rem; color: var(--text-2); }
.paper { position: relative; background: #fff; color: #10121a; border-radius: var(--r-lg); padding: clamp(20px, 2.4vw, 30px); box-shadow: 0 40px 100px -40px var(--glow), 0 0 0 1px rgba(255, 255, 255, 0.1); }
.stamp { position: absolute; right: 7%; top: 34%; z-index: 3; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); padding: 6px 14px; border: 4px solid currentColor; border-radius: 10px; color: var(--stamp, #16a34a); transform: rotate(-9deg) scale(1.15); opacity: 0; visibility: hidden; pointer-events: none; transition: transform 360ms var(--ease), opacity 160ms ease, visibility 0s linear 360ms; }
.is-sent .stamp { opacity: 0.9; visibility: visible; transform: rotate(-9deg) scale(1); transition: transform 360ms var(--ease), opacity 160ms ease, visibility 0s; }

/* Gastronomie: fee calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.calc__in { display: grid; gap: 24px; align-content: start; }
.calc__out { display: grid; gap: 12px; align-content: start; background: linear-gradient(180deg, color-mix(in oklab, var(--a1) 14%, transparent), var(--surface) 70%); border-color: color-mix(in oklab, var(--a1) 45%, transparent); }
.calc__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc__row b { font-size: 1.3rem; font-weight: 700; white-space: nowrap; }
.calc__bar { height: 12px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.calc__bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #991b1b, #ef4444); transform-origin: left; transform: scaleX(var(--w)); transition: transform 500ms var(--ease); }
.calc__bar--us i { background: linear-gradient(90deg, var(--a1), var(--a2)); }
.calc__save { display: grid; gap: 4px; margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.calc__save strong { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; color: var(--ok); }
.calc__save span:last-child { font-size: 1.15rem; font-weight: 600; }
@media (max-width: 900px) { .calc { grid-template-columns: minmax(0, 1fr); } }

/* Handwerk: order slip */
.slip { display: grid; gap: 16px; }
.slip__head { display: flex; justify-content: space-between; align-items: start; gap: 16px; flex-wrap: wrap; }
.slip__title { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.slip__no { text-align: right; color: #6b7280; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.slip__rows { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 2fr); gap: 6px; }
.slip__rows dt { color: #6b7280; padding: 10px 0; }
.slip__rows dd { background: #f3f4f7; padding: 10px 12px; border-radius: 10px; font-weight: 500; min-height: 44px; font-variant-numeric: tabular-nums; }
.slip__photos { display: flex; gap: 6px; flex-wrap: wrap; }
.slip__photos img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.slip__sum { background: #10121a; color: #fff; padding: 16px 18px; border-radius: 16px; display: flex; justify-content: space-between; align-items: end; gap: 14px; flex-wrap: wrap; }
.slip__sum strong { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.slip__fine { font-size: 0.85rem; color: #a9aec0; }
.slip .stamp { --stamp: #2563eb; }
@media (max-width: 520px) { .slip__rows { grid-template-columns: 1fr; } .slip__rows dt { padding: 6px 0 0; } }

/* Friseure: appointment book and card */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { position: relative; }
.day input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.day span { display: grid; gap: 2px; justify-items: center; padding: 10px 0; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; transition: background-color 160ms ease, color 160ms ease; }
.day b { font-size: 1.35rem; font-weight: 700; line-height: 1; }
.day small { font-size: 0.78rem; color: var(--text-2); }
.day input:checked + span { background: #fff; color: #07080c; border-color: #fff; }
.day input:checked + span small { color: #4b5563; }
.day input:disabled + span { opacity: 0.4; text-decoration: line-through; }
.day input:disabled { cursor: not-allowed; }
.day input:focus-visible + span { outline: 2px solid var(--a1); outline-offset: 2px; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.slots .chip span { width: 100%; justify-content: center; font-variant-numeric: tabular-nums; border-radius: 12px; }
@media (max-width: 420px) { .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tcard { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); padding: 0; overflow: hidden; }
.tcard__side { background: linear-gradient(160deg, var(--a1), var(--a2)); color: #07080c; padding: 24px; display: grid; align-content: space-between; gap: 22px; }
.tcard__salon { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.tcard__main { padding: 24px; display: grid; gap: 12px; }
.tcard__title { color: #6b7280; }
.tcard__when { font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.tcard__rows { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-variant-numeric: tabular-nums; }
.tcard__rows dt { color: #6b7280; }
.tcard__rows dd { font-weight: 600; }
.tcard .stamp { right: 6%; top: auto; bottom: 14%; }
@media (max-width: 560px) { .tcard { grid-template-columns: 1fr; } }
.bill { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; display: grid; gap: 8px; font-variant-numeric: tabular-nums; }
.bill__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bill__row > span:last-child { white-space: nowrap; }
.bill__row--total { font-weight: 700; font-size: 1.15rem; }

/* Gastronomie: menu board and receipt */
.board { display: grid; gap: 10px; }
.board__cat { font-weight: 600; color: var(--text-2); padding: 10px 2px 2px; }
.board__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dish { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto 1fr; column-gap: 12px; padding: 14px; text-align: left; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, transform 140ms var(--ease); }
.dish:active { transform: scale(0.98); }
.dish__nr { grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--a1), var(--a2)); color: #07080c; font-weight: 700; font-size: 0.95rem; }
.dish__name { font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.dish__desc { grid-column: 2; font-size: 0.88rem; color: var(--text-2); line-height: 1.35; margin-top: 3px; }
.dish__price { grid-row: 1 / span 2; grid-column: 3; display: grid; justify-items: end; align-content: space-between; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dish__add { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #07080c; font-size: 1.2rem; font-weight: 600; line-height: 1; }
.dish__count { position: absolute; top: -8px; right: -6px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--a1); color: #07080c; font-weight: 700; font-size: 0.85rem; opacity: 0; transform: scale(0.6); transition: transform 260ms var(--ease), opacity 160ms ease; }
.dish.has { border-color: color-mix(in oklab, var(--a1) 60%, transparent); }
.dish.has .dish__count { opacity: 1; transform: scale(1); }
.dish.bump .dish__count { animation: bump 260ms var(--ease); }
@keyframes bump { 50% { transform: scale(1.3); } }
@media (hover: hover) { .dish:hover { background: var(--surface-2); } }
@media (max-width: 620px) { .board__grid { grid-template-columns: minmax(0, 1fr); } }
.receipt { display: grid; gap: 14px; font-variant-numeric: tabular-nums; }
.receipt__head { text-align: center; display: grid; gap: 2px; }
.receipt__shop { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.receipt__head .small { color: #6b7280; }
.receipt__cut { height: 2px; background: repeating-linear-gradient(90deg, #d1d5db 0 8px, transparent 8px 14px); }
.receipt__lines { display: grid; gap: 8px; min-height: 60px; }
.receipt__empty { color: #6b7280; text-align: center; padding: 12px 0; }
.rline { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rline__q { display: inline-flex; align-items: center; gap: 4px; }
.rline__q button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f3f4f7; font-weight: 700; cursor: pointer; color: #10121a; }
.rline__q b { min-width: 2ch; text-align: center; }
.receipt .chip span { background: #f3f4f7; border-color: #e5e7eb; color: #10121a; min-height: 38px; padding: 7px 12px; font-size: 0.9rem; }
.receipt .chip input:checked + span { background: #10121a; color: #fff; border-color: #10121a; }
.receipt .hint { color: #6b7280; }
.receipt__sum { display: grid; gap: 4px; }
.receipt__sum .bill__row--total { font-size: 1.5rem; letter-spacing: -0.02em; }
.receipt .btn--primary { background: #10121a; color: #fff; }
.receipt .btn:disabled { opacity: 0.4; cursor: not-allowed; }
.receipt__done { background: #10121a; color: #fff; padding: 14px 16px; border-radius: 14px; display: grid; gap: 2px; }
.receipt__done b { font-size: 1.15rem; }
.receipt .stamp { --stamp: #16a34a; top: auto; bottom: 28%; }
.order-bar { display: none; }
@media (max-width: 960px) {
  .order-bar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 999px; background: rgba(20, 22, 32, 0.9); border: 1px solid var(--line-2); backdrop-filter: blur(16px); text-decoration: none; font-weight: 600; transform: translateY(160%); transition: transform 320ms var(--ease); }
  .order-bar.is-on { transform: none; }
  .order-bar b { background: #fff; color: #07080c; padding: 8px 14px; border-radius: 999px; }
}
