/* ═══════════════════════════════════════════════════════════════════
   CAMERA-FOCUSED TECHNICAL THEME
   Nerdy, spec-sheet inspired design for photography gallery
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --cam-bg-primary: rgb(10, 10, 10);
    --cam-bg-secondary: rgb(15, 15, 15);
    --cam-bg-tertiary: rgb(20, 20, 20);
    --cam-text-primary: #ffffff;
    --cam-text-secondary: rgba(255, 255, 255, 0.85);
    --cam-text-tertiary: rgba(255, 255, 255, 0.65);
    --cam-text-dim: rgba(255, 255, 255, 0.45);
    --cam-accent: #e0e0e0;
    --cam-accent-dim: rgba(224, 224, 224, 0.3);
    --cam-border: rgba(255, 255, 255, 0.2);
    --cam-border-dim: rgba(255, 255, 255, 0.1);
    --cam-border-subtle: rgba(255, 255, 255, 0.05);
    --cam-spacing: 12px;
}

/* Photography page theme harmonization */
body.photography-view {
    --selection-bg: rgba(255, 255, 255, 0.2);
    --selection-text: #fff;
}

/* Custom selection color for camera theme */
body.photography-view ::selection {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

body.photography-view ::-moz-selection {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Focus states for accessibility - camera theme */
body.photography-view button:focus-visible,
body.photography-view a:focus-visible {
    outline: 2px solid var(--cam-accent);
    outline-offset: 3px;
}

/* Subtle scan line animation on lightbox for that camera viewfinder feel */
#lightbox.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--cam-accent-dim) 50%,
        transparent 100%);
    pointer-events: none;
    opacity: 0.15;
    z-index: 11999;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

/* ═══════════════════════════════════════════════════════════════════
   GRID OVERLAY EXIF - Hover state on gallery thumbnails
   ═══════════════════════════════════════════════════════════════════ */

.exif-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: transparent;
    color: var(--cam-text-primary);
    font-family: var(--font-mono);
    text-shadow: none;
    box-sizing: border-box;
    pointer-events: none;
    cursor: default;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: visible;
    z-index: 10;
    text-transform: uppercase;
}

.masonry-item.show-exif .exif-overlay {
    pointer-events: auto;
}

/* Dim and desaturate other masonry items when one has overlay active */
.masonry-container.has-active-overlay .masonry-item:not(.show-exif) img {
    opacity: 0.15;
    filter: grayscale(1);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.masonry-container.has-active-overlay .masonry-item.show-exif img {
    opacity: 1;
    filter: grayscale(0);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.exif-overlay::before {
    content: none !important;
    display: none !important;
}


/* Primary Info Block - Super Integrated Design */
.exif-overlay .exif-info {
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.75) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 100%;
    font-size: 9px;
    color: var(--cam-text-secondary);
    letter-spacing: 0.8px;
    line-height: 1.5;

    opacity: 0;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    pointer-events: auto;
    will-change: transform, opacity;
}

.masonry-item.show-exif .exif-overlay .exif-info {
    opacity: 1;
    transform: translateY(0);
}

.exif-overlay .tech-row {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    opacity: 0;
    transform: translateY(4px);
}

.masonry-item.show-exif .exif-overlay .tech-row {
    animation: techRowSlideIn 0.3s ease-out forwards;
}

@keyframes techRowSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.masonry-item.show-exif .exif-overlay .tech-row:nth-child(1) { animation-delay: 0.05s; }
.masonry-item.show-exif .exif-overlay .tech-row:nth-child(2) { animation-delay: 0.08s; }
.masonry-item.show-exif .exif-overlay .tech-row:nth-child(3) { animation-delay: 0.11s; }
.masonry-item.show-exif .exif-overlay .tech-row:nth-child(4) { animation-delay: 0.14s; }
.masonry-item.show-exif .exif-overlay .tech-row:nth-child(5) { animation-delay: 0.17s; }
.masonry-item.show-exif .exif-overlay .tech-row:nth-child(6) { animation-delay: 0.20s; }

.exif-overlay .tech-row:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.exif-overlay .tech-label {
    color: var(--cam-text-tertiary);
    font-size: 7.5px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    min-width: 65px;
    font-weight: 600;
    opacity: 0.55;
    flex-shrink: 0;
}

.exif-overlay .tech-val {
    white-space: normal;
    word-wrap: break-word;
    color: var(--cam-text-primary);
    font-weight: normal;
    font-size: 10.5px;
    letter-spacing: 0.2px;
    flex: 1;
    text-transform: uppercase;
}

/* Overlay-specific color palette adjustments */
.exif-overlay .color-palette {
    margin-top: 10px;
    padding-top: 10px;
}

.exif-overlay .color-swatch {
    min-width: 18px;
    height: 18px;
}

/* Overlay-specific tag adjustments */
.exif-overlay .tag-section {
    margin-top: 10px;
    padding-top: 10px;
}

.exif-overlay .tag-pill {
    font-size: 8px;
    padding: 4px 9px;
}

.exif-primary {
    font-weight: normal;
    font-size: 12px;
    margin-bottom: 2px;
    letter-spacing: 0.8px;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    text-transform: uppercase;
    text-align: center;
}

/* Secondary Info Block - Tech specs */
.exif-secondary {
    font-size: 11px;
    opacity: 1;
    line-height: 1.8;
    transform: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exif-overlay.active .exif-secondary {
    animation: none;
}

/* Hide secondary tech specs on small screens in grid view to prevent overflow */
@media (max-width: 1024px) {
    .exif-overlay .exif-secondary .tech-row:not(.tech-row-camera) {
        display: none;
    }
    .exif-overlay .exif-secondary .exif-bottom {
        margin-top: 4px !important;
    }
}

.exif-primary .separator {
    opacity: 0.6;
    font-weight: normal;
    margin: 0 5px;
}

/* Location link styling */
.location-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,255,255,0.3);
    transition: border-color 0.2s;
    font-size: inherit;
    padding: 0;
}

.location-link:hover {
    border-bottom-color: var(--cam-text-primary);
    color: var(--cam-text-primary);
}

/* Filter links in EXIF overlays */
.exif-overlay .tech-val a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,255,255,0.4);
    transition: all 0.2s;
    cursor: pointer;
    display: inline;
    vertical-align: baseline;
}

.exif-overlay .tech-val a:hover {
    color: var(--cam-text-primary);
    border-bottom-color: var(--cam-text-primary);
    border-bottom-style: solid;
}

/* Filter links in EXIF overlays */
.exif-info .filter-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,255,255,0.3);
}
.exif-info .filter-link:hover {
    border-bottom-color: var(--cam-text-primary);
}

/* Duplicate removed - all styles above */

/* New Overlay Structure */
.exif-header {
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--cam-text-primary);
    display: flex;
    align-items: center;
}

.exif-header i {
    margin-right: 8px;
    font-size: 10px;
    opacity: 0.7;
}

.exif-body {
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

/* Extended Tech Specs */
.exif-extended {
    display: flex;
    gap: 15px;
    font-size: 10px;
    color: var(--cam-text-tertiary);
    margin-bottom: 12px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.exif-extended .tech-item a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,255,255,0.3);
    transition: all 0.2s;
}

.exif-extended .tech-item a:hover {
    color: var(--cam-text-primary);
    border-bottom-color: var(--cam-text-primary);
}

/* Technical data grid styling */
.exif-info::before {
    content: none;
    display: none;
}

/* Footer container for color palette + expand button */
.exif-footer {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--cam-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0;
    width: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    background: transparent;
    padding: 12px 0 0 0;
    border: none;
    box-sizing: border-box;
    position: relative;
    justify-content: flex-start;
    align-items: center;
}

.exif-footer::before {
    content: none;
    display: none;
}

.exif-footer .color-palette {
    margin-top: 0;
    gap: 0;
    padding-top: 0;
}

.exif-footer .color-swatch {
    width: 24px;
    height: 12px;
    box-shadow: none;
}

.exif-footer .expand-btn {
    margin: 0;
    margin-left: auto;
    padding: 0;
    height: 24px; /* Match swatch height */
    display: flex;
    align-items: center;
}

/* Expand button - Opens lightbox */
.expand-btn {
    position: relative;
    margin-left: auto;
    margin-top: 0;
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--cam-text-tertiary);
    font-size: 12px;
    cursor: pointer;
    margin-top: 0;
    transition: all 0.2s;
    pointer-events: auto;
    font-family: var(--font-mono);
    line-height: 1;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: right;
}

.expand-btn:hover {
    color: var(--cam-text-primary);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.expand-btn:active {
    transform: translateY(0);
}

/* Color Palette Swatches - No Gaps, No Outlines */
.color-palette {
    display: flex;
    gap: 0;
    margin-top: 0;
    padding-top: 6px;
    padding-bottom: 6px;
    border-top: none;
    flex-wrap: wrap;
    opacity: 1;
    transition: opacity 0.3s;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.color-swatch {
    flex: 1 1 auto;
    min-width: 20px;
    height: 20px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: none;
    border: none;
}

.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    z-index: 10;
}

.color-swatch:active {
    transform: translateY(0) scale(1.05);
}

/* Tooltip for color swatches */
.color-swatch::after {
    content: attr(data-hex);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0,0,0,0.95);
    color: var(--cam-text-primary);
    padding: 5px 9px;
    border-radius: 0;
    font-size: 9px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    z-index: 1000;
    font-family: var(--font-mono);
    letter-spacing: 0.8px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.1);
}

.color-swatch:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

.color-swatch.copied::after {
    content: "COPIED";
    color: #4caf50;
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

/* Fullscreen Button - Inside EXIF Info */
.fullscreen-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 28px;
    height: 28px;
    background: rgba(20, 20, 20, 0.6);
    color: var(--cam-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    will-change: transform;
}

.exif-info .fullscreen-btn {
    opacity: 0.6;
}

.exif-info:hover .fullscreen-btn,
.fullscreen-btn:hover {
    opacity: 1;
    background: rgba(30, 30, 30, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
}

.fullscreen-btn:hover {
    transform: scale(1.08);
}

.fullscreen-btn:active {
    transform: scale(0.95);
}

.fullscreen-btn svg {
    width: 10px;
    height: 10px;
    pointer-events: none;
}

/* Expandable Sections - Integrated Design */
.expandable-section {
    margin-top: 10px;
    border-top: none;
}

.expand-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--cam-text-tertiary);
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.expand-toggle:hover {
    color: var(--cam-text-primary);
    background: transparent;
}

.toggle-label {
    font-size: 7px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 600;
}

.toggle-count {
    font-size: 7px;
    opacity: 0.5;
    margin-left: auto;
}

.toggle-icon {
    width: 8px;
    height: 8px;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
}

.expandable-section.expanded .toggle-icon {
    transform: rotate(180deg);
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.expandable-section.expanded .expandable-content {
    max-height: 500px;
}

.expandable-content .color-palette,
.expandable-content .tag-cloud {
    margin-top: 0;
    padding-top: 6px;
    border-top: none;
}

/* Tag Cloud */
.tag-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: none;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 6px;
}

.tag-pill {
    display: inline-block;
    padding: 5px 11px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 2px;
    font-size: 9px;
    font-family: var(--font-mono);
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.tag-pill:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.95);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.tag-pill:active {
    transform: translateY(0);
}

/* Thread badges in lightbox */
.thread-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 0;
}

.thread-badge {
    display: inline-block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: var(--font-mono);
}

.thread-badge:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ═══════════════════════════════════════════════════════════════════
   LIGHTBOX TECHNICAL OVERLAY
   ═══════════════════════════════════════════════════════════════════ */

#lightbox .tech-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    padding: 60px 60px 60px 60px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 15px;
}

#lightbox .tech-overlay.hidden .tech-data {
    opacity: 0;
    visibility: hidden;
}

/* Technical data blocks in lightbox - Super Integrated */
#lightbox .tech-data {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--cam-text-secondary);
    letter-spacing: 0.8px;
    line-height: 1.5;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.75) 100%);
    padding: 14px 16px;
    border-radius: 0;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    width: 420px;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#lightbox #lightbox-info-secondary {
    margin-top: auto;
}

/* Header labels for tech data sections */
.tech-data::before {
    content: none;
    display: none;
}

/* Technical specification rows - Unified Modern Design */
#lightbox .tech-row {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    opacity: 0;
    transform: translateY(8px);
    animation: techRowFadeIn 0.4s ease-out forwards;
}

#lightbox .tech-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

@keyframes techRowFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tech-row:nth-child(1) { animation-delay: 0.05s; }
.tech-row:nth-child(2) { animation-delay: 0.1s; }
.tech-row:nth-child(3) { animation-delay: 0.15s; }
.tech-row:nth-child(4) { animation-delay: 0.2s; }
.tech-row:nth-child(5) { animation-delay: 0.25s; }
.tech-row:nth-child(6) { animation-delay: 0.3s; }
.tech-row:nth-child(7) { animation-delay: 0.35s; }
.tech-row:nth-child(8) { animation-delay: 0.4s; }

.tech-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.tech-row-hub-link {
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-bottom: none !important;
    justify-content: center !important;
}

.hub-link-lightbox {
    color: rgba(135, 206, 250, 0.85) !important;
    text-decoration: none;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(135, 206, 250, 0.25);
    padding-bottom: 2px;
}

.hub-link-lightbox:hover {
    color: rgba(135, 206, 250, 1) !important;
    border-bottom-color: rgba(135, 206, 250, 0.5);
}

#lightbox .tech-label {
    color: var(--cam-text-tertiary);
    font-size: 7.5px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    min-width: 65px;
    font-weight: 600;
    opacity: 0.55;
    flex-shrink: 0;
}

#lightbox .tech-val {
    color: var(--cam-text-primary);
    font-weight: normal;
    font-size: 10.5px;
    letter-spacing: 0.2px;
    flex: 1;
}

#lightbox .tech-val a {
    font-weight: normal;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
    text-transform: uppercase;
}

#lightbox .tech-val a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Exposure info horizontal layout */
#lightbox .exif-extended {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 8px 0 12px 0;
    padding: 8px 0;
    border-top: none;
    border-bottom: none;
}

#lightbox .tech-item {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--cam-text-secondary);
    letter-spacing: 0.5px;
}

#lightbox .tech-item a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
    text-transform: uppercase;
}

#lightbox .tech-item a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Lightbox palette styling - larger swatches, no gaps */
#lightbox .color-palette {
    width: 100%;
    gap: 0;
}

#lightbox .color-swatch {
    flex: 1 1 auto;
    min-width: 28px;
    height: 28px;
    border-radius: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   LIGHTBOX CONTROLS - Camera-style interface
   ═══════════════════════════════════════════════════════════════════ */

#lightbox #lightbox-close {
    position: absolute;
    top: 8px;
    right: 20px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 12002;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cam-bg-secondary)!important;
    border-radius: 0;
    backdrop-filter: blur(8px);
    border: none;
    transition: all 0.2s;
}

#lightbox #lightbox-close:hover {
    background: rgb(30, 30, 30)!important;
}

#lightbox #lightbox-close::before,
#lightbox #lightbox-close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--cam-text-secondary);
    border-radius: 0;
}

#lightbox #lightbox-close::before {
    transform: rotate(45deg);
}

#lightbox #lightbox-close::after {
    transform: rotate(-45deg);
}

#lightbox #lightbox-close:hover::before,
#lightbox #lightbox-close:hover::after {
    background: var(--cam-text-primary);
}

/* Lightbox control buttons */
#lightbox .lightbox-controls {
    display: flex;
    gap: var(--cam-spacing);
    pointer-events: auto;
    align-self: flex-start;
}

#lightbox .lightbox-btn {
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.75) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    color: var(--cam-text-secondary);
    padding: 8px 14px;
    border-radius: 0;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

#lightbox .lightbox-btn:hover {
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.85) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--cam-text-primary);
}

#lightbox .lightbox-btn i {
    font-size: 10px;
}

/* ═══════════════════════════════════════════════════════════════════
   PHOTO CONTROLS - Settings panel
   ═══════════════════════════════════════════════════════════════════ */

.photo-controls-wrapper {
    position: fixed;
    bottom: 30px;
    bottom: max(30px, env(safe-area-inset-bottom));
    right: 30px;
    z-index: 9000;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.photo-controls-wrapper.hidden {
    transform: translateY(100px);
    opacity: 0;
}

/* Settings toggle button */
.controls-toggle {
    pointer-events: auto;
    background: var(--cam-bg-secondary);
    backdrop-filter: blur(10px);
    border: none;
    color: var(--cam-text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.controls-toggle:hover,
.controls-toggle.active {
    background: rgb(30, 30, 30);
    color: var(--cam-text-primary);
    transform: scale(1.05);
}

.controls-toggle.has-filter {
    color: var(--cam-text-primary);
    background: rgba(255, 80, 80, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.3);
    position: relative;
}

.controls-toggle.has-filter::before {
    content: '\f00d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 10px;
    background: rgba(255, 80, 80, 0.9);
    color: #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.controls-toggle.has-filter:hover {
    background: rgba(255, 80, 80, 0.25);
    border-color: rgba(255, 80, 80, 0.5);
    transform: scale(1.08);
}

.controls-toggle.has-filter:hover::before {
    background: rgba(255, 60, 60, 1);
    transform: scale(1.1);
}

/* Settings panel */
.photo-controls {
    pointer-events: auto;
    margin: 0 0 15px 0;
    padding: 16px 18px;
    background: var(--cam-bg-primary);
    backdrop-filter: blur(12px);
    border: none;
    border-radius: 0;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    min-width: 200px;
}

.photo-controls.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.photo-controls .label {
    color: var(--cam-text-tertiary);
    margin: 10px 0 6px 0;
    font-size: 0.65em;
    display: block;
    letter-spacing: 2px;
    border-top: 1px solid var(--cam-border-dim);
    padding-top: 10px;
    width: 100%;
}

.photo-controls .label:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.photo-controls a {
    margin: 0;
    text-decoration: none;
    transition: all 0.2s;
    color: var(--cam-text-secondary);
    border-bottom: 1px solid transparent;
    display: block;
    padding: 2px 0;
    font-size: 0.85em;
}

.photo-controls a:hover {
    color: var(--cam-text-primary);
    border-bottom-color: var(--cam-text-primary);
}

.photo-controls a.active {
    color: var(--cam-text-primary);
    border-bottom-color: transparent;
    position: relative;
    padding-right: 15px;
}

.photo-controls a.active::after {
    content: '▸';
    position: absolute;
    right: 0;
    color: var(--cam-text-primary);
    font-size: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   STATISTICS MODAL
   ═══════════════════════════════════════════════════════════════════ */

.stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    z-index: 13005;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.stats-modal.active {
    opacity: 1;
    visibility: visible;
}

.stats-content {
    background: var(--cam-bg-primary);
    border: none;
    padding: 40px;
    border-radius: 0;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    color: var(--cam-text-primary);
    font-family: var(--font-mono);
    position: relative;
}

.stats-section {
    margin-bottom: 30px;
}

.stats-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--cam-text-tertiary);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--cam-border-dim);
    padding-bottom: 8px;
}

.stats-title::before {
    content: '// ';
    color: var(--cam-text-dim);
}

.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 11px;
}

.stat-label {
    width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--cam-text-secondary);
    font-size: 10px;
    letter-spacing: 0.5px;
}

.stat-bar-container {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 0;
    margin: 0 15px;
    overflow: hidden;
    border: 1px solid var(--cam-border-dim);
}

.stat-bar {
    height: 100%;
    background: var(--cam-text-primary);
    border-radius: 0;
    transition: width 0.5s ease;
}

.stat-count {
    width: 35px;
    text-align: right;
    color: var(--cam-text-tertiary);
    font-size: 10px;
}

.stats-close {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    color: var(--cam-text-tertiary);
    font-size: 18px;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.stats-close:hover {
    color: var(--cam-text-primary);
}

/* ═══════════════════════════════════════════════════════════════════
   MAP CONTROLS
   ═══════════════════════════════════════════════════════════════════ */

.map-exit-btn {
    position: fixed;
    bottom: 30px;
    bottom: max(30px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    background: var(--cam-bg-secondary);
    color: var(--cam-text-primary);
    padding: 12px 24px;
    border-radius: 0;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    backdrop-filter: blur(10px);
    border: none;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.map-exit-btn:hover {
    background: rgba(255,255,255,0.12);
    color: var(--cam-text-primary);
    transform: translateX(-50%) scale(1.05);
}

/* ═══════════════════════════════════════════════════════════════════
   CONNECTIONS OVERLAY
   ═══════════════════════════════════════════════════════════════════ */

/* Connection indicator badge on grid */
.connection-indicator {
    display: none;
}

/* Lightbox connections section */
#lightbox-info-primary {
    /* Allow it to grow if content is large */
    max-height: none;
    overflow: visible;
    margin-top: 50px;
}

#lightbox-connections-inline {
    width: 100%;
}

/* Scrollbar for connections list */
#lightbox-info-primary::-webkit-scrollbar { width: 4px; }
#lightbox-info-primary::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
#lightbox-info-primary::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

/* Connections - Super Integrated Design */
.connections-expandable {
    margin-top: 20px;
}

#lightbox .connections-expandable {
    margin-top: 0;
}

#lightbox .connections-list {

}

.connections-list {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent;
    border: none;
    overflow: hidden;
    word-wrap: break-word;
}

.connection-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 2px;
    text-decoration: none;
    color: var(--cam-text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    margin-bottom: 6px;
}

.connection-card:last-child {
    margin-bottom: 0;
}

.connection-card:hover {
    background: rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.15);
}

.type-badge {
    display: block;
    align-self: flex-start;
    padding: 3px 6px;
    font-size: 7px;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-radius: 2px;
    line-height: 1.2;
    margin-bottom: 2px;
    width: fit-content;
}

.type-badge.type-post {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.type-badge.type-project {
    background: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
}

.type-badge.type-photo {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.connection-title {
    font-size: 11px;
    font-family: var(--font-mono);
    white-space: normal;
    line-height: 1.3;
    font-weight: 400;
    letter-spacing: 0.2px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 4px;
}

.connection-card:hover .connection-title {
    color: rgba(255,255,255,1);
}

/* Connection Reasons - Show with vertical layout */
.connection-reasons {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 2px;
}

.reason-line {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 8px;
    font-size: 8px;
    font-family: var(--font-mono);
    line-height: 1.4;
}

.reason-label {
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    font-size: 7px;
}

.reason-value {
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.2px;
    font-weight: 400;
    text-transform: uppercase;
}

/* Mobile viewport constraint */
@media (max-width: 768px) {
    #lightbox-info-primary {
        max-height: none; /* Allow it to grow */
        overflow: visible;
    }
}
/* ═══════════════════════════════════════════════════════════════════
   MAP CUSTOMIZATION
   ═══════════════════════════════════════════════════════════════════ */

/* Custom Zoom Controls */
.leaflet-bar {
    border: none !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}

.leaflet-bar a {
    background-color: var(--cam-bg-secondary) !important;
    color: var(--cam-text-primary) !important;
    border-bottom: 1px solid var(--cam-border-dim) !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 14px !important;
    border-radius: 0 !important;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.leaflet-bar a:hover {
    background-color: rgb(30, 30, 30) !important;
    color: #fff !important;
}

.leaflet-bar a:first-child { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.leaflet-bar a:last-child { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; border-bottom: none !important; }

/* Map Popup Styling */
.leaflet-popup-content-wrapper {
    background: var(--cam-bg-secondary) !important;
    color: var(--cam-text-primary) !important;
    border-radius: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 300px !important;
}

.leaflet-popup-tip {
    background: var(--cam-bg-secondary) !important;
}

.leaflet-container a.leaflet-popup-close-button {
    color: #fff !important;
    font-size: 20px !important;
    padding: 0 !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    top: 0 !important;
    right: 0 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    z-index: 10;
    background: rgba(0,0,0,0.3);
}

.map-popup-container {
    display: flex;
    flex-direction: column;
}

.map-popup-container img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #000;
    transition: opacity 0.2s;
}

.map-popup-container img:hover {
    opacity: 0.9;
}

.map-popup-info {
    padding: 15px;
}

.map-popup-info .tech-row {
    border-bottom: none;
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    #lightbox .tech-overlay {
        padding: 20px;
        align-items: flex-start;
        justify-content: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
    }

    #lightbox .tech-data {
        width: 100%;
        max-width: 100%;
        font-size: 8px;
        padding: 10px 12px;
    }

    #lightbox .tech-row {
        gap: 8px;
        margin-bottom: 3px;
        padding-bottom: 3px;
    }

    #lightbox .tech-label {
        min-width: 50px;
        font-size: 6.5px;
        letter-spacing: 0.5px;
    }

    #lightbox .tech-val {
        font-size: 9px;
        letter-spacing: 0.1px;
    }

    #lightbox .lightbox-controls {
        align-self: flex-start;
        margin-top: 20px;
    }

    #lightbox .lightbox-btn {
        padding: 6px 10px;
        font-size: 8px;
    }

    .photo-controls-wrapper {
        bottom: 20px;
        right: 20px;
    }

    .photo-controls {
        font-size: 0.75rem;
        padding: 16px 20px;
    }

    .exif-footer .color-swatch {
        width: 20px;
        height: 20px;
        border: none;
    }

    #lightbox-info-secondary {
        margin-top: 0;
    }

    #lightbox .color-palette {
        justify-content: center;
    }

    #lightbox .color-swatch {
        width: 24px;
        height: 24px;
    }

    /* Smaller swatches and tags on mobile overlay */
    .exif-overlay .color-swatch {
        width: 14px;
        height: 14px;
    }

    .exif-overlay .tag-pill {
        font-size: 6.5px;
        padding: 2px 6px;
    }

    /* Mobile EXIF overlay - ultra compact */
    .exif-overlay {
        padding: 12px;
    }

    .exif-overlay .exif-info {
        padding: 10px 12px;
        font-size: 8px;
    }

    .exif-overlay .tech-row {
        gap: 8px;
        margin-bottom: 3px;
        padding-bottom: 3px;
    }

    .exif-overlay .tech-label {
        min-width: 50px;
        font-size: 6.5px;
        letter-spacing: 0.5px;
    }

    .exif-overlay .tech-val {
        font-size: 9px;
        letter-spacing: 0.1px;
    }

    .fullscreen-btn {
        width: 24px;
        height: 24px;
        top: 10px;
        right: 12px;
    }

    .fullscreen-btn svg {
        width: 8px;
        height: 8px;
    }

    .tech-label {
        min-width: 65px;
        font-size: 7px;
    }

    .tech-val {
        font-size: 10px;
    }

    .exif-extended {
        gap: 8px;
        margin: 6px 0 10px 0;
    }

    .tech-item a {
        padding: 3px 7px;
        font-size: 9px;
    }

    /* Mobile Map Popup */
    .leaflet-popup-content {
        width: 260px !important;
    }
    .map-popup-container img {
        height: 140px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   CUSTOM SCROLLBAR - Technical style
   ═══════════════════════════════════════════════════════════════════ */

.stats-content::-webkit-scrollbar {
    width: 8px;
}

.stats-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-left: 1px solid var(--cam-border-dim);
}

.stats-content::-webkit-scrollbar-thumb {
    background: var(--cam-border);
    border-radius: 0;
}

.stats-content::-webkit-scrollbar-thumb:hover {
    background: var(--cam-border);
}

/* ═══════════════════════════════════════════════════════════════════
   LOAD MORE BUTTON
   ═══════════════════════════════════════════════════════════════════ */

.load-more-btn {
    background: var(--cam-bg-secondary);
    color: var(--cam-text-primary);
    border: none;
    padding: 12px 30px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    font-size: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.load-more-btn:hover {
    background: rgba(255,255,255,0.12);
    color: var(--cam-text-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
