/* ===============================
   THEME VARIABLES
=============================== */

:root {
    --bg: #111;
    --fg: #eee;
    --panel: #1e1e1e;
    --panel-alt: #181818;
    --accent: #f5c542;
    --muted: #aaa;
}

[data-theme="light"] {
    --bg: #ececec;
    --fg: #111;
    --panel: #f7f7f7;
    --panel-alt: #e9e9e9;
    --accent: #d9a400;
    --muted: #555;
}

/* ===============================
   BASE
=============================== */

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--fg);
}

a {
    color: #4ea3ff;
    text-decoration: none;
}

/* ===============================
   TOP BAR
=============================== */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(#1b1b1b, #111);
    color: #fff;
    z-index: 4000;
}

.main-nav {
    display: flex;
    gap: 18px;
}

.main-nav a {
    color: #cfcfcf;
    font-size: 14px;
}

.main-nav a:hover { color: #fff; }

.main-nav a.active { color: var(--accent); }

/* ===============================
   LOGO
=============================== */

.brand-link {
    display: inline-flex;
    align-items: center;
}

.logo {
    height: 75px;
}

/* ===============================
   USER DROPDOWN
=============================== */

.user-area { position: relative; }

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--panel);
    width: 260px;
    border-radius: 6px;
    display: none;
    z-index: 4500;
}

.user-dropdown.active { display: block; }

/* ===============================
   PAGE CONTAINER
=============================== */

.page-container {
    max-width: 90vw;
    margin: 0 auto;
    padding: 20px 8px;
}

/* ===============================
   GRID
=============================== */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

/* ===============================
   IMAGE CARD
=============================== */

.thumb {
    background: var(--panel);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.thumb img {
    width: 100%;
    display: block;
}

.meta {
    padding: 10px;
    font-size: 12px;
    background: rgba(0,0,0,0.35);
    color: var(--muted);
}
/* ===============================
   LIVE FEED INFO BAR (FIX)
=============================== */

.thumb .meta {
    background: rgba(0, 0, 0, 0.55);
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.4;
}

.thumb .meta strong {
    display: block;
    color: #fff;
    font-weight: 600;
}

.thumb .meta span {
    display: block;
    margin-top: 2px;
    color: #bbb;
}


/* ===============================
   REVIEW ICON – SHARED
=============================== */

.review-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e74c3c;
}

/* ===============================
   REVIEW ICON – GRID
=============================== */

.review-hit {
    position: absolute;
    bottom: 10px;
    right: 10px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    border-radius: 50%;
}

.review-hit:hover {
    background: rgba(255,255,255,0.12);
}

/* ===============================
   PHOTO VIEWER OVERLAY
=============================== */

.viewer {
    position: fixed;
    inset: 0;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.viewer.active {
    opacity: 1;
    pointer-events: auto;
}

.viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
}

/* ===============================
   VIEWER PANEL
=============================== */

.viewer-panel {
    position: absolute;
    inset: 8vh 8vw;
    background: var(--panel);
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    padding: 20px;
    border-radius: 10px;
    max-height: calc(100vh - 16vh);
    overflow: hidden;
}

/* ===============================
   VIEWER IMAGE
=============================== */

.viewer-panel img {
    width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    background: #000;
}


/* ===============================
   VIEWER CONTROLS
=============================== */

.viewer-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 42px;
    width: 48px;
    height: 72px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 5;
}

.viewer-nav.prev { left: 12px; }
.viewer-nav.next { right: 320px; }

/* ===============================
   VIEWER ACTION ROW
=============================== */

.viewer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

/* ===============================
   REVIEW ICON – VIEWER
=============================== */

.viewer-review-hit {
    position: relative;
    width: 36px;
    height: 36px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
    border-radius: 50%;
}

.viewer-review-hit:hover {
    background: rgba(255,255,255,0.12);
}

/* ===============================
   NOTES
=============================== */

.viewer-notes {
    margin-top: 16px;
}

.viewer-notes textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border-radius: 4px;
    background: #111;
    color: #eee;
}

/* ===============================
   BUTTONS
=============================== */

#viewAllBtn,
#addNoteBtn {
    background: rgba(245,197,66,0.22);
    border: 1px solid rgba(245,197,66,0.4);
    color: #111;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
}

#viewAllBtn:hover,
#addNoteBtn:hover {
    background: rgba(245,197,66,0.32);
}

/* ===============================
   MOBILE MENU VISIBILITY
=============================== */

.mobile-menu { display: none !important; }

@media (max-width: 900px) {
    .main-nav { display: none !important; }
    .mobile-menu.active { display: block !important; }

    .viewer-panel {
        inset: 6vh 4vw;
        grid-template-columns: 1fr;
    }

    .viewer-nav.next { right: 8px; }
}

@media (min-width: 901px) {
    .main-nav { display: flex !important; }
    .mobile-menu { display: none !important; }
}
/* ===============================
   VIEWER NAV DISABLED STATE (FIX)
=============================== */

/* Disabled navigation items */
.main-nav a.is-disabled,
.mobile-menu a.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;   /* THIS is the key */
    text-decoration: none;
}

/* Optional: keep layout stable on hover */
.main-nav a.is-disabled:hover,
.mobile-menu a.is-disabled:hover {
    background: none;
}


.viewer-nav:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}
.notes-badge {
    position: absolute;
    top: 10px;
    right: 10px;

    min-width: 18px;
    height: 18px;
    padding: 0 5px;

    background: rgba(245,197,66,0.9);
    color: #111;

    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;

    border-radius: 9px;
}

/* Top-right menu / theme toggle
.header-menu-item,
.header-menu-item * {
    cursor: pointer;
}*/

/*Prevent text-selection cursor 
.header-menu-item {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}*/
/* Icon buttons in top-right user area */
.icon-btn {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 6px;
    border-radius: 6px;
}

/* Optional: subtle hover affordance */
.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
}
/* Ensure viewer review icon is clickable */
.viewer-review-hit {
    position: relative;
    z-index: 10;              /* above image & meta */
    pointer-events: auto;     /* force clickability */
}

/* Defensive: image must not steal clicks */
.viewer-panel img {
    pointer-events: none;
}
/* Ensure viewer review icon is clickable */
.viewer-review-hit {
    position: relative;
    z-index: 10;              /* above image & meta */
    pointer-events: auto;     /* force clickability */
}

/* Defensive: image must not steal clicks */
.viewer-panel img {
    pointer-events: none;
}
