/**
 * Linear Transformations Visualizer Styles
 * Visualization-specific styles only. Common styles are in visualizations.css.
 */

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    --lt-e1: #e41a1c;
    --lt-e2: #377eb8;
    --lt-circle: #ff7f00;
    --lt-eigen: #984ea3;
    --lt-data: #4daf4a;
    --lt-bracket: #555;
    --lt-input-bg: #fff;
    --lt-input-border: #ccc;
}

[data-theme="gruvbox-dark"] {
    --lt-e1: #fb4934;
    --lt-e2: #83a598;
    --lt-circle: #fabd2f;
    --lt-eigen: #d3869b;
    --lt-data: #b8bb26;
    --lt-bracket: #a89984;
    --lt-input-bg: #3c3836;
    --lt-input-border: #504945;
}

/* ============================================
   Canvas
   ============================================ */
#transform-canvas {
    display: block;
    width: 100%;
    cursor: default;
    background: var(--viz-canvas-bg);
}

/* ============================================
   Panel Heading Flex
   ============================================ */
.panel-heading-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============================================
   Determinant Badge
   ============================================ */
.det-badge {
    transition: all 0.3s ease;
}

/* ============================================
   Controls Layout
   ============================================ */
.lt-controls-panel {
    display: flex;
    gap: 20px;
}

.lt-matrix-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lt-toggles-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

.lt-actions-col {
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.lt-actions-col .btn-toolbar {
    display: flex;
    gap: 6px;
    flex-direction: column;
}

.control-label-sm {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}

/* ============================================
   Matrix Editor
   ============================================ */
.matrix-editor {
    display: flex;
    align-items: center;
    gap: 4px;
}

.matrix-bracket {
    font-size: 42px;
    font-weight: 200;
    line-height: 1;
    color: var(--lt-bracket);
    user-select: none;
}

.matrix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.matrix-input {
    width: 60px;
    height: 30px;
    text-align: center;
    font-family: var(--viz-mono-font);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--lt-input-border);
    border-radius: 3px;
    background: var(--lt-input-bg);
    color: var(--viz-text);
    padding: 0 4px;
}

/* Hide number spinners */
.matrix-input::-webkit-outer-spin-button,
.matrix-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.matrix-input[type=number] {
    -moz-appearance: textfield;
}

.matrix-input:focus {
    outline: none;
    border-color: var(--viz-active-border);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

/* ============================================
   Legend Line/Dot Overrides
   ============================================ */
.legend-line.basis-e1 {
    background-color: var(--lt-e1);
    height: 3px;
}

.legend-line.basis-e2 {
    background-color: var(--lt-e2);
    height: 3px;
}

.legend-line.unit-circle {
    background-color: var(--lt-circle);
    height: 2px;
}

.legend-line.eigen-line {
    background-color: var(--lt-eigen);
    height: 2px;
    border-top: 1px dashed var(--lt-eigen);
    background: none;
}

.legend-dot.data-point {
    background-color: var(--lt-data);
}

/* ============================================
   Speed Control
   ============================================ */
.speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--viz-text-muted);
}

.range-value {
    min-width: 20px;
    text-align: right;
    font-family: var(--viz-mono-font);
    font-size: 11px;
}

/* ============================================
   Checkbox Labels
   ============================================ */
.checkbox-label {
    font-size: 12px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* ============================================
   Math formula display (for info tabs)
   ============================================ */
.math-formula-display {
    text-align: center;
    margin: 10px 0;
}

.math-formula-display code {
    font-size: 16px;
    padding: 8px 16px;
}

.formula-note {
    font-size: 12px;
    color: var(--viz-text-muted);
    margin: 8px 0 4px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
    .lt-controls-panel {
        flex-direction: column;
    }

    .lt-actions-col {
        width: 100%;
    }

    .lt-actions-col .btn-toolbar {
        flex-direction: row;
        justify-content: center;
    }
}
