/**
 * Fasulyeden Galeri - Lightbox Styles
 * Brutalist design with side info panel
 */

/* Variables */
:root {
    --fsg-lb-bg: rgba(26, 26, 26, 0.92);
    --fsg-lb-text: #fff;
    --fsg-lb-accent: var(--accent-color, #6b8caf);
    --fsg-lb-highlight: var(--highlight-color, #fce83a);
    --fsg-lb-panel-bg: #1a1a1a;
}

/* Lightbox Container */
.fsg-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fsg-lightbox.active {
    display: flex;
    opacity: 1;
}

.fsg-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--fsg-lb-bg);
    backdrop-filter: grayscale(100%);
}

/* Top Bar */
.fsg-lightbox-topbar {
    position: relative;
    z-index: 10;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    background: #000;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.fsg-lightbox-gallery-info {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    color: var(--fsg-lb-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fsg-lightbox-gallery-name {
    color: var(--fsg-lb-accent);
    font-weight: 700;
}

.fsg-lightbox-counter {
    opacity: 0.7;
}

.fsg-lightbox-sep {
    color: #555;
}

.fsg-lightbox-actions {
    display: flex;
    gap: 0.5rem;
}

.fsg-lightbox-btn {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    background: transparent;
    border: none;
    color: var(--fsg-lb-text);
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    transition: all 0.15s ease;
    text-transform: uppercase;
}

.fsg-lightbox-btn:hover {
    color: var(--fsg-lb-accent);
}

.fsg-lightbox-btn.active {
    color: var(--fsg-lb-highlight);
}

.fsg-lightbox-close:hover {
    color: #ff4444;
}

/* Main Content Area */
.fsg-lightbox-content {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Image Stage */
.fsg-lightbox-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.fsg-lightbox-image-wrapper {
    position: relative;
    max-width: 80%;
    max-height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fsg-lightbox-image-frame {
    position: relative;
    border: 2px solid #fff;
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
    background: #000;
}

.fsg-lightbox-image {
    display: block;
    max-width: 75vw;
    max-height: 75vh;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fsg-lightbox-image.loaded {
    opacity: 1;
}

.fsg-lightbox-image.zoomed {
    cursor: zoom-out;
    max-width: none;
    max-height: none;
}

/* Loader */
.fsg-lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fsg-lightbox-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--fsg-lb-accent);
    border-radius: 50%;
    animation: fsg-spin 0.8s linear infinite;
}

@keyframes fsg-spin {
    to { transform: rotate(360deg); }
}

/* Navigation Arrows */
.fsg-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.2);
    color: var(--fsg-lb-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.fsg-lightbox-nav:hover {
    background: var(--fsg-lb-accent);
    border-color: var(--fsg-lb-accent);
}

.fsg-lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.fsg-lightbox-nav:disabled:hover {
    background: rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
}

.fsg-lightbox-nav svg {
    width: 20px;
    height: 20px;
}

.fsg-lightbox-prev {
    left: 1rem;
}

.fsg-lightbox-next {
    right: 1rem;
}

/* Info Panel (Right Side) */
.fsg-lightbox-info {
    width: 320px;
    background: var(--fsg-lb-panel-bg);
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.fsg-lightbox-info.active {
    transform: translateX(0);
}

.fsg-lightbox-info-inner {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Info Panel - Description Box */
.fsg-lightbox-desc-box {
    border: 1px solid #444;
    padding: 1rem;
    background: #000;
}

.fsg-lightbox-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--fsg-lb-highlight);
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

.fsg-lightbox-caption {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #ccc;
    margin: 0;
}

/* Info Panel - Tags */
.fsg-lightbox-tags-section {
    /* Optional section styling */
}

.fsg-lightbox-tags-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.5rem;
}

.fsg-lightbox-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fsg-lightbox-tag {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    background: #545049;
    color: #fff;
    padding: 0.3rem 0.6rem;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    cursor: default;
}

.fsg-lightbox-tag:hover {
    border-color: #fff;
}

/* Body scroll lock */
body.fsg-lightbox-open {
    overflow: hidden;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .fsg-lightbox-info {
        width: 280px;
    }

    .fsg-lightbox-image {
        max-width: 70vw;
        max-height: 70vh;
    }
}

@media (max-width: 768px) {
    /* Stack layout on mobile */
    .fsg-lightbox-content {
        flex-direction: column;
    }

    .fsg-lightbox-stage {
        flex: 1;
        padding: 1rem;
    }

    .fsg-lightbox-image-wrapper {
        max-width: 95%;
        max-height: 100%;
    }

    .fsg-lightbox-image {
        max-width: 90vw;
        max-height: 55vh;
    }

    .fsg-lightbox-nav {
        width: 36px;
        height: 36px;
    }

    .fsg-lightbox-nav svg {
        width: 16px;
        height: 16px;
    }

    .fsg-lightbox-prev {
        left: 0.5rem;
    }

    .fsg-lightbox-next {
        right: 0.5rem;
    }

    /* Info panel at bottom */
    .fsg-lightbox-info {
        width: 100%;
        max-height: 40vh;
        border-left: none;
        border-top: 1px solid #333;
        transform: translateY(100%);
    }

    .fsg-lightbox-info.active {
        transform: translateY(0);
    }

    .fsg-lightbox-info-inner {
        padding: 1rem;
        gap: 1rem;
    }

    .fsg-lightbox-title {
        font-size: 1rem;
    }

    .fsg-lightbox-caption {
        font-size: 0.75rem;
    }

    /* Top bar adjustments */
    .fsg-lightbox-topbar {
        padding: 0 0.75rem;
    }

    .fsg-lightbox-gallery-info {
        font-size: 0.7rem;
    }

    .fsg-lightbox-btn {
        font-size: 0.65rem;
        padding: 0.3rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .fsg-lightbox-image {
        max-width: 95vw;
        max-height: 50vh;
    }

    .fsg-lightbox-gallery-name {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
