/* Panocam: isolate volume slider from theme range-input styles. */
.panocam-wrap .ci-video-hotspot-container input.ci-video-hotspot-controls-volume-slider {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 70px !important;
    height: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff4d !important;
    border-radius: 2px !important;
}
.panocam-wrap .ci-video-hotspot-container input.ci-video-hotspot-controls-volume-slider::-webkit-slider-runnable-track {
    background: #666 !important;
    height: 4px !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 2px !important;
}
.panocam-wrap .ci-video-hotspot-container input.ci-video-hotspot-controls-volume-slider::-moz-range-track {
    background: #666 !important;
    height: 4px !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 2px !important;
}
.panocam-wrap .ci-video-hotspot-container input.ci-video-hotspot-controls-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: #fff !important;
    width: 12px !important;
    height: 12px !important;
    margin-top: -4px !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 50% !important;
}
.panocam-wrap .ci-video-hotspot-container input.ci-video-hotspot-controls-volume-slider::-moz-range-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: #fff !important;
    width: 12px !important;
    height: 12px !important;
    margin-top: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 50% !important;
}
.panocam-wrap .ci-video-hotspot-container input.ci-video-hotspot-controls-volume-slider:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 5px !important;
}
/* Cinema: keep the original player in its DOM location; no native fullscreen. */
.panocam-cinema-backdrop {position:fixed;inset:0;background:#000;z-index:2147483000;}
.panocam-cinema-backdrop[hidden] {display:none!important;}
.panocam-wrap .panocam-cinema-toggle {position:absolute;right:0;top:100%;margin-top:5px;z-index:8;background:#222;color:#fff;border:1px solid #777;border-radius:5px;padding:5px 10px;font:13px/1.4 sans-serif;cursor:pointer;}
.panocam-wrap:has(>.panocam-cinema-toggle) {margin-bottom:40px;}
.panocam-wrap.panocam-cinema-active {position:fixed!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%);width:min(100vw,calc((100vh - 90px)*16/9))!important;width:min(100vw,calc((100dvh - 90px)*16/9))!important;max-width:none!important;height:auto!important;aspect-ratio:16/9!important;margin:0!important;z-index:2147483001;background:#000!important;}
.panocam-wrap.panocam-cinema-active .panocam-cinema-toggle {top:auto;bottom:100%;margin:0 8px 8px 0;}

/* Transport overlay: no full-surface click catcher. */
.panocam-wrap .panocam-transport {position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:clamp(8px,2vw,24px);z-index:5;pointer-events:none;}
.panocam-wrap .panocam-transport[hidden],.panocam-wrap .panocam-buffer[hidden]{display:none!important;}
.panocam-wrap .panocam-transport button {pointer-events:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;width:clamp(38px,6vw,58px);height:clamp(38px,6vw,58px);padding:0;border:1px solid #ffffff80;border-radius:50%;background:#0009;color:#fff;font:24px/1 sans-serif;box-shadow:none;cursor:pointer;}
.panocam-wrap .panocam-transport button small{font:11px/1 sans-serif;color:inherit;}
.panocam-wrap .panocam-transport button.panocam-transport-main{width:clamp(48px,8vw,76px);height:clamp(48px,8vw,76px);font-size:clamp(23px,4vw,36px);}
.panocam-wrap .panocam-transport button:hover,.panocam-wrap .panocam-transport button:focus-visible{background:#000c;border-color:#aaff00;color:#aaff00;}
.panocam-wrap .panocam-transport button:disabled{opacity:.45;cursor:default;}
.panocam-wrap .panocam-buffer{position:absolute;left:50%;top:calc(50% - 55px);width:26px;height:26px;margin-left:-13px;border:3px solid #ffffff50;border-top-color:#fff;border-radius:50%;animation:panocam-spin .8s linear infinite;z-index:6;pointer-events:none;}
@keyframes panocam-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.panocam-wrap .panocam-buffer{animation:none;border-color:#fff;}}

/* 1.1.31: fade without leaving invisible clickable controls. */
.panocam-wrap .panocam-transport {opacity:0;visibility:hidden;transition:opacity .2s ease,visibility 0s linear .2s;}
.panocam-wrap .panocam-transport.panocam-transport-visible {opacity:1;visibility:visible;transition:opacity .12s ease;}
.panocam-wrap .panocam-transport:not(.panocam-transport-visible) button {pointer-events:none;}
@media(prefers-reduced-motion:reduce){.panocam-wrap .panocam-transport{transition:none!important;}}

/* Hotspot priority: hide only our own controls, never YouTube iframe UI. */
.panocam-wrap.panocam-hotspot-priority .ci-video-hotspot-controls,.panocam-wrap.panocam-hotspot-priority .panocam-transport {opacity:0!important;visibility:hidden!important;pointer-events:none!important;}
.panocam-wrap.panocam-hotspot-priority .ci-video-hotspot-controls *,.panocam-wrap.panocam-hotspot-priority .panocam-transport * {pointer-events:none!important;}

.panocam-wrap .panocam-hide-hotspot-navigation{display:none!important;}

/* YouTube only: separate the hotspot track from the native video controls. */
.panocam-wrap.panocam-youtube-layout .ci-video-hotspot-controls {display:none!important;}
.panocam-wrap.panocam-youtube-layout {margin-bottom:72px;}
.panocam-wrap.panocam-youtube-layout .panocam-cinema-toggle {margin-top:33px;}
.panocam-wrap .panocam-yt-timeline {position:absolute;top:100%;left:0;width:100%;height:28px;background:#242424;border-top:1px solid #555;box-sizing:border-box;z-index:7;overflow:hidden;}
.panocam-wrap .panocam-yt-head {position:absolute;left:0;top:12px;height:4px;background:#777;pointer-events:none;}
.panocam-wrap .panocam-yt-mark {position:absolute;top:3px;transform:translateX(-50%);width:14px;height:22px;padding:0;border:0;border-radius:3px;background:#ffdc38;cursor:pointer;box-shadow:none;}
.panocam-wrap .panocam-yt-mark:first-of-type {min-width:14px;}
.panocam-wrap .panocam-yt-mark:focus-visible {outline:2px solid white;outline-offset:1px;}
.panocam-wrap.panocam-youtube-layout.panocam-cinema-active .panocam-cinema-toggle {margin:0 8px 8px 0;}

/* YouTube only: transparent library layers must not intercept the native iframe. */
.panocam-youtube-layout .panocam-player * {pointer-events:none!important;}
.panocam-youtube-layout .panocam-player iframe,
.panocam-youtube-layout .panocam-player [class*="panocam-priority-marker-"],
.panocam-youtube-layout .panocam-player [class*="panocam-priority-marker-"] *,
.panocam-youtube-layout .panocam-player :is([role="dialog"],[aria-modal="true"],[class*="-popup"],[class*="-popover"],[class*="-modal"],[class*="-tooltip"]),
.panocam-youtube-layout .panocam-player :is([role="dialog"],[aria-modal="true"],[class*="-popup"],[class*="-popover"],[class*="-modal"],[class*="-tooltip"]) * {pointer-events:auto!important;}

/* Mobile landscape: fit the actual visual viewport, with exit over the video. */
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse) {
 .panocam-wrap.panocam-cinema-active {
  --pano-bottom:env(safe-area-inset-bottom, 0px);
  --pano-top:env(safe-area-inset-top, 0px);
  --pano-side:max(env(safe-area-inset-left, 0px),env(safe-area-inset-right, 0px));
  left:var(--pano-vx,50%)!important;
  top:calc(var(--pano-vy,50%) + (var(--pano-top) - var(--pano-bottom))/2)!important;
  width:min(calc(var(--pano-vw,100vw) - 2 * var(--pano-side)),calc((var(--pano-vh,100dvh) - var(--pano-top) - var(--pano-bottom))*16/9))!important;
 }
 .panocam-wrap.panocam-youtube-layout.panocam-cinema-active {--pano-bottom:calc(28px + env(safe-area-inset-bottom, 0px));}
 .panocam-wrap.panocam-cinema-active .panocam-cinema-toggle,
 .panocam-wrap.panocam-youtube-layout.panocam-cinema-active .panocam-cinema-toggle {top:6px;bottom:auto;right:6px;margin:0;padding:6px 9px;font-size:12px;line-height:1.4;z-index:100;}
 /* Keep the native YouTube controls unobstructed: exit at left below the title. */
 .panocam-wrap.panocam-youtube-layout.panocam-cinema-active .panocam-cinema-toggle {top:48px;right:6px;}
}
