/* 3D Portfolio - Hard Copy-stil (hardcopy.css) på grön bakgrund med blinkande stjärnor */

body {
    background: radial-gradient(ellipse at 50% 0%, #0e5226 0%, #0a3d1c 45%, #052310 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 12px 12px 48px;
    margin: 0;
}

/* Stjärnfält bakom fönstren */
#stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #eaffea;
    border-radius: 50%;
    opacity: 0.2;
    box-shadow: 0 0 4px 1px rgba(220, 255, 220, 0.6);
    animation: twinkle var(--dur, 3s) ease-in-out var(--delay, 0s) infinite;
}

.star.big { width: 3px; height: 3px; }
.star.small { width: 1px; height: 1px; box-shadow: 0 0 3px 1px rgba(220,255,220,0.5); }

@keyframes twinkle {
    0%, 100% { opacity: 0.15; }
    50%      { opacity: 1; }
}

.hc-wrap {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
}

.subtitle {
    margin: 0 0 10px;
    color: #000080;
    font-size: 11px;
}

/* Layout: visare + sidopanel */
.layout {
    display: flex;
    gap: 10px;
}

.viewer-panel {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

#viewer-container {
    position: relative;
    width: 100%;
    height: 520px;
    background: #0b2e16;
    border: 2px inset #c0c0c0;
    overflow: hidden;
}

#viewer-container canvas { display: block; }

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #eaffea;
    background: rgba(5, 35, 16, 0.8);
    padding: 6px 12px;
    border: 1px solid #2e7d46;
}

.controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.hint { font-size: 11px; color: #000080; }

.control-buttons { display: flex; gap: 4px; }

.side-panel {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sub-window { margin: 0; }
.sub-window .window-body { padding: 6px; }

/* Win98-knappar (matchar Hard Copy-känslan utan att vara beroende av extern .btn) */
.btn {
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 12px;
    background: #c0c0c0;
    border: 2px outset #dfdfdf;
    padding: 3px 8px;
    cursor: pointer;
    color: #000;
}
.btn:active { border-style: inset; }

#gallery {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 360px;
    overflow-y: auto;
}

.gallery-item {
    text-align: left;
    width: 100%;
}
.gallery-item.active {
    background: #000080;
    color: #fff;
    border-style: inset;
}
.gallery-item .gi-year { opacity: 0.7; font-size: 11px; }

.info { font-size: 12px; line-height: 1.55; color: #000; }
.info h3 { margin: 0 0 4px; font-size: 13px; color: #000080; }
.info .meta { color: #006622; font-size: 11px; margin-bottom: 6px; }

/* Beställningsfönster (kalkylator) i samma Hard Copy-stil */
.order-window { margin-top: 12px; }

.selected-model {
    font-size: 12px;
    color: #000080;
    background: #fff7d6;
    border: 2px inset #c0c0c0;
    padding: 6px 8px;
    margin-bottom: 10px;
}
.selected-model strong { color: #006622; }

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.calc-field { text-align: left; }
.calc-field label { display: block; font-size: 11px; color: #000080; margin-bottom: 3px; }

.calc-field input,
.calc-field select {
    width: 100%;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 12px;
    color: #000;
    background: #fff;
    border: 2px inset #c0c0c0;
    border-radius: 0;
    padding: 4px 6px;
    outline: none;
}

.note { font-size: 10px; color: #006622; margin-top: 3px; }

.calc-row { margin: 4px 0 10px; }

.calc-out {
    font-family: "Lucida Console", "Courier New", monospace;
    font-size: 12px;
    line-height: 1.7;
    color: #000;
    background: #eaffea;
    border: 2px inset #c0c0c0;
    padding: 8px 10px;
    min-height: 18px;
}
.calc-out .tag {
    display: inline-block;
    min-width: 150px;
    color: #000080;
    font-weight: bold;
}

.calc-mut { font-size: 10px; color: #006622; margin: 10px 0; }

.cta { display: inline-block; text-decoration: none; }

@media (max-width: 760px) {
    .layout { flex-direction: column; }
    .side-panel { flex-basis: auto; }
    #viewer-container { height: 360px; }
    .calc-grid { grid-template-columns: 1fr; }
}
