/* ============================================================
   Learning Lab — Shared Styles
   ============================================================
   Used by all concept pages in the Learning Lab.
   ============================================================ */

/* --- Breadcrumb Navigation --- */
.breadcrumb {
    font-size: 11px;
    color: #64748b;
    padding: 4px 0 8px;
}
.breadcrumb a {
    color: #60a5fa;
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb .sep {
    color: #475569;
    margin: 0 4px;
}

/* --- Explanation Panel --- */
.explain-title {
    font-size: 16px;
    font-weight: 700;
    color: #93c5fd;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #334155;
}

.explain-text {
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.7;
    margin-bottom: 10px;
}

.explain-text b { color: #f1f5f9; }
.explain-text i { color: #93c5fd; font-style: italic; }

/* --- Observation callouts --- */
.explain-observe {
    background: #152035;
    border-left: 3px solid #60a5fa;
    border-radius: 0 6px 6px 0;
    padding: 10px 12px;
    margin: 10px 0;
}

.explain-observe-title {
    font-size: 11px;
    font-weight: 700;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.explain-observe-item {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.65;
    padding-left: 14px;
    position: relative;
    margin-bottom: 4px;
}

.explain-observe-item::before {
    content: '\25B8';
    position: absolute;
    left: 0;
    color: #60a5fa;
    font-size: 12px;
}

/* --- Key insight box --- */
.explain-insight {
    background: #132a1a;
    border-left: 3px solid #34d399;
    border-radius: 0 6px 6px 0;
    padding: 10px 12px;
    margin: 10px 0;
    font-size: 13px;
    color: #a7f3d0;
    line-height: 1.6;
    font-style: italic;
}

/* --- Result / Computation boxes --- */
.result-box {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 6px 0;
}

.result-title {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.result-label {
    font-size: 12px;
    color: #94a3b8;
}

.result-value {
    font-size: 12px;
    font-weight: 600;
    font-family: 'Consolas', monospace;
    color: #60a5fa;
}

.result-match {
    font-size: 12px;
    font-weight: 700;
    font-family: 'Consolas', monospace;
    color: #34d399;
}

.result-mismatch {
    font-size: 12px;
    font-weight: 700;
    font-family: 'Consolas', monospace;
    color: #ef4444;
}

/* --- Property indicators --- */
.prop-yes { color: #34d399; font-weight: 700; }
.prop-no { color: #ef4444; font-weight: 700; }

/* --- Info box --- */
.info-box {
    background: #111827;
    border-left: 3px solid #60a5fa;
    border-radius: 0 6px 6px 0;
    padding: 8px 10px;
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.6;
}

/* --- Dimension toggle (2D / 3D switch) --- */
.dim-toggle {
    display: flex;
    gap: 0;
    margin: 6px 0;
}

.dim-toggle a,
.dim-toggle a:visited {
    flex: 1;
    text-decoration: none;
    display: flex;
}

.dim-toggle a .dim-btn,
.dim-toggle .dim-btn {
    flex: 1;
    padding: 7px 0;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #334155;
    background: #0f172a;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    text-decoration: none;
}

.dim-toggle .dim-btn:first-child,
.dim-toggle a:first-child .dim-btn { border-radius: 4px 0 0 4px; }
.dim-toggle .dim-btn:last-child,
.dim-toggle a:last-child .dim-btn { border-radius: 0 4px 4px 0; }

.dim-toggle .dim-btn:hover { background: #1e293b; color: #e2e8f0; }

.dim-toggle .dim-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    cursor: default;
}

/* --- Color Legend --- */
.color-legend {
    position: absolute;
    bottom: 34px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 6;
    pointer-events: none;
}
.legend-block {
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid #334155;
    border-radius: 5px;
    padding: 6px 10px 5px;
    min-width: 150px;
}
.legend-title {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 3px;
}
.legend-bar {
    height: 12px;
    border-radius: 3px;
    margin-bottom: 3px;
}
.legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-family: 'Consolas', monospace;
    color: #94a3b8;
}

/* --- Formula display for learning pages --- */
#formula-display {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 5px 16px;
    font-family: 'Cambria Math', 'Times New Roman', serif;
    font-size: 16px;
    color: #e2e8f0;
    z-index: 5;
    pointer-events: none;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Cursor info panel --- */
.cursor-info {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 6px 0;
    font-size: 12px;
    font-family: 'Consolas', monospace;
    color: #e2e8f0;
    line-height: 1.6;
}

.cursor-info .hl { color: #60a5fa; font-weight: 700; }
.cursor-info .label { color: #94a3b8; }

/* --- Status bar (shared across learn pages) --- */
#status-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 26px;
    background: rgba(17, 24, 39, 0.92);
    border-top: 1px solid #1e293b;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 20px;
    font-size: 11px;
    font-family: 'Consolas', monospace;
    color: #94a3b8;
    z-index: 10;
}
#status-bar .hl { color: #60a5fa; }
#status-bar .sep { color: #475569; }

/* --- Canvas for 2D learn pages --- */
#main-canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
}

/* --- 3D specific --- */
#canvas-area canvas { display: block; }
#loading-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: #0a0e1a; display: flex; align-items: center;
    justify-content: center; z-index: 1000; color: #60a5fa; font-size: 16px;
}
