/* ═══════════════════════════════════════════════
   OMEGA ERA 7.2.3 — LAYOUT & RACK SYSTEM
   ═══════════════════════════════════════════════ */

@import './cables.css';

.rack-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 98vw;
    margin: 55px auto 0 auto;
    background: linear-gradient(180deg, #151a26 0%, #0c101a 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 100;
    overflow: hidden;
}

.rack-row {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 100px;
    position: relative;
}

.rack-row.upper {
    padding: 2px 12px;
    height: 150px !important;
    min-height: 150px !important;
    max-height: 150px !important;
    background-image: 
        linear-gradient(180deg, rgba(12, 16, 24, 0.65) 0%, rgba(12, 16, 24, 0.45) 50%, rgba(12, 16, 24, 0.65) 100%),
        url('./oak_wood.jpg');
    background-position: 0 0, center center;
    background-repeat: no-repeat, no-repeat;
    background-size: 100% 100%, cover;
    box-shadow: inset 0 12px 24px rgba(0, 0, 0, 0.85), inset 0 -12px 24px rgba(0, 0, 0, 0.85), inset 12px 0 20px rgba(0, 0, 0, 0.75), inset -12px 0 20px rgba(0, 0, 0, 0.75);
    border-bottom: 3px solid #232c3d;
}

.rack-row.lower {
    padding: 2px 12px;
    height: 440px !important;
    min-height: 440px !important;
    max-height: 440px !important;
    background-image: 
        linear-gradient(180deg, rgba(12, 16, 24, 0.65) 0%, rgba(12, 16, 24, 0.45) 50%, rgba(12, 16, 24, 0.65) 100%),
        url('./oak_wood.jpg');
    background-position: 0 0, center center;
    background-repeat: no-repeat, no-repeat;
    background-size: 100% 100%, cover;
    box-shadow: inset 0 12px 24px rgba(0, 0, 0, 0.85), inset 0 -12px 24px rgba(0, 0, 0, 0.85), inset 12px 0 20px rgba(0, 0, 0, 0.75), inset -12px 0 20px rgba(0, 0, 0, 0.75);
    flex-grow: 0;
}

/* TOP ELEVATED METALLIC HARDWARE RAIL */
.rack-row::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 15px;
    z-index: 5;
    pointer-events: none;
    background-image: 
        url('./rail_left.png'),
        url('./rail_right.png'),
        url('./rail_center.png');
    background-position: 
        left top,
        right top,
        left top;
    background-repeat: 
        no-repeat,
        no-repeat,
        repeat-x;
    background-size: 
        11px 15px,
        11px 15px,
        15px 15px;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.9));
}

/* BOTTOM ELEVATED METALLIC HARDWARE RAIL */
.rack-row::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 15px;
    z-index: 5;
    pointer-events: none;
    background-image: 
        url('./rail_left.png'),
        url('./rail_right.png'),
        url('./rail_center.png');
    background-position: 
        left bottom,
        right bottom,
        left bottom;
    background-repeat: 
        no-repeat,
        no-repeat,
        repeat-x;
    background-size: 
        11px 15px,
        11px 15px,
        15px 15px;
    filter: drop-shadow(0 -3px 5px rgba(0, 0, 0, 0.9));
}

/* Module 3D Subtle Drop Shadow onto recessed oak backboard & Screw Mounting over Rails */
.aseptic-module-panel, .omega-module-chassis, .module {
    position: relative !important;
    z-index: 30 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: -1px !important;
    border-radius: 0 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.rack-row.upper .aseptic-module-panel,
.rack-row.upper .omega-module-chassis,
.rack-row.upper .module {
    height: 146px !important;
}

.rack-row.lower .aseptic-module-panel,
.rack-row.lower .omega-module-chassis,
.rack-row.lower .module {
    height: 436px !important;
}

/* Era 7.2.3 — Module header overlays the chassis instead of stealing 20px from it.
   Without this, the canonical face height (1U = 144px, 3U = 432px) is clipped at
   the bottom by `.module { overflow: hidden }` (jack row cut off). */
.rack-row .module-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 6;
}

/* POWER BUS CIRCUIT BOARD LAYER (100% Larger than original, On Top of Wood, Below Rails & Modules) */
.power-bus-container {
    position: absolute;
    top: 50%;
    left: 45px;
    right: 45px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: row;
    gap: 60px;
    align-items: center;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.power-bus-board {
    width: 900px;
    height: 96px;
    flex-shrink: 0;
    background-image: url('./power_bus.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    opacity: 0.88;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.82));
}

/* TELEMETRY BAR */
.telemetry-bar {
    height: 120px;
    background: #080808;
    border-top: 1px solid #222;
    display: flex;
    flex-direction: row;
    padding: 10px 15px;
    gap: 30px;
    align-items: center;
    overflow-x: auto;
    position: relative;
}

.telemetry-header {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #111;
    padding: 2px 10px;
    border: 1px solid #333;
    font-size: 0.6rem;
    color: var(--wb-primary);
    letter-spacing: 2px;
    font-weight: bold;
    border-radius: 4px;
}


/* SPLASH SCREEN */
#splash-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000814; /* Midnight blue for diagnostic */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50000;
    transition: opacity 0.5s ease-out;
}

.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.splash-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 40px; /* Even wider */
    margin: 0;
    color: #fff;
    text-shadow: 0 0 30px rgba(0, 242, 255, 0.4);
    text-transform: uppercase;
    padding-left: 40px;
}

.splash-version {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 5px;
    color: var(--wb-text-muted);
    text-transform: uppercase;
    margin-top: 15px;
}

.splash-loading-bar {
    width: 200px;
    height: 2px;
    background: #111;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.loading-progress {
    width: 100%;
    height: 100%;
    background: var(--wb-primary);
    box-shadow: 0 0 10px var(--wb-primary);
    animation: loading-kf 2s infinite ease-in-out;
}
