/* Публичная страница сайта (оболочка PublicController): сброс без base.css
   админки, иконки, страница ошибки и плашка «Предпросмотр черновика». */

/* ---------- Публичная страница: без стилей админки ---------- */
body.site-public {
  margin: 0;
  min-height: 100vh;
  background: #f4f2ec;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.site-public *,
.site-public *::before,
.site-public *::after {
  box-sizing: border-box;
}
.site-public img,
.site-public svg {
  display: block;
}
/* :where — чтобы размеры иконок из блоков и корзины (.s-cart .i и т. п.) не перебивались */
:where(.site-public) svg.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html.s-lock {
  overflow: hidden;
}
.site-public .s-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.site-public .s-footer {
  margin-top: auto;
}
.site-public .s-plain:last-of-type {
  padding-bottom: 56px;
}
.site-fail {
  display: grid;
  gap: 8px;
  max-width: 420px;
  margin: 18vh auto 0;
  padding: 0 20px;
  color: #1d1f1a;
  font-family: var(--font);
  text-align: center;
}
.site-fail strong {
  font-size: 20px;
}
.site-fail p {
  margin: 0;
}
.site-fail a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Плашка «Предпросмотр черновика» */
.s-preview {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: #141413;
  color: #fff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-shadow: 0 10px 24px -12px rgba(20, 20, 19, 0.6);
}
.s-preview .i {
  width: 14px;
  height: 14px;
}
/* плашка не закрывает подвал, когда страница прокручена до конца */
#site:has(.s-preview) .s-footer {
  padding-bottom: 72px;
}

@media (max-width: 520px) {
  /* на телефоне внизу кнопка корзины — плашка предпросмотра уходит наверх */
  .s-preview {
    top: 10px;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}
