/* ==========================================================================
   MODULE: EXOPLANET TRANSIT LAB
   ========================================================================== */

.module-body {
    background-color: var(--color-cosmic-tertiary, #021034);
    color: var(--color-neutral-secondary, #FFFFFF);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.lab-header {
    display: none !important;
}

#audio-toggle {
    position: absolute;
    top: 14px;
    right: 20px;
    z-index: 100;
}

.lab-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lab-title-group h1 {
    font-size: 1.5rem;
    margin: 0;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    padding: 8px 16px;
}

/* Workspace */
.lab-workspace {
    display: flex;
    flex: 1;
    gap: 24px;
    padding: 24px;
    overflow: hidden;
    z-index: 1;
}

.pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius-md, 12px);
    overflow: hidden;
    background: rgba(2, 16, 52, 0.6);
    border: 1px solid rgba(222, 235, 255, 0.05);
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(222, 235, 255, 0.05);
}

.pane-header h2 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--color-cosmic-secondary, #DEEBFF);
}

/* Simulation Canvas */
.canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, rgba(18, 93, 255, 0.05) 0%, transparent 70%);
    position: relative;
    padding: 20px;
}

canvas#simCanvas {
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 0 20px rgba(18, 93, 255, 0.2));
}

/* Controls */
.controls-panel {
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(222, 235, 255, 0.05);
    display: flex;
    gap: 24px;
}

.control-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.8rem;
    font-family: monospace;
    text-transform: uppercase;
    color: var(--color-neutral-base, #C4C4C4);
    letter-spacing: 1px;
}

.val-display {
    font-size: 0.9rem;
    color: var(--color-cosmic-base, #125DFF);
    text-align: right;
    font-weight: 600;
}

/* Range Inputs */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--color-cosmic-base, #125DFF);
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(18, 93, 255, 0.5);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(222, 235, 255, 0.1);
    border-radius: 2px;
}

/* Analysis Pane */
.chart-container {
    flex: 1;
    padding: 20px;
    position: relative;
    min-height: 0; /* Important for Chart.js to resize properly */
}

/* Telemetry Grid */
.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 24px;
    border-top: 1px solid rgba(222, 235, 255, 0.05);
}

.telemetry-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(222, 235, 255, 0.05);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.t-label {
    font-size: 0.7rem;
    font-family: monospace;
    color: var(--color-neutral-base);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.t-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-cosmic-secondary);
}

/* Edu Card */
.edu-card {
    margin: 0 24px 24px 24px;
    padding: 16px;
    background: rgba(18, 93, 255, 0.05);
    border-left: 4px solid var(--color-cosmic-base);
    border-radius: 4px;
}

.edu-card h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-cosmic-base);
}

.edu-card p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-neutral-base);
    margin: 0;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--color-neutral-base);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #125DFF; /* Blue, no red/green constraint! */
    border-radius: 50%;
    box-shadow: 0 0 8px #125DFF;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(18, 93, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(18, 93, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(18, 93, 255, 0); }
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFF;
    width: 40px;
    height: 40px;
    padding: 0; /* Override the default .btn horizontal padding to force a circle */
    flex-shrink: 0; /* Prevents button from being squeezed into an oval */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon.active {
    background: #125DFF !important; /* Cosmic Blue background instead of white */
    border-color: #DEEBFF !important;
    box-shadow: 0 0 15px rgba(18, 93, 255, 0.4) !important;
}
.btn-icon:hover {
    background: var(--color-cosmic-base);
    border-color: var(--color-cosmic-base);
}
.btn-icon.active {
    background: #FFF;
    color: var(--color-cosmic-base);
}
