/* Общая основа публичной страницы записи: то, что не меняется от стиля оформления.
   Здесь только структура: сброс, доступность, раскладка, механика листов, раскрывашек,
   календаря и чекбоксов, ключевые кадры. Внешний вид (цвета, шрифты, радиусы, тени, размеры)
   даёт один из файлов design-<стиль>.css, который подключается следом (см. README, "Стили оформления").
   Атрибутов style="" в разметке нет: CSP их не пустит. Голых цветов в этом файле нет. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Ловушка для ботов: скрыта от людей и скринридеров */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.tnum { font-variant-numeric: tabular-nums; }
.icon { flex: none; }

/* ---------- Раскладка ---------- */
.shell { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.page { flex: 1 0 auto; width: 100%; }
.actionbar { position: sticky; bottom: 0; z-index: 20; }
.minibar { position: fixed; top: 0; right: 0; left: 0; z-index: 30; visibility: hidden; transform: translateY(-100%); }
.minibar.is-shown { visibility: visible; transform: none; }

/* ---------- Подпись "Ближайшее" у специалиста: полная и короткая форма, стиль показывает одну ---------- */
.near__short { display: none; }

/* ---------- Раскрывашка "О специалисте" ---------- */
.collapse { display: grid; grid-template-rows: 0fr; }
.collapse.is-open { grid-template-rows: 1fr; }
.collapse > div { overflow: hidden; min-height: 0; }

/* ---------- Чекбокс и радио: настоящий input лежит под рисованным значком ---------- */
.check, .service { position: relative; }
.check__input, .service__input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; cursor: pointer; }
.check__box .icon, .service__radio .icon { opacity: 0; }
.check__input:checked + .check__box .icon, .service__input:checked + .service__radio .icon { opacity: 1; }

/* ---------- Календарь: одна разметка, два вида (picker.js, html[data-design]) ----------
   strip - лента дней в строку с прокруткой, month - сетка 7 колонок */
.cal__days { display: flex; }
.cal--strip .cal__days { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cal--strip .cal__days::-webkit-scrollbar { display: none; }
.cal--strip .day { flex: none; }
.cal--strip .day--blank { display: none; }
.cal--month .cal__days, .cal--month .cal__dow { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal--month .day__dow { display: none; }
.day--blank { visibility: hidden; }
.cal__nav { display: flex; }
.slot-grid { display: grid; }
.day[disabled], .cal__nav-btn[disabled] { cursor: default; }

/* ---------- Листы: выбор из списка, документы, подтверждения ---------- */
.sheet-root { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet__body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
@media (min-width: 600px) {
  .sheet-root { align-items: center; padding: 24px; }
  .sheet { max-width: 480px; }
}

/* ---------- Кнопки: состояние загрузки ---------- */
.btn.is-loading { pointer-events: none; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.skeleton { animation: shimmer 1.3s linear infinite; background-size: 200% 100%; }

/* ---------- Ключевые кадры ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop-in { from { transform: scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
