/* ============================================================
   PixLab Forensic — Workspace panes
   Visual (image/map), Audio (waveform), Graph (3D entities).
   ============================================================ */

.workspace-pane {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.workspace-pane.hidden {
    display: none !important;
}

/* ---------- Shared stage ---------- */

.stage {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.stage.centered {
    background-color: var(--panel-tint);
}

.empty-state {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-1);
    text-align: center;
    color: var(--text-muted);
    pointer-events: none;
    transition: opacity var(--t-med);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: var(--sp-4);
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
}

.empty-state .hint {
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: var(--sp-2);
}

/* ---------- Visual workspace ---------- */

/* Product introduction and readable FAQ share the existing workspace. */
.welcome-state {
    pointer-events: auto;
    overflow-y: auto;
    justify-content: flex-start;
    padding: clamp(1.25rem, 4vw, 3.5rem);
    padding-bottom: calc(var(--playbar-h) + 2rem);
    text-align: left;
}

.welcome-content {
    flex-shrink: 0;
    width: 100%;
    max-width: 38rem;
    margin-block: auto;
}

.welcome-eyebrow {
    color: var(--accent-cyan);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.welcome-content h1 {
    margin: var(--sp-4) 0;
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.035em;
    color: var(--text-high);
    text-wrap: balance;
}

.welcome-description,
.media-guide p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
    gap: var(--sp-3);
    padding: 0;
    margin: var(--sp-6) 0;
    list-style: none;
}

.welcome-features li {
    padding: var(--sp-4);
    border: 1px solid var(--border-a50);
    border-radius: var(--radius-lg);
    background-color: var(--bg-800);
    color: var(--text-high);
    font-size: 0.75rem;
    line-height: 1.5;
}

.welcome-state .welcome-feature-icon {
    display: block;
    width: fit-content;
    margin: 0 0 var(--sp-3);
    font-size: 1.25rem;
    color: var(--accent-cyan);
    opacity: 1;
}

.welcome-features h2 {
    margin: 0 0 var(--sp-2);
    font-size: 0.875rem;
    font-weight: 600;
}

.welcome-features p {
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.welcome-eyebrow > span {
    margin-inline: 0.4rem;
    color: var(--text-muted);
}

.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-4);
    margin-top: var(--sp-6);
}

.welcome-link,
.media-guide a {
    color: var(--text-high);
    text-underline-offset: 0.25em;
    font-size: 0.875rem;
}

.welcome-note {
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.welcome-steps {
    margin: var(--sp-4) 0;
    padding-left: 1.25rem;
}

.welcome-steps li {
    padding-left: var(--sp-1);
    margin-bottom: var(--sp-3);
}

.welcome-steps li::marker {
    color: var(--accent-cyan);
    font-weight: 600;
}

.welcome-steps strong,
.welcome-steps span {
    display: block;
}

.welcome-steps span,
.bubble .inspector-service-note {
    margin-top: var(--sp-1);
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.bubble .inspector-service-note {
    padding-top: var(--sp-3);
    border-top: 1px solid var(--border-a30);
}

#workspace-about {
    overflow-y: auto;
    background-color: var(--bg-900);
}

.media-guide {
    flex-shrink: 0;
    width: 100%;
    max-width: 54rem;
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 3rem);
    overflow-wrap: anywhere;
}

.media-guide h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.guide-questions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: var(--sp-4);
    margin: var(--sp-8) 0;
}

.guide-questions section {
    padding: var(--sp-4);
    border: 1px solid var(--border-a50);
    border-radius: var(--radius-lg);
    background-color: var(--bg-800);
}

.guide-questions h3 {
    margin: 0 0 var(--sp-2);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.guide-questions p {
    margin: 0;
    font-size: 0.875rem;
}

.media-faq details {
    border-bottom: 1px solid var(--border-a50);
}

.media-faq summary {
    padding: var(--sp-4) 0;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.6;
    cursor: pointer;
}

.media-faq details p {
    margin: 0 0 var(--sp-4);
    font-size: 0.875rem;
}

.guide-footer {
    margin-top: var(--sp-8);
}

.welcome-actions :focus-visible,
.media-guide :focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 4px;
}

@media (max-width: 1023px) {
    /* Give the introduction and help the full canvas on small screens. */
    .split-area:has(#workspace-visual:not(.hidden) .welcome-state:not(.hidden)) > .inspector,
    .split-area:has(#workspace-visual:not(.hidden) .welcome-state:not(.hidden)) > .resizer,
    .split-area:has(#workspace-about:not(.hidden)) > .inspector,
    .split-area:has(#workspace-about:not(.hidden)) > .resizer {
        display: none;
    }

    .main-area:has(#workspace-visual:not(.hidden) .welcome-state:not(.hidden)) #btn-export-report,
    .main-area:has(#workspace-about:not(.hidden)) #btn-export-report {
        display: none;
    }

    .welcome-content h1 {
        font-size: 1.625rem;
    }
}

#image-container {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

#image-container.hidden,
#map-container.hidden {
    display: none;
}

#forensic-image {
    max-width: none;
    box-shadow: var(--shadow-pane);
    transition: transform 120ms ease-out;
    transform-origin: center;
    user-select: none;
    -webkit-user-drag: none;
}

#map-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

#map-container .map-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--sp-4);
    font-size: 0.875rem;
    color: var(--text-muted);
    background-color: var(--bg-800);
    border-left: 1px solid var(--border-a30);
}

/* Geo split mode — JS toggles widths inline; this is the base state */
.stage.geo-split #image-container,
.stage.geo-split #map-container {
    will-change: width;
}

/* ---------- Audio workspace ---------- */

.waveform {
    width: 100%;
    height: 16rem;
    margin-top: var(--sp-8);
    z-index: 10;
    position: relative;
}

/* ---------- Graph workspace ---------- */

#workspace-graph {
    background-color: #000000;
}

.graph-view {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#workspace-graph .empty-state.overlay {
    pointer-events: none;
}
