/* «Лучшее из доставок» — плашка cookies и подвал. Только токены темы. */

/* ---------- cookies: короткая карточка над нижней кнопкой корзины ---------- */
[data-sf-template] .bs2-ck { position: fixed; z-index: 80; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; padding: 12px 12px 12px 16px;
  border-radius: var(--sf-radius-lg); background: var(--sf-color-surface-raised); color: var(--sf-color-text-primary);
  border: 1px solid var(--sf-color-line-default); box-shadow: var(--sf-shadow-lg); font-family: var(--sf-font-body); }
[data-sf-template] .bs2-ck.is-over-bar { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 76px); }
[data-sf-template] .bs2-ck-row { display: flex; align-items: center; gap: 12px; }
[data-sf-template] .bs2-ck-text { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.4; }
[data-sf-template] .bs2-ck-more { color: var(--sf-color-text-primary); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
[data-sf-template] .bs2-ck-ok, [data-sf-template] .bs2-ck-soft { flex: none; min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--sf-radius-pill);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
[data-sf-template] .bs2-ck-ok { background: var(--sf-color-text-primary); color: var(--sf-color-surface-raised); }
[data-sf-template] .bs2-ck-soft { background: var(--sf-color-surface-sunken); color: var(--sf-color-text-primary); }
[data-sf-template] .bs2-ck-two { display: flex; gap: 8px; }
[data-sf-template] .bs2-ck-two > button { flex: 1; }
[data-sf-template] .bs2-ck button:focus-visible, [data-sf-template] .bs2-ck a:focus-visible { outline: 3px solid var(--sf-color-line-focus); outline-offset: 2px; }

/* ---------- подвал ---------- */
[data-sf-template] .bs2-foot { margin-top: 24px; padding: 24px 0 calc(28px + env(safe-area-inset-bottom)); background: var(--sf-color-surface-sunken);
  color: var(--sf-color-text-primary); font-family: var(--sf-font-body); }
[data-sf-template] .bs2-foot-in { display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; width: 100%;
  max-width: calc(var(--sf-frame-width, 1200px) + 2 * var(--sf-frame-gutter, 16px)); margin: 0 auto; padding: 0 var(--sf-frame-gutter, 16px); }
[data-sf-template] .bs2-brand { display: flex; flex-direction: column; gap: 8px; }
[data-sf-template] .bs2-logo { display: block; max-width: 180px; max-height: 44px; width: auto; height: auto; object-fit: contain; object-position: left center; }
[data-sf-template] .bs2-name { font-family: var(--sf-font-heading); font-size: 20px; font-weight: 800; }
[data-sf-template] .bs2-tag { font-size: 14px; color: var(--sf-color-text-secondary); }
[data-sf-template] .bs2-socials { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
[data-sf-template] .bs2-pill { min-height: 44px; padding: 0 16px 0 12px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px;
  border-radius: var(--sf-radius-pill); background: var(--sf-color-surface-raised); color: var(--sf-color-text-primary);
  font-size: 15px; font-weight: 600; text-decoration: none; }
[data-sf-template] .bs2-card { display: flex; flex-direction: column; border-radius: var(--sf-radius-lg); background: var(--sf-color-surface-raised); }
[data-sf-template] .bs2-contact { gap: 10px; padding: 14px 16px; }
[data-sf-template] .bs2-contact:empty { display: none; }
[data-sf-template] .bs2-where { display: flex; align-items: flex-start; gap: 6px; font-size: 15px; line-height: 1.35; }
[data-sf-template] .bs2-where svg { flex: none; margin-top: 1px; color: var(--sf-color-text-muted); }
[data-sf-template] .bs2-hours { font-size: 14px; color: var(--sf-color-text-secondary); }
[data-sf-template] .bs2-open { color: var(--sf-color-signal-success); }
[data-sf-template] .bs2-closed { color: var(--sf-color-signal-danger); }
[data-sf-template] .bs2-call { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px;
  border-radius: var(--sf-radius-pill); background: var(--sf-color-text-primary); color: var(--sf-color-surface-raised);
  font-size: 17px; font-weight: 700; text-decoration: none; }
[data-sf-template] .bs2-num { font-weight: 500; opacity: .8; }
[data-sf-template] .bs2-pages { overflow: hidden; }
[data-sf-template] .bs2-head { padding: 14px 16px 6px; font-size: 17px; }
[data-sf-template] .bs2-pages ul { list-style: none; margin: 0; padding: 0; }
[data-sf-template] .bs2-row { min-height: 48px; padding: 0 12px 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--sf-color-line-default); color: var(--sf-color-text-primary); font-size: 16px; text-decoration: none; }
[data-sf-template] .bs2-pages li:first-child .bs2-row { border-top: 0; }
[data-sf-template] .bs2-row svg { flex: none; color: var(--sf-color-text-muted); }
[data-sf-template] .bs2-legal { margin-top: 18px; gap: 6px; font-size: 13px; color: var(--sf-color-text-muted); }
[data-sf-template] .bs2-legal small { font-size: 13px; line-height: 1.4; }
[data-sf-template] .bs2-docs { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
[data-sf-template] .bs2-docs a, [data-sf-template] .bs2-docs button, [data-sf-template] .bs2-cookie-set { display: inline-flex; align-items: center; min-height: 32px; padding: 0;
  border: 0; background: none; font: inherit; font-size: 13px; color: var(--sf-color-text-secondary); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
[data-sf-template] .bs2-foot a:focus-visible, [data-sf-template] .bs2-foot button:focus-visible { outline: 3px solid var(--sf-color-line-focus); outline-offset: 2px; }
@media (hover: hover) {
  [data-sf-template] .bs2-row:hover { background: var(--sf-color-surface-sunken); }
  [data-sf-template] .bs2-pill:hover { background: var(--sf-color-surface-default); }
}

@media (min-width: 900px) {
  [data-sf-template] .bs2-ck, [data-sf-template] .bs2-ck.is-over-bar { left: 24px; right: auto; bottom: 24px; width: 440px; }
  [data-sf-template] .bs2-foot { margin-top: 48px; padding: 40px 0 32px; }
  [data-sf-template] .bs2-foot-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  [data-sf-template] .bs2-legal { margin-top: 28px; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
  [data-sf-template] .bs2-docs { margin: 0; }
}

/* ---------- нижнее меню телефона ---------- */
[data-sf-template] .bs2-tab-space { height: calc(68px + env(safe-area-inset-bottom)); }
[data-sf-template] .bs2-tab-space.is-tall { height: calc(124px + env(safe-area-inset-bottom)); }
[data-sf-template] .bs2-tab { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; font-family: var(--sf-font-body); }
[data-sf-template] .bs2-tab-row { display: flex; align-items: center; min-height: 64px; padding: 0 6px env(safe-area-inset-bottom); box-sizing: content-box;
  background: var(--sf-color-surface-raised); border-top: 1px solid var(--sf-color-line-default); }
[data-sf-template] .bs2-tab-i { flex: 1 1 0; min-width: 0; min-height: 56px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font: inherit; font-size: 12px; font-weight: 500; line-height: 1.1; color: var(--sf-color-text-muted); text-decoration: none; }
[data-sf-template] .bs2-tab-i.is-on { color: var(--sf-color-text-primary); font-weight: 700; }
[data-sf-template] .bs2-tab-cartwrap { flex: 1.4 1 0; min-width: 0; display: flex; justify-content: center; }
[data-sf-template] .bs2-tab-cart { position: relative; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--sf-radius-pill); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font: inherit; font-size: 16px; font-weight: 800;
  background: var(--sf-color-brand-default); color: var(--sf-color-text-inverse); text-decoration: none; }
[data-sf-template] .bs2-tab-badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box;
  border-radius: var(--sf-radius-pill); border: 2px solid var(--sf-color-surface-raised); background: var(--sf-color-text-primary); color: var(--sf-color-surface-raised);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
[data-sf-template] .bs2-tab-order { margin: 0 12px 8px; min-height: 48px; padding: 6px 8px 6px 14px; border: 0; border-radius: var(--sf-radius-pill); cursor: pointer;
  display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; box-shadow: var(--sf-shadow-md);
  background: var(--sf-color-brand-default); color: var(--sf-color-text-inverse); }
[data-sf-template] .bs2-tab-order.is-ok { background: var(--sf-color-signal-success); }
[data-sf-template] .bs2-tab-order.is-warn { background: var(--sf-color-signal-warning); color: var(--sf-color-text-primary); }
[data-sf-template] .bs2-tab-order.is-bad { background: var(--sf-color-signal-danger); }
[data-sf-template] .bs2-tab-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
[data-sf-template] .bs2-tab-ot { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
[data-sf-template] .bs2-tab-ot b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-sf-template] .bs2-tab-ot span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-sf-template] .bs2-tab-go { flex: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, currentColor 18%, transparent); }
[data-sf-template] .bs2-tab button:focus-visible, [data-sf-template] .bs2-tab a:focus-visible { outline: 3px solid var(--sf-color-line-focus); outline-offset: 2px; }
/* одна корзина на телефоне: кнопку корзины каркаса (в строке поиска и в шапке) прячем, пока есть нижнее меню (тикет №54) */
@media (max-width: 899px) { [data-sf-template]:has(.bs2-tab) [data-sf-block="cart-entry"] { display: none; } }
/* плашка cookies — над нижним меню */
[data-sf-template]:has(.bs2-tab) .bs2-ck, [data-sf-template]:has(.bs2-tab) .bs2-ck.is-over-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  [data-sf-template] .bs2-tab, [data-sf-template] .bs2-tab-space { display: none; }
  [data-sf-template]:has(.bs2-tab) .bs2-ck, [data-sf-template]:has(.bs2-tab) .bs2-ck.is-over-bar { bottom: 24px; }
}

/* ---------- чаевые: ссылка на сервис ресторана ---------- */
[data-sf-template] .bs2-tips { margin-top: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-sizing: border-box;
  border-radius: var(--sf-radius-lg); border: 1px solid var(--sf-color-line-default); background: var(--sf-color-surface-raised);
  color: var(--sf-color-text-primary); font-family: var(--sf-font-body); }
[data-sf-template] .bs2-tips-head { display: flex; align-items: center; gap: 12px; }
[data-sf-template] .bs2-tips-ic { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--sf-color-brand-default) 12%, var(--sf-color-surface-raised)); color: var(--sf-color-brand-active); }
[data-sf-template] .bs2-tips-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
[data-sf-template] .bs2-tips-t b { font-size: 18px; line-height: 1.2; }
[data-sf-template] .bs2-tips-t span { font-size: 14px; line-height: 1.35; color: var(--sf-color-text-muted); }
[data-sf-template] .bs2-tips-go { min-height: 52px; border-radius: var(--sf-radius-pill); display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--sf-color-text-primary); color: var(--sf-color-surface-raised); font-size: 17px; font-weight: 700; text-decoration: none; }
[data-sf-template] .bs2-tips-go:focus-visible { outline: 3px solid var(--sf-color-line-focus); outline-offset: 2px; }

/* Телефон (навык mobile-native, 16.11.2026): отклик на нажатие, подпись кнопки не выделяется долгим нажатием. */
[data-sf-template] :is(.bs2-ck-ok, .bs2-ck-soft, .bs2-tab-cart, .bs2-pill) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
[data-sf-template] :is(.bs2-ck-ok, .bs2-ck-soft, .bs2-tab-cart, .bs2-pill):active:not(:disabled) { transform: scale(.97); }
@media (prefers-reduced-motion: no-preference) {
  [data-sf-template] :is(.bs2-ck-ok, .bs2-ck-soft, .bs2-tab-cart, .bs2-pill) { transition: transform 120ms cubic-bezier(.23, 1, .32, 1); }
}
[data-sf-template] :is(button, a, label):is(.bs2-row):active:not(:disabled) { background: var(--sf-color-surface-sunken); }
/* Нажатие, проход 2 (16.11): отклик у всего, что нажимается; при prefers-reduced-motion переходов нет. */
[data-sf-template] :is(.bs2-call, .bs2-tips-go, .bs2-tab-order):active:not(:disabled) { transform: scale(.97); }
[data-sf-template] :is(.bs2-ck-more, .bs2-cookie-set):active { opacity: .7; }
@media (prefers-reduced-motion: no-preference) {
  [data-sf-template] :is(.bs2-call, .bs2-tips-go, .bs2-tab-order) { transition: transform 120ms cubic-bezier(.23, 1, .32, 1); }
  [data-sf-template] :is(.bs2-ck-more, .bs2-cookie-set) { transition: opacity 120ms cubic-bezier(.23, 1, .32, 1); }
}
