/* Стили рендерера слайдов (.pp-*). Не зависят от theme.css интерфейса. */
@import url("fonts/fonts.css");

.pp-slide, .pp-slide * { box-sizing: border-box; }
.pp-slide {
  position: relative; overflow: hidden; --pp-accent: #2f7fd8;
  font-family: Inter, "Segoe UI", Arial, sans-serif; line-height: 1.2;
  -webkit-text-size-adjust: none; text-size-adjust: none;
  background-color: #fff; color: #1d2433;
  user-select: none; -webkit-user-select: none;
}
.pp-mode-edit { user-select: text; -webkit-user-select: text; }
.pp-el { position: absolute; transform-origin: 50% 50%; }
.pp-hidden-step { visibility: hidden; }
.pp-linked { cursor: pointer; }

/* Текст и фигуры с текстом */
.pp-text { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; overflow-wrap: break-word; }
.pp-shape-text { pointer-events: none; }
.pp-mode-view .pp-shape-text a { pointer-events: auto; }
.pp-body { width: 100%; min-height: 0; }
.pp-text[data-valign="middle"] > .pp-body { margin-block: auto; }
.pp-text[data-valign="bottom"] > .pp-body { margin-top: auto; }
.pp-body p, .pp-body div, .pp-body h1, .pp-body h2, .pp-body h3 { margin: 0; }
.pp-body p:empty::after, .pp-body div:empty::after, .pp-body li:empty::after { content: "\200b"; }
.pp-body h1 { font-size: 1.6em; font-weight: 700; }
.pp-body h2 { font-size: 1.3em; font-weight: 700; }
.pp-body h3 { font-size: 1.12em; font-weight: 700; }
.pp-body ul, .pp-body ol { margin: 0; padding-left: 1.3em; }
.pp-body li { padding-left: .1em; }
.pp-body a { color: var(--pp-accent); text-decoration: underline; }
.pp-body code, .pp-th code, .pp-table td code {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .9em;
  background: rgba(127, 127, 127, .15); padding: 0 .25em; border-radius: .2em;
}
.pp-shape-svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.pp-mode-thumb a { pointer-events: none; }

/* Изображение */
.pp-image { position: absolute; inset: 0; overflow: hidden; }
.pp-image img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }

/* Таблица */
.pp-table-wrap { position: absolute; inset: 0; overflow: hidden; }
.pp-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pp-table td, .pp-table th { overflow-wrap: anywhere; font-weight: inherit; text-align: inherit; }
.pp-table th.pp-th { font-weight: 700; background: color-mix(in srgb, var(--pp-accent) 14%, transparent); }
.pp-table p, .pp-table div { margin: 0; }
.pp-table ul, .pp-table ol { margin: 0; padding-left: 1.3em; }

/* Код */
.pp-code {
  position: absolute; inset: 0; margin: 0; padding: .7em 1em; overflow: hidden;
  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; line-height: 1.45;
  white-space: pre; tab-size: 4; border-radius: 12px; counter-reset: pp-ln;
}
.pp-code code { font: inherit; background: none; padding: 0; }
.pp-code-light { background: #f4f7fb; color: #1d2433; border: 1px solid #d9e3f0; --k: #a626a4; --s: #2b8a3e; --c: #8a94a6; --n: #b5651d; --f: #1c6fd1; --t: #c2255c; }
.pp-code-dark { background: #181e2b; color: #e6edf7; --k: #c792ea; --s: #a5d87b; --c: #6c7a93; --n: #f2a65a; --f: #82aaff; --t: #ff8fa3; }
.pp-tok-kw { color: var(--k); font-weight: 600; }
.pp-tok-str { color: var(--s); }
.pp-tok-com { color: var(--c); font-style: italic; }
.pp-tok-num { color: var(--n); }
.pp-tok-fn, .pp-tok-key { color: var(--f); }
.pp-tok-dec, .pp-tok-tag { color: var(--t); }
.pp-tok-attr { color: var(--n); }
.pp-ln .pp-line::before {
  counter-increment: pp-ln; content: counter(pp-ln);
  display: inline-block; width: 2.4em; margin-right: 1em; text-align: right; opacity: .4;
}

/* Видео и HTML */
.pp-video, .pp-frame, .pp-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.pp-video { object-fit: contain; }
.pp-poster { object-fit: cover; }
.pp-el-html .pp-frame { background: transparent; }
.pp-mode-edit .pp-frame, .pp-mode-edit .pp-video { pointer-events: none; }
.pp-plaque {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #e8eef7; color: #5d6b82; font: 600 28px/1.2 Inter, Arial, sans-serif; text-align: center;
  border: 2px dashed #b9c6da; border-radius: 12px;
}

/* Сцена показа */
.pp-stage-wrap { position: relative; overflow: hidden; }
.pp-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
.pp-layer { position: absolute; inset: 0; }

/* Миниатюра */
.pp-thumb { position: relative; overflow: hidden; pointer-events: none; flex: none; }
.pp-thumb .pp-slide { position: absolute; left: 0; top: 0; }
