/* Cestitka Share & Download 1.0.4: bottom controls independent of PhotoSwipe UI. */
:is(.pswp, #lightbox) > .csd-actions { position: absolute; top: auto; bottom: 0; left: 0; right: 0; z-index: 1600; display: flex; justify-content: center; gap: 6px; padding: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); box-sizing: border-box; background: rgba(0,0,0,.85); font: 14px/1.3 system-ui, sans-serif; color: #fff; opacity: 1; visibility: visible; pointer-events: auto; }
.pswp.csd-enabled .pswp__caption { bottom: 64px; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
:is(.pswp, #lightbox) .csd-actions .csd-button, :is(.pswp, #lightbox) .csd-open { appearance: none; -webkit-appearance: none; background: #20252b; color: #fff; border: 1px solid #a0a7b0; border-radius: 6px; padding: 10px 12px; min-height: 44px; font: inherit; cursor: pointer; text-decoration: none; text-transform: none; box-shadow: none; margin: 0; width: auto; float: none; touch-action: manipulation; }
:is(.pswp, #lightbox) .csd-actions .csd-button:hover, :is(.pswp, #lightbox) .csd-open:hover { background: #39434e; }
:is(.pswp, #lightbox) .csd-actions :focus-visible { outline: 3px solid #ffd65a; outline-offset: 2px; }
:is(.pswp, #lightbox) .csd-actions .csd-button:disabled { opacity: .55; cursor: wait; }
:is(.pswp, #lightbox) .csd-panel { position: absolute; top: auto; bottom: calc(100% + 64px); right: 8px; width: min(420px, calc(100vw - 32px)); max-height: 50vh; max-height: calc(100dvh - 220px); overflow: auto; background: #171c23; border: 1px solid #a0a7b0; padding: 12px; border-radius: 8px; box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 8px; }
:is(.pswp, #lightbox) .csd-panel[hidden] { display: none; }
:is(.pswp, #lightbox) .csd-actions .csd-link { width: 100%; min-width: 0; margin: 0; padding: 10px; box-sizing: border-box; color: #111; background: #fff; font: 16px/1.4 system-ui, sans-serif; }
:is(.pswp, #lightbox) .csd-status { position: absolute; bottom: calc(100% + 6px); left: 8px; right: 8px; margin: auto; width: fit-content; max-width: calc(100% - 16px); color: #fff; background: rgba(0,0,0,.85); border-radius: 4px; padding: 4px 8px; font-size: 12px; pointer-events: none; }
:is(.pswp, #lightbox) .csd-status:empty { display: none; }
@media (max-width: 380px) {
  :is(.pswp, #lightbox) > .csd-actions { gap: 4px; font-size: 12px; }
  :is(.pswp, #lightbox) .csd-actions > .csd-button { padding-inline: 7px; flex: 1; }
}
@media (prefers-reduced-motion: reduce) { :is(.pswp, #lightbox) .csd-actions * { transition: none; } }

#lightbox > .csd-actions { position: fixed; z-index: 10010; }
.csd-debug { position: fixed; top: 50px; left: 8px; z-index: 2147483647; max-width: calc(100vw - 32px); padding: 8px; margin: 0; background: #111; color: #fff; border: 1px solid #ffd65a; font: 12px/1.4 monospace; white-space: pre-wrap; pointer-events: none; }
