/*
 * StarshipOS — Deck Map Styles (CC_092)
 */

.deck-map-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1rem;
    height: calc(100vh - 120px);
}

/* SVG container */
.deck-map-container {
    position: relative;
    background: #050505;
    border: 1px solid #1a3a1a;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    padding: 1rem;
}

#deck-map-svg .deck-section:hover {
    fill: #0a2a0a !important;
    stroke: #0f3 !important;
}

#deck-map-svg .section-locked {
    stroke: #ff9 !important;
    stroke-width: 2px;
}

#deck-map-svg .section-damaged {
    stroke: #666 !important;
    stroke-dasharray: 4 2;
}

#deck-map-svg .section-has-team {
    stroke: #0f3 !important;
    stroke-width: 3px;
}

/* Threat icons in SVG */
.threat-intruder  { fill: #f33; }
.threat-fire      { fill: #f90; }
.threat-hull      { fill: #39f; }
.threat-radiation { fill: #c0f; }

/* Action Panel */
.deck-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow-y: auto;
}

.section-action-panel {
    background: #0a0a0a;
    border: 1px solid #1a3a1a;
    padding: 0.8rem;
}

.action-panel-title {
    color: #0f3;
    font-weight: bold;
    margin: 0 0 0.7rem;
    font-size: 0.9rem;
}

.action-btn {
    background: #0a2a0a;
    color: #0f3;
    border: 1px solid #0f3;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.8rem;
    width: 100%;
    margin-bottom: 0.3rem;
    text-align: left;
}

.action-btn:hover {
    background: #0a3a0a;
}

.action-btn-lock   { border-color: #ff9; color: #ff9; background: #1a1400; }
.action-btn-unlock { border-color: #0f3; color: #0f3; background: #001a00; }
.action-btn-danger { border-color: #f33; color: #f33; background: #1a0000; }

.threat-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    border: 1px solid;
    margin: 0.1rem;
}
.threat-badge-intruder  { color: #f33; border-color: #f33; }
.threat-badge-fire      { color: #f90; border-color: #f90; }
.threat-badge-hull      { color: #39f; border-color: #39f; }
.threat-badge-radiation { color: #c0f; border-color: #c0f; }

/* Dispatch tracker */
.dispatch-tracker {
    background: #0a0a0a;
    border: 1px solid #1a3a1a;
    padding: 0.8rem;
}

.dispatch-item {
    background: #050505;
    border: 1px solid #1a2a1a;
    padding: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}

.dispatch-en-route { border-left: 3px solid #f90; }
.dispatch-arrived  { border-left: 3px solid #0f3; }

.door-state-open    { color: #0f3; }
.door-state-locked  { color: #ff9; }
.door-state-damaged { color: #666; }

/*
  Ab 1024 px: Die feste Höhe calc(100vh - 120px) passte nicht zu Kopfzeile und
  Überschrift (die Seite scrollte um ~40 px). Jetzt füllt die Karte den Rest bis zum unteren Rand
  (Abstand dort = Innenabstand von .station-main, wie oben), und das SVG wächst mit (viewBox,
  Seitenverhältnis bleibt). Ab 1600 px darf die Seite breiter werden als die Standardhülle (1400 px).
*/
@media (min-width: 1600px) {
    .station-main:has(.deck-map-layout) { max-width: min(2400px, 100%); }
}
@media (min-width: 1024px) {
    .station-main:has(.deck-map-layout) { display: flex; flex-direction: column; }
    .deck-map-layout {
        height: auto;
        flex: 1 1 0;
        min-height: 420px;
        grid-template-columns: minmax(0, 1fr) 280px;
    }
    .deck-map-container { align-items: stretch; }
    .deck-map-container #svg-wrapper { flex: 1 1 auto; display: flex; min-width: 0; }
    .deck-map-container #deck-map-object { width: 100%; height: 100%; min-height: 390px; }
}
