/*
 * panorama-public.css
 * Lab 03 — Public-facing Panorama Analyst
 * Instrument layout under the YEA site header
 *
 * Path: /projects/yea3d/labs/panorama-public.css
 * Author: M. Hamilton / Claude collaboration
 * Date: March 2026
 */

/* ================================================================
   SCOPED DESIGN TOKENS — ecoSPLAT variables for instrument workspace only
   These must NOT be on :root or they override the YEA site palette.
   ================================================================ */

#instrument-workspace {
    --bg-deep: #06070d;
    --bg-panel: #0c0e18;
    --bg-surface: #12142200;
    --bg-surface-solid: #161830;
    --border: #1e2235;
    --border-hover: #2e3255;
    --border-focus: #e67e22;
    --text-primary: #d4d6e0;
    --text-bright: #ffffff;
    --text-secondary: #6b6f85;
    --text-dim: #3a3d52;
    --accent: #e67e22;
    --accent-glow: #e67e2240;
    --accent-hover: #f09030;
    --eco-green: #3ddc84;
    --eco-green-dim: #3ddc8440;
    --eco-blue: #4fc3f7;
    --eco-warm: #ffb74d;
    --eco-red: #ef5350;
    --font-display: 'Instrument Serif', serif;
    --radius-sm: 3px;
    --radius-md: 5px;
    --radius-lg: 8px;
    --radius-round: 50%;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.4s ease;
    --marker-size: 28px;
    --marker-size-hover: 36px;
    --font-mono: 'DM Mono', monospace;
    --font-size-xs: 9px;
    --font-size-sm: 10px;
    --font-size-base: 11px;
    --font-size-md: 12px;
    --font-size-lg: 16px;
    --font-size-xl: 20px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-xxl: 24px;
}

/* ================================================================
   INSTRUMENT HEADER
   ================================================================ */

#instrument-header {
    background: linear-gradient(135deg, #252E22 0%, #2E3C2A 50%, #222A20 100%);
    border-bottom: 3px solid #5c7a3a;
    padding: 0.6rem 2rem;
}

.instrument-header-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.instrument-breadcrumb {
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    color: rgba(106, 174, 106, 0.5);
    text-decoration: none;
    letter-spacing: 0.08em;
}
.instrument-breadcrumb:hover {
    color: rgba(106, 174, 106, 0.85);
}

.instrument-id {
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 12px;
    color: rgba(106, 174, 106, 0.5);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.instrument-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: normal;
    color: #E8F2E4;
    line-height: 1.2;
    margin: 0;
}
.instrument-title-dim {
    color: rgba(160, 200, 150, 0.45);
}

/* ================================================================
   WORKSPACE
   ================================================================ */

#instrument-workspace {
    display: flex;
    max-width: 1400px;
    margin: 1rem auto;
    padding: 0 1.5rem;
    height: 680px;
    gap: 0;
}

/* ================================================================
   LEFT PANEL
   ================================================================ */

#instrument-panel {
    width: 240px;
    min-width: 240px;
    background: #faf8f3;
    border: 1.5px solid #d8d0c4;
    border-right: none;
    border-radius: 5px 0 0 5px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.6rem 0.5rem;
}

.panel-state {
    display: flex;
    flex-direction: column;
}

.panel-label {
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a7e6e;
    margin-bottom: 0.35rem;
    padding: 0 2px;
}

.panel-meta {
    font-family: Georgia, serif;
    font-size: 12px;
    color: #6b5d4d;
    line-height: 1.5;
    padding: 0 2px;
}

.panel-dim {
    color: #a09888;
    font-weight: normal;
}

.panel-back {
    display: inline-block;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 11px;
    color: #5c7a3a;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 2px 8px;
    letter-spacing: 0.03em;
}
.panel-back:hover {
    color: #3e5a2a;
}

.panel-station-name {
    font-family: Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    color: #2c2416;
    line-height: 1.3;
    padding: 0 2px;
}

.panel-station-meta {
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 10px;
    color: #a09888;
    padding: 0 2px;
    margin-top: 2px;
}

/* ── Station cards ── */

.station-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.station-card {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 5px;
    background: #faf8f3;
    border: 1px solid #d8d0c4;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.station-card:hover {
    border-color: #5c7a3a;
    background: #f0ede4;
}
.station-card.active {
    border-color: #5c7a3a;
    background: #e8e4d8;
}

.station-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #5c7a3a;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.station-thumb-initial {
    font-family: Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    color: #f0ede4;
    line-height: 1;
}

.station-card-info {
    overflow: hidden;
    flex: 1;
}

.station-card-name {
    font-family: Georgia, serif;
    font-size: 11px;
    color: #2c2416;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-card-sub {
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 9px;
    color: #a09888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Photopoint cards ── */

.photopoint-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.photopoint-card {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 6px;
    background: #faf8f3;
    border: 1px solid #d8d0c4;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.photopoint-card:hover {
    border-color: #5c7a3a;
    background: #f0ede4;
}
.photopoint-card.active {
    border-color: #5c7a3a;
    background: #e8e4d8;
}

.photopoint-thumb {
    width: 44px;
    height: 28px;
    border-radius: 3px;
    background-size: cover;
    background-position: center;
    background-color: #d8d0c4;
    flex-shrink: 0;
}

.photopoint-info {
    overflow: hidden;
    flex: 1;
}

.photopoint-name {
    font-family: Georgia, serif;
    font-size: 12px;
    color: #2c2416;
    line-height: 1.2;
}

.photopoint-sub {
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 9px;
    color: #a09888;
    margin-top: 1px;
}

/* ── Mode buttons ── */

.mode-buttons {
    display: flex;
    gap: 3px;
}

.mode-btn {
    flex: 1;
    padding: 5px 0;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 10px;
    letter-spacing: 0.05em;
    color: #6b5d4d;
    background: #faf8f3;
    border: 1px solid #d8d0c4;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
}
.mode-btn:hover {
    border-color: #5c7a3a;
}
.mode-btn.active {
    background: #5c7a3a;
    color: #fff;
    border-color: #3e5a2a;
}
.mode-btn:disabled {
    opacity: 0.4;
    cursor: wait;
    pointer-events: none;
}

/* ── Sliders ── */

.panel-slider {
    width: 100%;
    accent-color: #5c7a3a;
}

/* ── Buttons ── */

.panel-btn {
    width: 100%;
    margin-top: 6px;
    padding: 5px 8px;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 11px;
    color: #5c7a3a;
    background: transparent;
    border: 1px solid #d8d0c4;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.panel-btn:hover {
    background: #f0ede4;
    border-color: #5c7a3a;
}

.panel-btn.grid-toggle.active {
    background: #5c7a3a;
    color: #fff;
    border-color: #3e5a2a;
}
.panel-btn.grid-toggle.active:hover {
    background: #4a6a2e;
}

/* ================================================================
   VIEWPORT
   ================================================================ */

#instrument-viewport {
    flex: 1;
    position: relative;
    background: #0a0a0a;
    border: 1.5px solid #d8d0c4;
    border-left: none;
    border-radius: 0 5px 5px 0;
    overflow: hidden;
}

.viewport-layer {
    position: absolute;
    inset: 0;
    display: none;
    z-index: 1;
}
.viewport-layer.active {
    display: block;
}

/* ================================================================
   TIMELINE BAR
   ================================================================ */

.timeline-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: linear-gradient(0deg, rgba(6, 7, 13, 0.92) 0%, rgba(6, 7, 13, 0.6) 70%, transparent 100%);
    padding: 20px 24px 12px;
    display: none;
}
.timeline-bar.visible {
    display: block;
}

.timeline-track {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.timeline-marker:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}
.timeline-marker.active {
    background: rgba(92, 122, 58, 0.5);
    border-color: #5c7a3a;
}

.timeline-season {
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 10px;
    color: #d4d6e0;
    letter-spacing: 0.08em;
    text-transform: capitalize;
}

.timeline-year {
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 9px;
    color: #6b6f85;
}

.timeline-3d {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #5c7a3a;
    margin-top: 3px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 900px) {
    #instrument-workspace {
        flex-direction: column;
        height: auto;
    }
    #instrument-panel {
        width: 100%;
        min-width: auto;
        border-right: 1.5px solid #d8d0c4;
        border-bottom: none;
        border-radius: 5px 5px 0 0;
        max-height: 260px;
    }
    #instrument-viewport {
        border-left: 1.5px solid #d8d0c4;
        border-radius: 0 0 5px 5px;
        height: 500px;
    }
}