/* gallery.css */
/* Styles for the TV Lounge main display, ambient slider progress, guest feeds, and thumbnail actions */

/* =========================================================
   LOUNGE FULLSCREEN STAGE — fills all available viewport space
   ========================================================= */

/* The outer stage: stretches to fill the viewport minus any header */
.lounge-fullscreen-stage {
    display: flex;
    width: 100%;
    height: calc(100vh - 80px); /* 80px accounts for header/admin banner */
    min-height: 480px;
    gap: 1rem;
    overflow: hidden;
}

/* The main player block: fills all horizontal space (shrinks when sidebar shows) */
.lounge-player-main {
    flex: 1 1 0%;
    position: relative;
    background: #000;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.9);
}

/* The actual media viewport anchored inside lounge-player-main */
.lounge-media-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(circle at center, #111115 0%, #030305 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Media elements: contain keeps full image visible, no cropping */
.lounge-media-viewport img,
.lounge-media-viewport video {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* Show full image/video — no cropping of people */
    display: block;
}

/* Subtle gradient overlay at the bottom for metadata readability */
.lounge-player-main::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.1) 35%,
        transparent 65%
    );
    pointer-events: none;
    z-index: 10;
}

/* Bottom overlay row for QR + metadata cards */
.lounge-overlay-bottom {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    pointer-events: none;
    z-index: 20;
}

/* =============================================
   LOUNGE META CARD — Premium slide info overlay
   ============================================= */
.lounge-meta-card {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.25rem 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    max-width: 28rem;
    pointer-events: auto;
    transition: all 0.5s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.05);
}

.lounge-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.lounge-meta-live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
    animation: pulse-amber 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
}

@keyframes pulse-amber {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.lounge-meta-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
}

.lounge-meta-desc {
    font-size: 1.35rem;
    font-weight: 500;
    color: #f3f4f6;
    line-height: 1.45;
    margin-bottom: 0.85rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.lounge-meta-author-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lounge-meta-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
    border: 1px solid rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #f59e0b;
    flex-shrink: 0;
}

.lounge-meta-author-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fcd34d;
}

.lounge-meta-author-role {
    display: block;
    font-size: 0.65rem;
    color: rgba(156, 163, 175, 0.7);
}

/* =============================================
   LOUNGE QR CARD — Prominent right-side QR panel
   ============================================= */
.lounge-qr-card {
    position: relative;
    pointer-events: auto;
    flex-shrink: 0;
}

.lounge-qr-inner {
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 1.25rem;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
    min-width: 10rem;
}

.lounge-qr-image-wrapper {
    background: #ffffff;
    padding: 0.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.lounge-qr-image {
    width: 8rem;
    height: 8rem;
    display: block;
    object-fit: contain;
}

.lounge-qr-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.lounge-qr-sublabel {
    font-size: 0.65rem;
    color: rgba(156, 163, 175, 0.8);
}

/* Right sidebar for admin/moderator view */
.lounge-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: rgba(10, 10, 12, 0.95);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Legacy #media-viewport compatibility (for non-lounge modes) */
#media-viewport {
    background: radial-gradient(circle at center, #111115 0%, #030305 100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}


.slide-progress-bar-container {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    height: 4px;
    width: 100%;
}

.slide-progress-bar-active {
    height: 100%;
    background-color: var(--amber-premium);
    border-radius: 9999px;
    transition: width 0.1s linear;
}

/* Live QR Scanner Interface Container */
.qr-scanner-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    background-color: rgba(5, 5, 8, 0.95);
}

/* Memory stream Feed Sidebar Cards */
.memory-feed-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.memory-feed-card:hover {
    border-color: rgba(245, 158, 11, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Feed list thumbnail preview cards */
.feed-thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease;
}

.feed-thumbnail-wrapper:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.feed-thumbnail-wrapper img,
.feed-thumbnail-wrapper video {
    opacity: 0.75;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.feed-thumbnail-wrapper:hover img,
.feed-thumbnail-wrapper:hover video {
    opacity: 1;
    transform: scale(1.03);
}

/* Verification and custom badges */
.badge-curated {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000000;
}

/* =============================================
   MOBILE RESPONSIVE MEDIA QUERIES
   ============================================= */
@media (max-width: 768px) {
    /* Allow the stage to flow naturally and scroll if needed */
    .lounge-fullscreen-stage {
        flex-direction: column !important;
        height: auto !important;
        overflow-y: auto !important;
        padding-bottom: 2rem !important;
    }

    .lounge-player-main {
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* Hide the absolute dark gradient overlay on mobile to keep the image pristine and clean */
    .lounge-player-main::after {
        display: none !important;
    }

    /* Keep the image at the top and completely clean with 45vh height */
    #media-viewport,
    .lounge-media-viewport {
        position: relative !important;
        height: 45vh !important;
        width: 100% !important;
        border-radius: 1.25rem !important;
        overflow: hidden !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        background: #000000 !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }

    #media-viewport img,
    #media-viewport video,
    .lounge-media-viewport img,
    .lounge-media-viewport video {
        object-fit: contain !important;
        position: relative !important;
        height: 100% !important;
        width: 100% !important;
    }

    /* Disable absolute positioning so overlay sits BELOW the image in relative flow */
    .lounge-overlay-bottom {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        margin-top: 1rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
        width: 100% !important;
        pointer-events: auto !important;
    }

    /* Message card sits directly below the image viewport */
    .lounge-meta-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.25rem !important;
        border-radius: 1.25rem !important;
        background: rgba(20, 20, 25, 0.95) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-top: 1px solid rgba(245, 158, 11, 0.2) !important;
    }

    .lounge-meta-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.35rem !important;
    }

    .lounge-meta-desc {
        font-size: 1.05rem !important;
        line-height: 1.4 !important;
        color: #f3f4f6 !important;
        margin-bottom: 0.75rem !important;
    }

    .lounge-meta-author-row {
        padding-top: 0.5rem !important;
        gap: 0.4rem !important;
    }

    .lounge-meta-avatar {
        width: 1.75rem !important;
        height: 1.75rem !important;
        font-size: 0.65rem !important;
    }

    .lounge-meta-author-name {
        font-size: 0.75rem !important;
    }

    .lounge-meta-author-role {
        font-size: 0.65rem !important;
    }

    /* QR Code card sits directly below the message card */
    .lounge-qr-card {
        display: flex !important;
        width: 100% !important;
        max-width: 18rem !important;
        margin: 0 auto !important;
        padding: 1rem !important;
        border-radius: 1.25rem !important;
        background: rgba(10, 10, 15, 0.95) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .lounge-qr-inner {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .lounge-qr-image-wrapper {
        width: 120px !important;
        height: 120px !important;
        margin: 0 auto !important;
    }

    .lounge-qr-label {
        font-size: 0.85rem !important;
    }

    .lounge-qr-sublabel {
        font-size: 0.7rem !important;
    }

    /* Interactive button below the QR code card */
    .lounge-mobile-cta {
        display: flex !important;
        max-width: 18rem !important;
        margin: 0 auto !important;
        padding: 0.85rem !important;
    }
}
