/*
 * PP chat box, the part every page needs before the box script loads (core.css bundle; docs/pp-chat.md): the docked
 * box's column. The layout's inline script sets html.ppc-docked from localStorage before the first paint, so the page
 * does not jump when the box comes back docked. Everything else is in pp-chat.css, loaded on first use.
 */
:root { --ppc-dock-w: 380px; }
@media (min-width: 1100px) {
  html.ppc-docked body { margin-right: var(--ppc-dock-w); }
}
/* "Otvori u prozoru" on the PP pages (pages/pm/_layout.twig): not on phones, where the box is a full-screen sheet */
.ppc-popin-bar { display: flex; justify-content: flex-end; margin: 0 0 var(--space-2); }
@media (max-width: 640px) { .ppc-popin-bar { display: none; } }
/* the 160 px side-rail ads (forum.css, side-ads.js) beside the narrowed page: centred on the area left of the panel;
   hidden (ppc-noads, set by the script when that area is under 1660 px) when there is no room, never over content */
@media (min-width: 1660px) {
  html.ppc-docked .side-ad-left { left: calc((100% - var(--ppc-dock-w)) / 2 - var(--page-w) / 2 - 160px - 24px); }
  html.ppc-docked .side-ad-right { right: calc(100% - (100% - var(--ppc-dock-w)) / 2 - var(--page-w) / 2 - 160px - 24px); }
  html.ppc-noads .side-ad { display: none; }
}
