/* Full-screen photo viewer: black, edge to edge, pictures fitted whole. Sideways swipes are the carousel's own scrolling;
   a pull up or down is handled by photo-viewer.js, so the browser is told to leave vertical panning alone (touch-action). */
dialog.photo-viewer{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;overflow:hidden;background:transparent;color:#fff;touch-action:pan-x;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
dialog.photo-viewer:not([open]){display:none}
dialog.photo-viewer::backdrop{background:transparent}
/* The black is a layer of its own, so a pull can fade it and show the page behind, as the Photos app does. Both layers exist
   only while the viewer is open; will-change keeps them ready so the first frame of a pull does not have to build them. */
.photo-viewer-shade{position:absolute;inset:0;background:#000;will-change:opacity}
.photo-viewer-stage{position:absolute;inset:0;will-change:transform}
.photo-viewer .pcar{background:transparent}
.photo-viewer .pcar-track{touch-action:pan-x}
@media(pointer:coarse){.photo-viewer .pcar-track:focus-visible{box-shadow:none}} /* on a phone the focus frame around the whole screen is only noise */
.photo-viewer .pcar::after{display:none}
.photo-viewer .pcar .pcar-slide{background:transparent;animation:none;cursor:default}
.photo-viewer .pcar .pcar-slide img{object-fit:contain;opacity:1;scale:1;translate:none}
.photo-viewer .pcar .pcar-slide.is-loaded img{animation:none}
.photo-viewer .pcar-badge,.photo-viewer .pcar-progress{display:none}
.photo-viewer .pcar-count{top:calc(env(safe-area-inset-top,0px) + 14px);right:auto;left:14px}
.photo-viewer .pcar-nav{z-index:3}
.photo-viewer-close{position:absolute;z-index:5;top:calc(env(safe-area-inset-top,0px) + 8px);right:12px;display:grid;place-items:center;width:48px;min-height:48px;height:48px;padding:0;border:1px solid rgba(255,255,255,.3);border-radius:50%;background:rgba(20,22,27,.75);color:#fff;font-size:1.75rem;line-height:1;cursor:pointer;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.photo-viewer-close:hover{background:#303741}
.photo-viewer-close:focus-visible{outline:3px solid #e30613;outline-offset:3px}
.photo-viewer-caption{position:absolute;z-index:4;right:0;bottom:0;left:0;padding:28px 20px calc(env(safe-area-inset-bottom,0px) + 18px);background:linear-gradient(transparent,rgba(0,0,0,.72));font-size:.875rem;line-height:1.4;pointer-events:none}
.photo-viewer-caption:empty{display:none}
.photo-viewer-caption strong{display:block;margin-bottom:2px;font-weight:650}
.photo-viewer-caption a{color:#fff;text-decoration:underline;pointer-events:auto}
/* While a picture is pulled away or leaving, the controls get out of its way, and come back softly if it settles. */
.photo-viewer-close,.photo-viewer-caption,.photo-viewer .pcar-count{transition:opacity .22s ease .1s}
.photo-viewer.is-pulling .photo-viewer-close,.photo-viewer.is-pulling .photo-viewer-caption,.photo-viewer.is-pulling .pcar-count,.photo-viewer.is-pulling .pcar-nav{opacity:0!important;visibility:hidden;transition:opacity .16s ease,visibility 0s .16s}
/* Opening: the black fades in and the picture settles into place; the controls follow a moment later. */
@keyframes photo-viewer-in{from{opacity:0;transform:scale(.94)}}
@keyframes photo-viewer-fade{from{opacity:0}}
dialog.photo-viewer[open] .photo-viewer-stage{animation:photo-viewer-in .3s cubic-bezier(.22,.75,.18,1) backwards}
dialog.photo-viewer[open] .photo-viewer-shade{animation:photo-viewer-fade .24s ease-out backwards}
dialog.photo-viewer[open] .photo-viewer-close,dialog.photo-viewer[open] .photo-viewer-caption{animation:photo-viewer-fade .24s ease-out .1s backwards}
@media(prefers-reduced-motion:reduce){dialog.photo-viewer[open] .photo-viewer-stage,dialog.photo-viewer[open] .photo-viewer-shade,dialog.photo-viewer[open] .photo-viewer-close,dialog.photo-viewer[open] .photo-viewer-caption{animation:none}.photo-viewer-close,.photo-viewer-caption,.photo-viewer .pcar-count,.photo-viewer.is-pulling .photo-viewer-close,.photo-viewer.is-pulling .photo-viewer-caption,.photo-viewer.is-pulling .pcar-count,.photo-viewer.is-pulling .pcar-nav{transition:none}}
/* The picture in "Продажа авто" opens it with a tap or with the button. */
.sale-gallery .sale-expand{text-transform:none;letter-spacing:0;font-family:inherit;position:absolute;z-index:3;right:14px;bottom:30px;display:flex;align-items:center;gap:7px;min-height:40px;border:1px solid #ffffff55;border-radius:999px;padding:7px 14px;background:#111318b8;color:#fff;font-size:.8125rem;font-weight:600;cursor:pointer;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.sale-gallery .sale-expand:hover{background:#303741}
.sale-gallery .sale-expand:focus-visible{outline:3px solid #e30613;outline-offset:3px}
.sale-slide{cursor:zoom-in}
