/*
 * Documentation
 * Docs: /Docs/Apps/Microsites/pmkto.md
 * WHY: Style PMKTO gallery experiences consistently with the redesigned visual system
 *      (Inter + Plus Jakarta Sans, logo-derived navy/blue/green palette, clean card surfaces).
 */

:root {
    --accent: var(--pmo-green, #00964a);
}

.experience-shell {
    /* WHY: Prevent legacy gallery defaults from overriding PMKTO's page-wide fonts and layered background. */
    min-height: auto;
}

.section .image-gallery-shell,
.section .image-map-shell {
    /* WHY: Gallery/map containers should look like native PMKTO cards rather than a detached legacy widget. */
    border: 1px solid var(--line-light, #eaf0f7);
    border-radius: 1rem;
    background: var(--surface, #ffffff);
    box-shadow:
        0 1px 3px rgba(15, 43, 94, 0.03),
        0 6px 20px rgba(15, 43, 94, 0.05);
}

.powered-by-link {
    color: inherit;
    text-decoration: none;
}

/* Gallery */
/* WHY: Gallery flows inline within the page instead of being confined to a
 *      fixed-height container with internal scroll (which felt like an iframe). */
.image-gallery-shell {
    display: block;
}

/* WHY: pmkto gallery intentionally runs as a curated stream without sort controls, and CSP blocks inline styles. */
body[data-experience-page="gallery"] #sort-options {
    display: none !important;
}

#folder-browser {
    width: 300px;
    border-right: 1px solid var(--line, #dce4ef);
    padding: 10px;
    overflow: auto;
}

#resizer {
    width: 6px;
    cursor: ew-resize;
    /* WHY: Resizer uses a subtle blue-tinted background consistent with the brand palette. */
    background: rgba(0, 148, 212, 0.12);
    transition: background 0.15s ease;
}

#resizer:hover {
    background: rgba(0, 148, 212, 0.22);
}

/* WHY: Container no longer needs flex-column for internal scroll layout since
 *      the gallery flows inline with the page. */
#gallery-container {
    min-width: 0;
}

#sort-options {
    padding: 10px;
    border-bottom: 1px solid var(--line, #dce4ef);
    background: var(--surface-50, #f8fafc);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#sort-options .section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#sort-options button,
.folder {
    border: 1px solid var(--line, #dce4ef);
    color: var(--text-main, #0f1f3c);
    background: var(--surface, #ffffff);
    border-radius: 0.5rem;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.88rem;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

#sort-options button.is-active,
#sort-options button:hover,
.folder.selected {
    background: var(--pmo-blue-soft, #e8f4fc);
    border-color: var(--pmo-blue, #0094d4);
    color: var(--pmo-navy, #0f2b5e);
}

#folder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.folder {
    text-align: left;
}

.folder small {
    opacity: 0.7;
}

#gallery-status,
#map-status {
    padding: 8px 12px;
    color: var(--text-soft, #5a6d8a);
    font-size: 0.9rem;
    min-height: 20px;
}

/* WHY: Removed flex:1 and overflow-y:auto so the gallery grid expands
 *      naturally with the page flow instead of scrolling internally. */
#gallery {
    display: grid;
    gap: 10px;
    padding: 10px;
    align-content: flex-start;
}

.thumbnail {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.thumbnail:hover {
    transform: translateY(-2px);
}

.thumbnail img {
    max-width: 100%;
    max-height: 100%;
    border: 1px solid var(--line-light, #eaf0f7);
    border-radius: 0.5rem;
    transition: box-shadow 0.2s ease;
}

.thumbnail:hover img {
    box-shadow: 0 4px 12px rgba(15, 43, 94, 0.1);
}

.thumbnail-title {
    margin-top: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main, #0f1f3c);
}

.thumbnail-description {
    text-align: center;
    font-size: 11px;
    color: var(--text-soft, #5a6d8a);
}

#lightbox {
    position: fixed;
    inset: 0;
    /* WHY: Dark navy overlay with blur matches the brand and creates a focused viewing experience. */
    background: rgba(10, 22, 40, 0.88);
    display: none;
    z-index: 1000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#lightbox.is-open {
    display: block;
}

#lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#lightbox-image-wrapper {
    position: relative;
}

#lightbox-image {
    max-width: 92vw;
    max-height: 92vh;
    display: block;
    border-radius: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

/* WHY: Copy button hidden via HTML hidden attribute; keep minimal rule for safety. */
#copy-filename {
    display: none;
}

/* WHY: Close button gives users a clear, always-visible exit from the lightbox.
 *      The backdrop click alone was non-functional because #lightbox-content fills
 *      the entire overlay area (100% × 100%), so event.target was never #lightbox.
 *      Positioned top-right using absolute coordinates anchored to #lightbox-content. */
#lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 43, 94, 0.7);
    color: white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.15s ease;
}

#lightbox-close:hover {
    background: rgba(0, 148, 212, 0.8);
}

/* WHY: Thumbnails and nav buttons are now children of #lightbox-content (full
 *      viewport size) so absolute positioning references the screen edges,
 *      making prev/next thumbnails visible at the left and right margins. */
.lightbox-thumbnail {
    position: absolute;
    width: 120px;
    height: 120px;
    object-fit: cover;
    top: calc(50% - 60px);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.lightbox-thumbnail:hover {
    opacity: 0.85;
}

#lightbox-prev-thumbnail {
    left: 18px;
}

#lightbox-next-thumbnail {
    right: 18px;
}

#lightbox-prev-nav,
#lightbox-next-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    /* WHY: Nav buttons use the navy brand color for consistent dark-on-dark treatment. */
    background: rgba(15, 43, 94, 0.6);
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: background 0.15s ease;
}

#lightbox-prev-nav:hover,
#lightbox-next-nav:hover {
    background: rgba(0, 148, 212, 0.7);
}

#lightbox-prev-nav {
    left: 150px;
}

#lightbox-next-nav {
    right: 150px;
}

/* Map */
#map-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line, #dce4ef);
    display: flex;
    align-items: center;
}

#info-pane {
    margin-left: auto;
    font-weight: 700;
    color: var(--text-main, #0f1f3c);
}

#map {
    height: calc(100vh - 360px);
    min-height: 500px;
}

.red-dot {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #990000);
    border-radius: 50%;
}

.thumbnail-preview {
    position: absolute;
    display: none;
    z-index: 1000;
    width: 280px;
    pointer-events: none;
    border: 1px solid var(--line, #dce4ef);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.75rem;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(15, 43, 94, 0.12);
}

.thumbnail-preview img {
    width: 100%;
    max-height: 170px;
    object-fit: cover;
    border-radius: 0.5rem;
}

#thumbnail-preview-title {
    font-size: 12px;
    margin-top: 6px;
    color: var(--text-main, #0f1f3c);
}

#lightbox-filename {
    display: block;
    margin-top: 12px;
    color: white;
    font-size: 14px;
    text-align: center;
}

@media (max-width: 960px) {
    #folder-browser {
        width: 220px;
    }

    .lightbox-thumbnail,
    #lightbox-prev-nav,
    #lightbox-next-nav {
        display: none;
    }
}
/* Last-Modified: 2026-03-01T21:11:42.0000000Z */