/*
/css/png.css - 2026-06-13 - Post 'N Gone Owner
Latest changes:
- Image page classes normalized to image-prefixed kebab-case.
- Preserved the Polaroid frame, pinned-note feel, and fullscreen enlargement viewer.
- Restored thumbnail carousel controls and moved their styling into png.css.
- Aligned image gallery and viewer behavior with shared mobile breakpoints.
- Restored the old border-based Polaroid geometry so pins and captions anchor correctly.
*/

/*
Image Polaroid gallery
*/

.image-gallery { display: flex; flex-wrap: wrap; column-gap: 44px; row-gap: 66px; max-width: 100%; margin: 0 auto 40px; padding: 55px 0 0; justify-content: center; align-items: flex-start; overflow: visible; }
.image-upload-help { display: block; margin: 6px auto 15px; color: var(--postngone-accent); font-size: small; text-align: center; }
.image-polaroid { flex: 0 0 300px; width: 300px; height: 300px; position: relative; box-sizing: content-box; border: 15px solid #ccc; border-top: 30px solid #ccc; border-bottom: 15px solid #ccc; padding: 0; background: transparent; cursor: pointer; overflow: visible; transform: none; transition: none; }
.image-polaroid:nth-child(even) { transform: none; }
.image-polaroid:hover { transform: none; }
.image-polaroid:focus-visible { outline: 3px solid var(--postngone-accent); outline-offset: 5px; }
.image-polaroid-frame { width: 300px; height: 300px; position: relative; overflow: hidden; background: #111; }
.image-polaroid-photo { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease-in-out; }
.image-polaroid:hover .image-polaroid-photo { transform: scale(1.2); }
.image-polaroid-pin { width: 75px; height: 75px; position: absolute; top: -55px; left: 50%; transform: translateX(-50%); margin: 0; z-index: 2; }
.image-polaroid-caption { position: absolute; bottom: 0; left: 0; width: 100%; height: 60px; min-height: 0; background: rgba(255, 255, 255, 0.8); color: #000; font-size: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.image-polaroid-title { overflow: hidden; text-overflow: ellipsis; }
.image-polaroid-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 3px; }
.image-polaroid-name, .image-polaroid-days { min-width: 0; color: #000; font-size: 18px; overflow: hidden; text-overflow: ellipsis; }
.image-polaroid-days { text-align: left; }
.image-polaroid-name { text-align: right; }

/*
Image fullscreen viewer
*/

.image-viewer { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(31, 31, 31, 0.92); z-index: 3000; flex-direction: column; align-items: center; justify-content: space-between; overflow: hidden; touch-action: pan-y; }
.image-viewer.is-active { display: flex; }
.image-viewer.is-active ~ .scroll-button { display: none; }
.image-viewer-frame { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; width: auto; position: relative; z-index: 3001; }
.image-viewer-image { max-width: calc(100vw - 180px); max-height: 77vh; height: 100%; width: auto; object-fit: contain; display: block; margin: 0 auto; transition: transform 0.2s ease-in-out; }
.image-viewer-image:hover { transform: none; }
.image-viewer-title, .image-viewer-name { color: #fff; text-align: center; margin: 5px 0; font-size: 18px; }
.image-viewer-title { margin-top: 10px; }
.image-viewer-name { margin-top: 5px; }
.image-viewer-controls { display: block; width: 100vw; height: 0; max-width: none; padding: 0; position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 3002; pointer-events: none; }
.image-viewer-prev-button, .image-viewer-next-button { position: absolute; width: 58px; height: 58px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 50%; background-color: rgba(0, 0, 0, 0.82); color: #fff; font-size: 38px; font-weight: bold; line-height: 1; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.55); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42); display: flex; align-items: center; justify-content: center; cursor: pointer; pointer-events: auto; touch-action: manipulation; transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.image-viewer-prev-button { left: 24px; margin-left: 0; padding: 0 4px 4px 0; }
.image-viewer-next-button { right: 24px; margin-right: 0; padding: 0 0 4px 4px; }
.image-viewer-prev-button:hover, .image-viewer-next-button:hover { background: var(--postngone-accent); color: #111; transform: scale(1.06); }
.image-viewer-prev-button:focus-visible, .image-viewer-next-button:focus-visible, .image-viewer-menu-button:focus-visible, .image-viewer-download-button:focus-visible, .image-viewer-close-button:focus-visible, .image-viewer-thumbnail:focus-visible, .image-viewer-thumbnails .jcarousel-control-prev:focus-visible, .image-viewer-thumbnails .jcarousel-control-next:focus-visible { outline: 2px solid var(--postngone-accent); outline-offset: 3px; }
.image-viewer-toolbar { position: absolute; top: 18px; right: 24px; display: flex; gap: 12px; transition: opacity 0.3s ease; z-index: 3003; }
.image-viewer-toolbar.is-hidden { opacity: 0; pointer-events: none; }
.image-viewer-menu-button, .image-viewer-download-button, .image-viewer-close-button { width: 48px; height: 48px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 50%; color: #fff; background: rgba(0, 0, 0, 0.82); font-size: 22px; line-height: 1; box-shadow: 0 7px 18px rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease; touch-action: manipulation; }
.image-viewer-menu-button:hover, .image-viewer-download-button:hover, .image-viewer-close-button:hover { background: var(--postngone-accent); color: #111; transform: translateY(-1px); }
.image-viewer-menu-button { display: none; position: absolute; top: 18px; left: 24px; z-index: 3003; }

/*
Image viewer thumbnail strip
*/

.image-viewer-thumbnails { width: min(1040px, calc(100vw - 120px)); max-width: none; display: block; position: relative; min-height: 84px; padding: 12px 54px 18px; overflow: hidden; box-sizing: border-box; z-index: 3002; }
.image-viewer-thumbnails .jcarousel { overflow: hidden; width: 100%; }
.image-viewer-thumbnails .jcarousel ul { display: flex; list-style: none; margin: 0; padding: 0; width: max-content; }
.image-viewer-thumbnails .jcarousel li { min-width: 0; width: 72px; margin: 0 5px; display: inline-flex; justify-content: center; align-items: center; }
.image-viewer-thumbnails .jcarousel li img { width: 60px; height: 60px; max-height: none; object-fit: cover; transition: transform 0.2s ease-in-out; }
.image-viewer-thumbnail { width: 60px; height: 60px; object-fit: cover; border: 2px solid #fff; border-radius: 4px; cursor: pointer; transition: transform 0.2s ease-in-out; }
.image-viewer-thumbnail:hover { transform: scale(1.1); }
.image-viewer-thumbnails .jcarousel-control-prev, .image-viewer-thumbnails .jcarousel-control-next { position: absolute; top: 42px; transform: translateY(-50%); width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 50%; background: rgba(0, 0, 0, 0.82); color: #fff; font-size: 30px; line-height: 1; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38); display: flex; align-items: center; justify-content: center; text-decoration: none; z-index: 10; cursor: pointer; }
.image-viewer-thumbnails .jcarousel-control-prev { left: 4px; padding: 0 3px 3px 0; }
.image-viewer-thumbnails .jcarousel-control-next { right: 4px; padding: 0 0 3px 3px; }
.image-viewer-thumbnails .jcarousel-control-prev:hover, .image-viewer-thumbnails .jcarousel-control-next:hover { background: var(--postngone-accent); color: #111; }
.image-viewer-thumbnails .jcarousel-control-prev.inactive, .image-viewer-thumbnails .jcarousel-control-next.inactive { opacity: 0.45; pointer-events: none; }
.image-viewer-thumbnails .jcarousel-pagination { position: absolute; left: 0; bottom: 4px; display: flex; justify-content: center; gap: 4px; width: 100%; margin: 0; }
.image-viewer-thumbnails .jcarousel-pagination a { display: block; width: 8px; height: 8px; margin: 0; border-radius: 50%; background: #bbb; text-indent: -9999px; overflow: hidden; }
.image-viewer-thumbnails .jcarousel-pagination a.active { background: var(--postngone-accent); }

/*
Mobile image viewer
*/

@media (max-width: 700px) {
    .image-viewer-menu-button { display: flex; width: 50px; height: 50px; font-size: 24px; }
    .image-viewer-toolbar { top: 14px; right: 14px; gap: 8px; }
    .image-viewer-thumbnails { width: calc(100vw - 24px); min-height: 72px; padding: 8px 48px 14px; }
    .image-viewer-thumbnails .jcarousel li { width: 50px; }
    .image-viewer-thumbnails .jcarousel li img { width: 50px; height: 50px; }
    .image-viewer-thumbnails .jcarousel-control-prev, .image-viewer-thumbnails .jcarousel-control-next { top: 34px; width: 40px; height: 40px; font-size: 26px; }
    .image-viewer-image { max-width: calc(100vw - 24px); max-height: 70vh; }
    .image-viewer { touch-action: pan-y pinch-zoom; }
    .image-viewer-controls { width: 100vw; }
    .image-viewer-prev-button, .image-viewer-next-button { width: 44px; height: 44px; font-size: 28px; margin-left: 0; margin-right: 0; }
    .image-viewer-prev-button { left: 10px; }
    .image-viewer-next-button { right: 10px; }
    .image-viewer-menu-button, .image-viewer-download-button, .image-viewer-close-button { width: 44px; height: 44px; font-size: 20px; }
}

@media (max-width: 520px) {
    .image-gallery { row-gap: 56px; column-gap: 0; margin-bottom: 32px; padding: 46px 10px 0; }
    .image-polaroid { flex-basis: min(300px, calc(100vw - 58px)); width: min(300px, calc(100vw - 58px)); height: min(300px, calc(100vw - 58px)); border-width: 12px; border-top-width: 28px; border-bottom-width: 12px; }
    .image-polaroid-frame { width: 100%; height: 100%; }
    .image-polaroid-pin { width: 64px; height: 64px; top: -46px; }
    .image-polaroid-caption { height: 54px; min-height: 0; font-size: 22px; }
    .image-polaroid-name, .image-polaroid-days { font-size: 14px; }
}
