
/* ============================================================
   EPHEMERIS — PLANETARIUM
   ============================================================ */


/* ============================================================
   01. PAGE LAYOUT & HEADING
   ============================================================ */

.planetarium-page {
    width: 100%;
    max-width: 100%;
    padding: 22px clamp(12px, 2vw, 30px) 30px;
    box-sizing: border-box;
}

.planetarium-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.planetarium-kicker {
    color: #00b3c8;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.planetarium-heading h1 {
    margin: 5px 0;
    font-size: clamp(1.6rem, 2.6vw, 2.35rem);
}

.planetarium-heading p {
    margin: 0;
    opacity: 0.75;
}


/* ============================================================
   02. OBSERVING TOOLBAR
   ============================================================ */

.planetarium-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: #0d1b2b;
    border: 1px solid rgba(0, 179, 200, 0.22);
    border-radius: 12px;
}

.planetarium-toolbar-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.planetarium-toolbar-label {
    color: #8fa9bb;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.planetarium-toolbar-item strong {
    color: #eaf8ff;
    font-size: 0.94rem;
}

.planetarium-toolbar-note {
    margin-left: auto;
    color: #8fa9bb;
    font-size: 0.79rem;
}


/* ============================================================
   03. LOCATION BUTTON
   ============================================================ */

.planetarium-location-button {
    appearance: none;
    padding: 9px 12px;
    border: 1px solid rgba(0, 179, 200, 0.45);
    border-radius: 8px;
    background: rgba(0, 179, 200, 0.08);
    color: #69dce8;
    font: inherit;
    font-size: 0.84rem;
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s,
        transform 0.2s;
}

.planetarium-location-button:hover {
    background: rgba(0, 179, 200, 0.17);
    border-color: #00b3c8;
    transform: translateY(-2px);
}


/* ============================================================
   04. DATE & TIME CONTROLS
   ============================================================ */

.planetarium-datetime-controls {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.planetarium-datetime-controls .app-field {
    flex: 0 0 auto;
}

.planetarium-datetime-controls .app-input {
    width: auto;
    min-width: 145px;
    color-scheme: dark;
}

.planetarium-datetime-controls .app-label {
    margin-bottom: 5px;
}

.planetarium-now-button {
    height: 46px;
    padding: 0 18px;
    border: 1px solid var(--gold);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s,
        transform 0.2s;
}

.planetarium-now-button:hover {
    background: var(--gold);
    color: #111;
    transform: translateY(-2px);
}


/* ============================================================
   05. PLANETARIUM TWO-COLUMN LAYOUT
   ============================================================ */

.planetarium-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}


/* ============================================================
   06. SKY VIEWER & CANVAS
   ============================================================ */

.planetarium-stage {
    position: relative;
    width: 100%;
    height: min(75vh, 900px);
    min-height: 460px;
    overflow: hidden;
    border: 1px solid rgba(0, 179, 200, 0.25);
    border-radius: 14px;
    background: #02050d;
    isolation: isolate;
}

.planetarium-layout .planetarium-stage {
    min-width: 0;
}

#planetarium-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}


/* ============================================================
   07. SKY ENGINE STATUS MESSAGES
   ============================================================ */

.planetarium-status {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 9px 12px;
    border-radius: 8px;
    background: rgba(3, 9, 19, 0.83);
    color: #f5fbff;
    font-size: 0.8rem;
    pointer-events: none;
}

.planetarium-status.is-ready {
    display: none;
}

.planetarium-status.is-error {
    color: #ffb8b8;
}


/* ============================================================
   08. OBJECT EXPLORER — PANEL
   ============================================================ */

.planetarium-object-panel {
    min-width: 0;
    padding: 20px;
    align-self: stretch;
    border: 1px solid rgba(0, 179, 200, 0.25);
    border-radius: 14px;
    background: #0d1b2b;
}

/* Hide redundant "Object Information" heading */

.planetarium-object-panel h2 {
    display: none;
}

/* Placeholder when no object is selected */

.planetarium-object-empty {
    color: #8fa9bb;
    font-size: 0.9rem;
    line-height: 1.6;
}


/* ============================================================
   09. OBJECT EXPLORER — SELECTED OBJECT NAME
   ============================================================ */

#planetarium-object-details h3 {
    margin: 4px 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 179, 200, 0.25);
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
}


/* ============================================================
   10. OBJECT EXPLORER — SECTION HEADINGS
   ============================================================ */

#planetarium-object-details h4 {
    margin: 18px 0 7px;
    padding-bottom: 3px;
    border-bottom: 2px solid rgba(0, 179, 200, 0.25);
    color: #00b3c8;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

#planetarium-object-details h4:first-of-type {
    margin-top: 0;
}


/* ============================================================
   11. OBJECT EXPLORER — DATA ROWS
   ============================================================ */

#planetarium-object-details p {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 0 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    color: #eaf8ff;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

/* Data labels */

#planetarium-object-details p strong {
    flex: 0 0 auto;
    color: #8fa9bb;
    font-size: 0.78rem;
    font-weight: 500;
}

/* No divider at the end of a section */

#planetarium-object-details p:has(+ h4),
#planetarium-object-details p:last-child {
    border-bottom: none;
}


/* ============================================================
   12. RESPONSIVE — TABLET
   ============================================================ */

@media (max-width: 900px) {

    .planetarium-layout {
        grid-template-columns: 1fr;
    }

    .planetarium-object-panel {
        padding: 16px;
    }

    #planetarium-object-details p {
        font-size: 0.85rem;
    }

}


/* ============================================================
   13. RESPONSIVE — MOBILE
   ============================================================ */

@media (max-width: 700px) {

    .planetarium-page {
        padding: 12px 8px 20px;
    }

    .planetarium-heading {
        padding: 0 5px;
    }

    .planetarium-toolbar {
        padding: 10px;
    }

    .planetarium-toolbar-note {
        margin-left: 0;
        flex-basis: 100%;
    }

    .planetarium-stage {
        height: 70dvh;
        min-height: 350px;
        border-radius: 10px;
    }

}

/* Display alternate catalog names on separate lines */

#planetarium-object-details p:nth-of-type(2) {
    white-space: pre-line;
    text-align: right;
}