/* ============================================
   DEMO VIEW - Hide sidebar completely (GLOBAL)
   ============================================ */
body.demo-view .col-md-4,
body.demo-view .col-md-3 {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    max-width: 0 !important;
    flex: 0 0 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.demo-view .col-md-8,
body.demo-view .col-md-9 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

body.demo-view .row > .col-md-4,
body.demo-view .row > .col-md-3 {
    display: none !important;
}

body.demo-view .row > .col-md-8,
body.demo-view .row > .col-md-9 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* ============================================
   HIDE NAVBAR WHEN LIGHTBOX IS OPEN (GLOBAL)
   Target the fixed-top Bootstrap navbar
   ============================================ */
body.lightbox-open .navbar.fixed-top,
body.lightbox-open .navbar-expand-sm,
body.lightbox-open nav.navbar,
body.lightbox-open .fixed-top {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
}

/* ============================================
   GCM LIGHTBOX - Full screen overlay (GLOBAL)
   ============================================ */
#gcm-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 9999999;
    justify-content: center;
    align-items: center;
}

#gcm-lightbox.active {
    display: flex !important;
}

/* Lightbox Header */
#gcm-lightbox .lb-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10000001;
    border-bottom: 1px solid #333;
}

#gcm-lightbox .lb-title {
    color: #009688;
    font-size: 16px;
    font-weight: bold;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 20px;
}

#gcm-lightbox .lb-pid-nav {
    display: flex;
    gap: 20px;
}

#gcm-lightbox .lb-prev-pid,
#gcm-lightbox .lb-next-pid {
    color: #009688;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 15px;
    border: 1px solid #009688;
    border-radius: 4px;
    transition: all 0.2s;
}

#gcm-lightbox .lb-prev-pid:hover,
#gcm-lightbox .lb-next-pid:hover {
    background: #009688;
    color: white;
}

/* Main image area */
#gcm-lightbox .lb-main {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 70px 100px 50px 100px;
}

#gcm-lightbox #lb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

/* Close button */
#gcm-lightbox .lb-close {
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10000002;
    line-height: 1;
    padding: 0 10px;
}

#gcm-lightbox .lb-close:hover {
    color: #ff5252;
}

/* Navigation arrows */
#gcm-lightbox .lb-prev,
#gcm-lightbox .lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: white;
    cursor: pointer;
    padding: 20px;
    z-index: 10000000;
    user-select: none;
    transition: color 0.2s;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

#gcm-lightbox .lb-prev:hover,
#gcm-lightbox .lb-next:hover {
    color: #009688;
}

#gcm-lightbox .lb-prev { left: 10px; }
#gcm-lightbox .lb-next { right: 10px; }

/* Counter */
#gcm-lightbox .lb-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0,0,0,0.7);
    padding: 8px 20px;
    border-radius: 20px;
    z-index: 10000000;
}

/* Spinner */
#gcm-lightbox .lb-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #009688;
    font-size: 18px;
    display: none;
    z-index: 9999998;
}

/* Info Panel */
#gcm-lightbox .lb-info-panel {
    position: absolute;
    left: 20px;
    top: 80px;
    width: 220px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    color: white;
    font-size: 13px;
    z-index: 10000001;
}

#gcm-lightbox .lb-info-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
    color: #009688;
    word-wrap: break-word;
}

#gcm-lightbox .lb-info-details {
    color: #aaa;
    font-size: 12px;
    word-wrap: break-word;
}

/* TV Mode Button */
#tv-mode-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #009688;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    z-index: 99999;
    box-shadow: 0 4px 15px rgba(0,150,136,0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}

#tv-mode-btn:hover {
    background: #00796b;
    transform: scale(1.05);
}
