/* =========================================================
   LCARS CAMPAIGN COMPUTER
   VISUAL RESTORATION / BALANCE PASS

   Restores:
   - Momentum / Threat indicators
   - consistent typography scale
   - balanced buttons
   - stronger information hierarchy
   - more polished Mission Control proportions

   This file is intentionally an override layer.
========================================================= */


/* =========================================================
   GLOBAL SCALE
========================================================= */

html {
    font-size: 16px;
}

body {
    font-size: 16px;
    line-height: 1.4;
}


/* =========================================================
   CORE TYPE HIERARCHY
========================================================= */

h1 {
    font-size: clamp(2.15rem, 4vw, 4rem);
    line-height: 0.95;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1;
}

h3 {
    font-size: 1.15rem;
    line-height: 1.15;
}

p,
li,
input,
textarea,
select {
    font-size: 1rem;
}


/* =========================================================
   SMALL LCARS LABELS

   Keep them small, but not microscopic.
========================================================= */

.small-label,
.mini-label,
.screen-kicker,
.mission-live-status span,
.scene-command-data span,
.overview-block-code,
.mechanics-launch-code {
    font-size: 0.72rem !important;
    line-height: 1.2;
    letter-spacing: 0.16em;
}


/* =========================================================
   SIDEBAR
========================================================= */

.lcars-sidebar button {
    font-size: 0.76rem !important;
    letter-spacing: 0.09em;
}


/* =========================================================
   BUTTON BALANCE
========================================================= */

button {
    min-height: 44px;

    padding:
        10px
        18px;

    font-size: 0.84rem !important;

    line-height: 1;

    letter-spacing: 0.055em;
}


.primary-action {
    min-height: 48px;
}


/* =========================================================
   MISSION HEADER
========================================================= */

.mission-command-header h2 {
    font-size: clamp(1.7rem, 3vw, 2.6rem);
}


.mission-command-header .mission-meta {
    font-size: 0.92rem !important;
    line-height: 1.35;
}


/* =========================================================
   LIVE STATUS CARDS
========================================================= */

.mission-live-status {
    gap: 5px;
}


.mission-live-status > div {
    min-height: 66px;
    padding:
        12px
        14px;
}


.mission-live-status span {
    margin-bottom: 5px;
}


.mission-live-status strong {
    font-size: 1rem;
    line-height: 1.25;
}


/* =========================================================
   MISSION SUBSCREEN TABS
========================================================= */

.mission-subscreen-nav {
    gap: 7px;
}


.mission-subscreen-nav label {
    min-height: 56px;

    padding:
        10px
        13px;

    font-size: 0.78rem !important;

    letter-spacing: 0.08em;
}


/* =========================================================
   SUBSYSTEM HEADER
========================================================= */

.mission-screen-heading {
    margin-bottom: 22px;
}


.mission-screen-heading h3 {
    font-size: clamp(1.6rem, 2.8vw, 2.35rem);

    line-height: 1;

    letter-spacing: 0.055em;
}


.subsystem-code {
    font-size: 0.82rem;
}


/* =========================================================
   MOMENTUM / THREAT CARDS
========================================================= */

.overview-resource-strip {
    gap: 14px;
}


.overview-resource-card {
    min-height: 148px;

    padding:
        19px
        20px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;
}


.overview-resource-main {
    min-height: 44px;

    margin-top: 8px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 18px;
}


/* =========================================================
   RESOURCE VALUE
========================================================= */

.resource-value {
    font-size: 1.15rem !important;

    font-weight: 500;

    letter-spacing: 0.025em;

    line-height: 1;
}


/* =========================================================
   RESOURCE INDICATORS

   These are the glowing lights that disappeared.
========================================================= */

.resource-indicator {
    width: 22px;

    height: 22px;

    flex: 0 0 22px;

    border-radius: 50%;

    background: #232323;

    border:
        2px solid
        rgba(
            255,
            255,
            255,
            0.18
        );

    box-shadow:
        inset 0 0 7px rgba(0, 0, 0, 0.9),
        0 0 0 rgba(0, 0, 0, 0);

    opacity: 0.55;

    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease,
        transform 0.18s ease;
}


/* Momentum dormant */

.momentum-indicator {
    border-color:
        rgba(
            153,
            153,
            255,
            0.45
        );
}


/* Momentum active */

.momentum-indicator.active {
    background: #9999ff;

    border-color: #d7d7ff;

    opacity: 1;

    transform: scale(1.08);

    box-shadow:
        0 0 5px #9999ff,
        0 0 12px rgba(153, 153, 255, 0.95),
        0 0 24px rgba(153, 153, 255, 0.60),
        inset 0 0 5px rgba(255, 255, 255, 0.8);
}


/* Threat dormant */

.threat-indicator {
    border-color:
        rgba(
            204,
            102,
            153,
            0.45
        );
}


/* Threat active */

.threat-indicator.active {
    background: #cc6699;

    border-color: #ffb1d5;

    opacity: 1;

    transform: scale(1.08);

    box-shadow:
        0 0 5px #cc6699,
        0 0 12px rgba(204, 102, 153, 0.95),
        0 0 24px rgba(204, 102, 153, 0.60),
        inset 0 0 5px rgba(255, 255, 255, 0.8);
}


/* =========================================================
   RESOURCE BUTTONS
========================================================= */

.resource-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;

    margin-top: 14px;
}


.resource-buttons button {
    min-width: 82px;

    min-height: 43px;

    padding:
        9px
        16px;

    font-size: 0.78rem !important;
}


/* =========================================================
   OVERVIEW INFORMATION
========================================================= */

.overview-current-scene {
    min-height: 82px;
}


.overview-scene-title {
    font-size: 1.1rem !important;
}


.overview-information-block {
    min-height: 230px;
}


.overview-information-block p,
.overview-information-block li {
    font-size: 0.96rem;
    line-height: 1.45;
}


/* =========================================================
   PERSONNEL
========================================================= */

.character-card {
    font-size: 0.96rem;

    line-height: 1.35;
}


.character-card-name {
    font-size: 1.2rem !important;

    margin-bottom: 4px;
}


.character-card-rank {
    font-size: 0.92rem !important;
}


.character-card-role {
    font-size: 0.78rem !important;
}


/* =========================================================
   VESSELS
========================================================= */

.ship-card {
    font-size: 0.96rem;
    line-height: 1.35;
}


.ship-card-name {
    font-size: 1.2rem !important;
}


/* =========================================================
   COMPUTER RECORDS
========================================================= */

.computer-record-title {
    font-size: 1.15rem !important;
}


.computer-record-summary {
    font-size: 0.94rem;
    line-height: 1.45;
}


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

   Prevent the timeline from reading like one continuous
   block of undifferentiated text.
========================================================= */

.timeline-summary {
    font-size: 0.82rem !important;
}


.timeline-entry {
    margin-bottom: 9px;

    padding:
        14px
        16px;

    line-height: 1.35;
}


.timeline-entry-type {
    font-size: 0.68rem !important;
}


.timeline-entry-title {
    font-size: 1.08rem !important;

    margin-top: 4px;
}


.timeline-entry-subtitle {
    font-size: 0.87rem !important;

    margin-top: 4px;
}


.timeline-entry-description {
    font-size: 0.91rem !important;

    margin-top: 6px;
}


/* =========================================================
   FORMS
========================================================= */

input,
textarea,
select {
    min-height: 44px;

    font-size: 1rem !important;
}


textarea {
    line-height: 1.45;
}


label {
    font-size: 0.73rem !important;
}


/* =========================================================
   SETTINGS
========================================================= */

.settings-help {
    font-size: 0.94rem;

    line-height: 1.45;
}


/* =========================================================
   CONFIRM DIALOG
========================================================= */

.lcars-confirm-message {
    font-size: 1.05rem;
}


.lcars-confirm-detail {
    font-size: 0.92rem;
}


/* =========================================================
   LARGE SCREENS
========================================================= */

@media (min-width: 1100px) {

    .overview-resource-card {
        min-height: 154px;
    }


    .resource-indicator {
        width: 24px;

        height: 24px;

        flex-basis: 24px;
    }

}


/* =========================================================
   TABLETS / SMALL LAPTOPS
========================================================= */

@media (max-width: 900px) {

    html {
        font-size: 15px;
    }


    .overview-resource-card {
        min-height: 138px;
    }


    .mission-subscreen-nav label {
        min-height: 52px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    html {
        font-size: 15px;
    }


    .overview-resource-main {
        gap: 12px;
    }


    .resource-indicator {
        width: 20px;

        height: 20px;

        flex-basis: 20px;
    }


    button {
        font-size: 0.78rem !important;
    }

}


/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .resource-indicator {
        transition: none;
    }

}

/* =========================================================
   FINAL BALANCE OVERRIDES
   Keep the interface readable and visually even across
   Mission, Personnel, Vessels, Computer and Timeline.
========================================================= */

.content-area {
    font-size: 1rem;
}

.content-area p,
.content-area li,
.content-area .system-copy {
    line-height: 1.45;
}

.record-count,
.timeline-summary {
    min-height: 34px;
    display: flex;
    align-items: center;
}

.character-card,
.ship-card,
.computer-record-card,
.timeline-entry {
    font-size: 0.96rem;
}

.character-card-name,
.ship-card-name,
.computer-record-title {
    line-height: 1.15;
}

/* Keep the resource lamp visible even in the inactive state. */
.resource-indicator {
    visibility: visible !important;
}

/* A little more separation between value and controls. */
.overview-resource-main {
    margin-bottom: 4px;
}

/* Prevent tiny metadata on desktop while still fitting iPad. */
.mission-meta,
.timeline-entry-subtitle,
.computer-record-summary {
    font-size: 0.94rem;
}

@media (min-width: 901px) {
    .content-area {
        font-size: 16px;
    }

    .lcars-sidebar button {
        font-size: 0.75rem !important;
    }

    .mini-label,
    .small-label,
    .screen-kicker {
        font-size: 0.72rem !important;
    }
}
