/* Функционал сайтов-примеров: запись, корзина, статус, новости, кабинет владельца.
   Цвета, шрифты и скругления задаёт тема каждого бизнеса через переменные --e-*. */
.demo {
  --e-accent: #0a1322; --e-on-accent: #fff; --e-surface: #f1f4f7; --e-surface-ink: inherit;
  --e-line: rgb(0 0 0 / 0.12); --e-radius: 12px; --e-head: inherit; --e-busy: rgb(0 0 0 / 0.08);
}
.ex-booking, .ex-cart, .ex-posts, .ex-track { padding-block: clamp(56px, 7vw, 104px); display: grid; gap: 24px; }
.ex-head { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; align-items: end; }
.ex-head h2 { font-family: var(--e-head); }
.ex-muted { font-size: 14px; opacity: 0.72; }
.ex-alert { padding: 14px 18px; border-radius: var(--e-radius); background: #fff1ee; color: #8a1d00; font-weight: 700; }
.ex-ok { padding: 14px 18px; border-radius: var(--e-radius); background: #e8f8ef; color: #0d5c33; font-weight: 700; }
.ex-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

.ex-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border: 0;
  border-radius: var(--e-radius); background: var(--e-accent); color: var(--e-on-accent); font: inherit; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: transform 160ms, filter 200ms;
}
.ex-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.ex-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.ex-btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.ex-btn-small { min-height: 40px; padding: 0 14px; font-size: 14px; }

.ex-field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.ex-field input, .ex-field select, .ex-field textarea, .ex-cart-row input {
  min-height: 50px; padding: 10px 14px; border: 2px solid var(--e-line); border-radius: var(--e-radius);
  background: #fff; color: #111; font: inherit; font-weight: 500;
}
.ex-field textarea { min-height: 90px; }
.ex-field input:focus, .ex-field select:focus, .ex-cart-row input:focus { outline: none; border-color: var(--e-accent); }
.ex-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ex-wide { grid-column: 1 / -1; }
.ex-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.ex-check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--e-accent); }
.ex-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* Запись */
.ex-pick, .ex-confirm { display: grid; gap: 18px; padding: clamp(18px, 3vw, 32px); border-radius: var(--e-radius); background: var(--e-surface); color: var(--e-surface-ink); }
.ex-pick { grid-template-columns: minmax(240px, 1fr) 2fr; align-items: start; }
.ex-days, .ex-slots { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ex-days legend, .ex-slots legend { width: 100%; margin-bottom: 8px; font-weight: 600; font-size: 15px; }
.ex-day input, .ex-slot input { position: absolute; opacity: 0; }
.ex-day span, .ex-slot span {
  display: grid; place-items: center; min-width: 74px; min-height: 52px; padding: 6px 12px; border-radius: var(--e-radius);
  background: #fff; color: #111; font-weight: 700; cursor: pointer; transition: background-color 160ms, color 160ms, transform 160ms;
  box-shadow: inset 0 0 0 2px var(--e-line);
}
.ex-day small { font-size: 11px; font-weight: 500; opacity: 0.7; }
.ex-day:hover span, .ex-slot:hover span { transform: translateY(-2px); }
.ex-day input:checked + span, .ex-slot input:checked + span { background: var(--e-accent); color: var(--e-on-accent); box-shadow: none; }
.ex-day input:focus-visible + span, .ex-slot input:focus-visible + span { outline: 3px solid var(--d-focus, #ffbf00); outline-offset: 2px; }
.ex-day.is-off span, .ex-slot.is-busy span { background: var(--e-busy); color: inherit; opacity: 0.45; cursor: not-allowed; transform: none; text-decoration: line-through; }

/* Корзина и калькулятор */
.ex-cart-form { display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 20px; align-items: start; }
.ex-cart-list { display: grid; gap: 14px; }
.ex-cart-group { margin: 0; padding: 18px 20px; border: 0; border-radius: var(--e-radius); background: var(--e-surface); color: var(--e-surface-ink); }
.ex-cart-group legend { float: left; width: 100%; margin-bottom: 8px; font-weight: 800; font-family: var(--e-head); }
.ex-cart-row { clear: both; display: grid; grid-template-columns: 1fr auto 76px; gap: 12px; align-items: center; padding: 6px 0; font-size: 16px; }
.ex-cart-row input { min-height: 42px; padding: 6px 8px; text-align: center; }
.ex-cart-row.is-on .ex-cart-name { font-weight: 800; }
.ex-own-cup { padding: 16px 20px; border-radius: var(--e-radius); background: var(--e-surface); color: var(--e-surface-ink); font-weight: 700; }
.ex-cart-price { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.ex-summary { position: sticky; top: 64px; display: grid; gap: 12px; padding: 22px; border-radius: var(--e-radius); background: var(--e-accent); color: var(--e-on-accent); }
.ex-summary-title { font-weight: 800; font-size: 20px; font-family: var(--e-head); }
.ex-summary ul { display: grid; gap: 6px; font-size: 14px; }
.ex-summary li { display: flex; justify-content: space-between; gap: 10px; }
.ex-summary .ex-btn { background: var(--e-on-accent); color: var(--e-accent); }
.ex-summary .ex-muted { opacity: 0.85; }
.ex-discount { font-weight: 700; }
.ex-total { font-size: clamp(28px, 3vw, 40px); font-weight: 800; font-variant-numeric: tabular-nums; }
.ex-total small { font-size: 14px; font-weight: 500; }
.ex-checkout { display: grid; gap: 16px; padding: clamp(18px, 3vw, 32px); border-radius: var(--e-radius); background: var(--e-surface); color: var(--e-surface-ink); }

/* Новости */
.ex-post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ex-post { display: grid; gap: 8px; padding: 22px; border-radius: var(--e-radius); background: var(--e-surface); color: var(--e-surface-ink); }
.ex-post.is-own { box-shadow: inset 0 0 0 3px var(--e-accent); }
.ex-post-title { font-weight: 800; font-size: 18px; font-family: var(--e-head); }

/* Статус */
.ex-track-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ex-timeline { display: flex; flex-wrap: wrap; gap: 6px; counter-reset: st; }
.ex-timeline li { flex: 1 1 140px; padding: 14px 16px; border-radius: var(--e-radius); background: var(--e-surface); color: var(--e-surface-ink); font-weight: 600; opacity: 0.6; }
.ex-timeline li.is-now { background: var(--e-accent); color: var(--e-on-accent); opacity: 1; }
.ex-timeline li.is-now ~ li { opacity: 0.35; }

/* Служебные страницы и кабинет */
.ex-mini { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 20px; font-weight: 700; }
.ex-mini nav { display: flex; gap: 20px; }
.ex-mini a { text-decoration: none; }
.ex-mini a:hover { text-decoration: underline; }
.ex-page { padding-block: 24px clamp(56px, 7vw, 104px); }
.ex-done, .ex-cabinet { display: grid; gap: 22px; max-width: 900px; }
.ex-done h1, .ex-cabinet h1 { font-family: var(--e-head); font-size: clamp(34px, 1rem + 3vw, 56px); line-height: 1.05; }
.ex-dl { display: grid; gap: 2px; margin: 0; }
.ex-dl div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--e-line); }
.ex-dl dt { opacity: 0.7; }
.ex-dl dd { margin: 0; font-weight: 700; }
.ex-lines { display: grid; gap: 6px; }
.ex-lines li { display: flex; justify-content: space-between; gap: 12px; }
.ex-pay { display: grid; gap: 12px; padding: 24px; border-radius: var(--e-radius); background: var(--e-surface); color: var(--e-surface-ink); }
.ex-links { display: flex; flex-wrap: wrap; gap: 10px; }
.ex-note { padding: 16px 18px; border-radius: var(--e-radius); background: var(--e-surface); color: var(--e-surface-ink); }
.ex-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-tabs a { padding: 10px 18px; border-radius: var(--e-radius); text-decoration: none; font-weight: 700; box-shadow: inset 0 0 0 2px var(--e-line); }
.ex-tabs a[aria-current] { background: var(--e-accent); color: var(--e-on-accent); box-shadow: none; }
.ex-panel { display: grid; gap: 16px; }
.ex-panel h2 { font-family: var(--e-head); }
.ex-orders { display: grid; gap: 8px; }
.ex-orders li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--e-radius); background: var(--e-surface); color: var(--e-surface-ink); }
.ex-orders li div { display: grid; gap: 4px; }
.ex-orders li span { font-size: 14px; opacity: 0.8; }
.ex-orders form { display: flex; gap: 8px; align-items: center; }
.ex-orders select { min-height: 40px; border-radius: var(--e-radius); border: 2px solid var(--e-line); padding: 0 10px; font: inherit; }
.ex-price-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 20px; }
.ex-price-table label { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; font-size: 15px; }
.ex-price-table input { min-height: 42px; padding: 6px 10px; border: 2px solid var(--e-line); border-radius: var(--e-radius); font: inherit; }
.ex-days-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ex-daybtn { width: 100%; display: grid; gap: 2px; padding: 12px; border: 0; border-radius: var(--e-radius); background: var(--e-surface); color: var(--e-surface-ink); font: inherit; font-weight: 700; cursor: pointer; }
.ex-daybtn small { font-weight: 500; font-size: 12px; opacity: 0.7; }
.ex-daybtn.is-off { background: var(--e-accent); color: var(--e-on-accent); }
.ex-reset { margin-top: 12px; }

@media (max-width: 800px) {
  .ex-head, .ex-pick, .ex-cart-form { grid-template-columns: 1fr; }
  .ex-summary { position: static; }
  .ex-cart-row { grid-template-columns: 1fr 64px; }
  .ex-cart-price { grid-column: 1; grid-row: 2; font-size: 14px; }
  .ex-cart-row input { grid-row: 1 / 3; grid-column: 2; }
  .ex-dl div { grid-template-columns: 1fr; gap: 2px; }
  .ex-day span, .ex-slot span { min-width: 64px; }
}
.ex-field input, .ex-field select, .ex-field textarea { width: 100%; min-width: 0; }
