/* Laplace (S-Transform) Interactive Visualizer - local styles */
/* requirements: black bg, Courier New, max-width 800px, controls inline */
/* Cloned from Z-transform framework; same structure. */

.zt-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
    font-family: 'Courier New', monospace;
    background-color: #0a0a0a;
    color: #e0e0e0;
    border-radius: 6px;
}

.zt-container * {
    box-sizing: border-box;
}

.zt-title {
    font-size: 14px;
    font-weight: bold;
    color: #7aa2f7;
    margin-bottom: 8px;
    text-align: center;
}

.zt-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    padding: 12px;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    margin-bottom: 12px;
}

.zt-controls label {
    color: #aaa;
    font-size: 11px;
    white-space: nowrap;
}

.zt-control-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.zt-control-row label { margin-right: 2px; }

.zt-control-row input[type="range"] {
    width: 80px;
    min-width: 60px;
    height: 6px;
    background: #333;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
}

.zt-control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #7aa2f7;
    border-radius: 50%;
    cursor: pointer;
}

.zt-control-row input[type="checkbox"] {
    accent-color: #7aa2f7;
    cursor: pointer;
}

.zt-value { color: #7aa2f7; font-size: 11px; min-width: 1.2em; }

.zt-btn {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    padding: 4px 10px;
    background: #1e2a3a;
    color: #7aa2f7;
    border: 1px solid #3b4261;
    border-radius: 4px;
    cursor: pointer;
}

.zt-btn:hover { background: #252f3f; border-color: #7aa2f7; }
.zt-btn.danger { color: #f7768e; border-color: #f7768e; }
.zt-btn.danger:hover { background: #2a1a1e; }

.zt-preset-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.zt-preset-wrap label { margin-right: 4px; }

.zt-preset-wrap select {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    padding: 4px 8px;
    background: #1e2a3a;
    color: #7aa2f7;
    border: 1px solid #3b4261;
    border-radius: 4px;
    min-width: 140px;
    cursor: pointer;
}

.zt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 12px;
    margin-bottom: 12px;
}

.zt-panel-z {
    grid-column: 1;
    grid-row: 1;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px;
}

.zt-panel-z.unstable {
    border-color: #f7768e;
    box-shadow: 0 0 8px rgba(247, 118, 142, 0.3);
}

.zt-panel-freq {
    grid-column: 2;
    grid-row: 1;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px;
}

.zt-panel-time {
    grid-column: 1 / -1;
    grid-row: 2;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px;
}

.zt-panel-3d {
    grid-column: 1;
    grid-row: 3;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px;
}

.zt-panel-3d-proj {
    grid-column: 2;
    grid-row: 3;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px;
}

.zt-chart-unitproj-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: #0d1117;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#ztUnitProjWrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#ztChartUnitProj {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: none;
}

.zt-unitproj-overlay {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    pointer-events: none;
}

.zt-unitproj-overlay .zt-range-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: rgba(17, 17, 17, 0.85);
    color: #7aa2f7;
    border: 1px solid #3b4261;
    border-radius: 3px;
    cursor: pointer;
}

.zt-unitproj-overlay .zt-range-icon { display: block; }

.zt-unitproj-overlay .zt-range-btn:hover {
    background: rgba(30, 42, 58, 0.9);
    border-color: #7aa2f7;
}

.zt-unitproj-overlay .zt-range-btn.active {
    background: rgba(122, 162, 247, 0.25);
    border-color: #7aa2f7;
}

.zt-panel-title {
    font-size: 11px;
    color: #7aa2f7;
    margin-bottom: 6px;
}

.zt-unstable-label {
    color: #f7768e;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
}

.zt-zplane-wrap {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.zt-zplane-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #0d1117;
    border-radius: 4px;
}

.zt-chart-wrap {
    position: relative;
    width: 100%;
    height: 160px;
}

.zt-chart-wrap canvas { max-height: 160px; }

.zt-chart-time { height: 140px; }
.zt-chart-time canvas { max-height: 140px; }

.zt-chart-3d {
    position: relative;
    width: 100%;
    height: 400px;
    background: #0d1117;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#zt3dWrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#ztChart3D {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: none;
    cursor: grab;
}

#ztChart3D:active { cursor: grabbing; }

.zt-3d-rot-overlay {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 10;
    pointer-events: none;
}

.zt-3d-rot-overlay .zt-rot-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: rgba(17, 17, 17, 0.85);
    color: #7aa2f7;
    border: 1px solid #3b4261;
    border-radius: 3px;
    cursor: pointer;
}

.zt-3d-rot-overlay .zt-rot-btn:hover {
    background: rgba(30, 42, 58, 0.9);
    border-color: #7aa2f7;
}

.zt-3d-rot-overlay .zt-rot-icon { display: block; }

.zt-3d-cam-overlay {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    pointer-events: none;
}

.zt-cam-btn { pointer-events: auto; }

.zt-3d-cam-overlay .zt-cam-btn {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(17, 17, 17, 0.85);
    color: #7aa2f7;
    border: 1px solid #3b4261;
    border-radius: 3px;
    cursor: pointer;
}

.zt-3d-cam-overlay .zt-cam-btn:hover {
    background: rgba(30, 42, 58, 0.9);
    border-color: #7aa2f7;
}

.zt-status { font-size: 11px; color: #9ece6a; margin-top: 4px; }
.zt-status.unstable { color: #f7768e; }
