/* Resources — Solar System (scoped to app 19) */
.resources-solar-system-root {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding: 0.35rem 0.15rem 0.45rem;
    box-sizing: border-box;
}

.resources-solar-system-shell {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1 1 auto;
    min-height: min(78vh, 900px);
    width: 100%;
    padding: 0.85rem 1rem 1rem;
    border-radius: 14px;
    background: #04050a;
    border: 1px solid #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.resources-solar-system-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem 1.1rem;
    flex: 0 0 auto;
    padding: 0.15rem 0.1rem 0.25rem;
    box-sizing: border-box;
}

.resources-solar-system-toolbar h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: #e2e8f0;
}

.resources-solar-system-toolbar p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.45;
    max-width: 42rem;
}

.resources-solar-system-toolbar-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    padding-top: 0.1rem;
}

/* Invisible but still clickable (same spot as Open reference). */
.resources-solar-system-toolbar-actions .resources-reference-link {
    color: transparent;
    text-shadow: none;
    text-decoration: none;
    opacity: 0;
    cursor: pointer;
}

.resources-solar-system-fullview-btn {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.resources-solar-system-fullview-btn:hover {
    background: #334155;
    border-color: #475569;
    color: #fff;
}

.resources-solar-system-fullview-btn[aria-pressed="true"] {
    background: #f8fafc;
    border-color: #f8fafc;
    color: #0f172a;
}

.resources-solar-system-frame {
    flex: 1 1 auto;
    width: 100%;
    min-height: min(72vh, 840px);
    height: min(72vh, 840px);
    border: 1px solid #1e293b;
    border-radius: 14px;
    background: #04050a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* True monitor full view: undo global UI zoom and cover the real viewport. */
html:has(body.resources-solar-system-fullview-open) {
    --app-ui-zoom: 1;
    zoom: 1 !important;
}

@supports not (zoom: 1) {
    html:has(body.resources-solar-system-fullview-open) {
        --app-ui-zoom: 1;
        transform: none !important;
        width: 100% !important;
        min-height: 100% !important;
    }
}

body.resources-solar-system-fullview-open {
    overflow: hidden !important;
}

body.resources-solar-system-fullview-open .sidebar,
body.resources-solar-system-fullview-open .main-content {
    /* Keep page underneath inert while the overlay owns the screen. */
    pointer-events: none;
}

.resources-solar-system-shell.is-fullview {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    z-index: 2147483000 !important;
    padding: 1.1rem 1.25rem 1.25rem !important;
    background: #04050a !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    gap: 0.85rem;
    display: flex !important;
    flex-direction: column !important;
    pointer-events: auto;
}

.resources-solar-system-shell.is-fullview .resources-solar-system-toolbar {
    padding: 0.25rem 0.15rem 0.35rem;
    flex: 0 0 auto;
}

.resources-solar-system-shell.is-fullview .resources-solar-system-frame {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    width: 100% !important;
    border-radius: 14px;
    border-color: #334155;
}

body.resources-view-active #resources-resource-app-19.resources-app-panel.active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

body.resources-view-active #resources-resource-app-19.resources-app-panel.active > .resources-solar-system-root {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: min(78vh, 900px);
}

@media (max-width: 960px) {
    .resources-solar-system-shell {
        padding: 0.75rem 0.85rem 0.9rem;
        border-radius: 12px;
    }

    .resources-solar-system-shell,
    .resources-solar-system-frame {
        min-height: min(62vh, 640px);
    }

    .resources-solar-system-frame {
        height: min(62vh, 640px);
        border-radius: 12px;
    }

    .resources-solar-system-shell.is-fullview {
        padding: 0.9rem 1rem 1rem;
    }
}
