- Refactored simulate.js to properly use existing HTML structure from simulator.html - Added ghost wireframe node visualization using THREE.OctahedronGeometry with wireframe material - Implemented dashed links between virtual nodes using THREE.LineDashedMaterial - Added CSS for selected state highlighting and proper panel positioning - Reused TransformControls from 3D editor for node placement - Virtual nodes appear as teal-colored wireframe octahedrons - Links between virtual nodes render as teal dashed lines - GDOP overlay updates in real-time as nodes are dragged Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
728 lines
15 KiB
CSS
728 lines
15 KiB
CSS
/**
|
|
* Spaxel Dashboard - Pre-Deployment Simulator Styles
|
|
*
|
|
* Styling for the pre-deployment simulator interface.
|
|
*/
|
|
|
|
/* ============================================
|
|
Simulator Container
|
|
============================================ */
|
|
#simulator-container {
|
|
position: relative;
|
|
width: 100%;
|
|
height: calc(100vh - 44px); /* Below header */
|
|
}
|
|
|
|
.simulator-scene {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.gdop-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events: none;
|
|
z-index: 10;
|
|
}
|
|
|
|
/* ============================================
|
|
Simulator Panels
|
|
============================================ */
|
|
.sim-panel {
|
|
position: absolute;
|
|
width: 320px;
|
|
max-height: calc(100vh - 100px);
|
|
background: var(--bg-page);
|
|
border: 1px solid var(--slate-6);
|
|
border-radius: var(--radius-lg);
|
|
padding: var(--space-4);
|
|
overflow-y: auto;
|
|
z-index: 50;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.sim-panel h3 {
|
|
margin: 0 0 var(--space-3) 0;
|
|
font-size: var(--text-base);
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.sim-panel--controls {
|
|
top: var(--space-4);
|
|
left: var(--space-4);
|
|
}
|
|
|
|
.sim-panel--space {
|
|
top: var(--space-4);
|
|
right: var(--space-4);
|
|
}
|
|
|
|
.sim-panel--nodes {
|
|
bottom: var(--space-4);
|
|
left: var(--space-4);
|
|
max-height: 250px;
|
|
}
|
|
|
|
.sim-panel--results {
|
|
bottom: var(--space-4);
|
|
right: var(--space-4);
|
|
max-height: 200px;
|
|
}
|
|
|
|
/* ============================================
|
|
Space Form
|
|
============================================ */
|
|
.sim-space__form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.sim-space__row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.sim-space__row label {
|
|
font-size: var(--text-sm);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.sim-space__row input[type="number"] {
|
|
width: 70px;
|
|
padding: var(--space-1) var(--space-2);
|
|
background: var(--bg-hover);
|
|
border: 1px solid var(--slate-6);
|
|
border-radius: var(--radius-control);
|
|
color: var(--text-on-accent);
|
|
font-size: var(--text-sm);
|
|
}
|
|
|
|
/* ============================================
|
|
Node List
|
|
============================================ */
|
|
.sim-nodes__list {
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
|
|
.sim-nodes__add {
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
|
|
.sim-nodes__suggestions {
|
|
margin-top: var(--space-3);
|
|
padding: var(--space-2);
|
|
background: var(--bg-hover);
|
|
border-radius: var(--radius-control);
|
|
font-size: var(--text-sm);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* ============================================
|
|
Results Metrics
|
|
============================================ */
|
|
.sim-results__metrics {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-2);
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
|
|
.sim-metric {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: var(--space-2);
|
|
background: var(--bg-hover);
|
|
border-radius: var(--radius-control);
|
|
}
|
|
|
|
.sim-metric__label {
|
|
font-size: var(--text-sm);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.sim-metric__value {
|
|
font-size: var(--text-sm);
|
|
color: var(--text-primary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.simulator-panel::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.simulator-panel::-webkit-scrollbar-track {
|
|
background: var(--bg-page);
|
|
}
|
|
|
|
.simulator-panel::-webkit-scrollbar-thumb {
|
|
background: var(--slate-6);
|
|
border-radius: var(--radius-control);
|
|
}
|
|
|
|
.simulator-panel::-webkit-scrollbar-thumb:hover {
|
|
background: var(--slate-7);
|
|
}
|
|
|
|
/* ============================================
|
|
Simulator Header
|
|
============================================ */
|
|
.simulator-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: var(--space-4);
|
|
border-bottom: 1px solid var(--slate-5);
|
|
background: var(--bg-page);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
}
|
|
|
|
.simulator-header h2 {
|
|
margin: 0;
|
|
font-size: var(--text-xl);
|
|
font-weight: 600;
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.sim-close-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
padding: var(--space-1);
|
|
border-radius: var(--radius-control);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background 0.2s, color 0.2s;
|
|
}
|
|
|
|
.sim-close-btn:hover {
|
|
background: var(--slate-5);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
/* ============================================
|
|
Simulator Sections
|
|
============================================ */
|
|
.sim-section {
|
|
padding: var(--space-4);
|
|
border-bottom: 1px solid var(--bg-hover);
|
|
}
|
|
|
|
.sim-section:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.sim-section h3 {
|
|
margin: var(--space-3);
|
|
font-size: var(--text-sm);
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
/* ============================================
|
|
Space Controls
|
|
============================================ */
|
|
.sim-space-controls {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-2);
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
|
|
.sim-space-controls label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-1);
|
|
font-size: var(--text-sm);
|
|
color: var(--slate-11);
|
|
}
|
|
|
|
.sim-space-controls input[type="number"] {
|
|
width: 60px;
|
|
padding: var(--space-1) var(--space-2);
|
|
background: var(--bg-hover);
|
|
border: 1px solid var(--slate-6);
|
|
border-radius: var(--radius-control);
|
|
color: var(--text-on-accent);
|
|
font-size: var(--text-sm);
|
|
}
|
|
|
|
.sim-space-controls input[type="number"]:focus {
|
|
outline: none;
|
|
border-color: var(--blue-9);
|
|
}
|
|
|
|
/* ============================================
|
|
Tool Buttons
|
|
============================================ */
|
|
.sim-tools {
|
|
display: flex;
|
|
gap: var(--space-1);
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
|
|
.sim-tool-btn {
|
|
background: var(--bg-hover);
|
|
border: 1px solid var(--slate-6);
|
|
border-radius: var(--radius-control);
|
|
padding: var(--space-2);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background 0.2s, border-color 0.2s;
|
|
}
|
|
|
|
.sim-tool-btn:hover {
|
|
background: var(--slate-5);
|
|
border-color: var(--slate-7);
|
|
}
|
|
|
|
.sim-tool-btn.active {
|
|
background: var(--blue-9);
|
|
border-color: var(--blue-9);
|
|
}
|
|
|
|
.sim-tool-btn.active svg {
|
|
stroke: var(--text-on-accent);
|
|
}
|
|
|
|
.sim-tool-btn svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
stroke: var(--text-muted);
|
|
}
|
|
|
|
/* ============================================
|
|
Buttons
|
|
============================================ */
|
|
.sim-btn {
|
|
padding: var(--space-2) var(--space-3);
|
|
background: var(--bg-hover);
|
|
border: 1px solid var(--slate-6);
|
|
border-radius: var(--radius-control);
|
|
color: var(--slate-11);
|
|
font-size: var(--text-sm);
|
|
cursor: pointer;
|
|
transition: background 0.2s, border-color 0.2s, color 0.2s;
|
|
}
|
|
|
|
.sim-btn:hover {
|
|
background: var(--slate-5);
|
|
border-color: var(--slate-7);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.sim-btn-primary {
|
|
background: var(--blue-9);
|
|
border-color: var(--blue-9);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.sim-btn-primary:hover {
|
|
background: var(--blue-8);
|
|
border-color: var(--blue-8);
|
|
}
|
|
|
|
.sim-btn-danger {
|
|
background: var(--alert);
|
|
border-color: var(--alert);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.sim-btn-danger:hover {
|
|
background: var(--alert);
|
|
border-color: var(--alert);
|
|
}
|
|
|
|
.sim-btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.sim-btn:disabled:hover {
|
|
background: var(--bg-hover);
|
|
border-color: var(--slate-6);
|
|
}
|
|
|
|
/* ============================================
|
|
Item Lists (Nodes/Walkers)
|
|
============================================ */
|
|
.sim-items-list {
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
margin-top: var(--space-3);
|
|
}
|
|
|
|
.sim-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--space-2);
|
|
background: var(--bg-hover);
|
|
border-radius: var(--radius-control);
|
|
margin-bottom: var(--space-1);
|
|
}
|
|
|
|
.sim-item-name {
|
|
font-size: var(--text-sm);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.sim-item-position {
|
|
font-size: var(--text-2xs);
|
|
color: var(--text-muted);
|
|
margin-left: var(--space-2);
|
|
}
|
|
|
|
.sim-item-delete {
|
|
background: none;
|
|
border: none;
|
|
color: var(--alert);
|
|
font-size: var(--text-2xs);
|
|
cursor: pointer;
|
|
padding: var(--space-1) var(--space-2);
|
|
border-radius: var(--radius-control);
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.sim-item-delete:hover {
|
|
background: var(--alert-bg);
|
|
}
|
|
|
|
.sim-item.selected {
|
|
background: var(--blue-9);
|
|
border-color: var(--blue-9);
|
|
}
|
|
|
|
.sim-item.selected .sim-item-name {
|
|
color: var(--text-on-accent);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.sim-item.selected .sim-item-position {
|
|
color: var(--text-on-accent);
|
|
opacity: 0.8;
|
|
}
|
|
|
|
/* ============================================
|
|
Walker Controls
|
|
============================================ */
|
|
.sim-walker-controls {
|
|
display: flex;
|
|
gap: var(--space-2);
|
|
align-items: center;
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
|
|
.sim-walker-controls select {
|
|
flex: 1;
|
|
padding: 6px var(--space-2);
|
|
background: var(--bg-hover);
|
|
border: 1px solid var(--slate-6);
|
|
border-radius: var(--radius-control);
|
|
color: var(--text-on-accent);
|
|
font-size: var(--text-sm);
|
|
}
|
|
|
|
/* ============================================
|
|
GDOP Legend
|
|
============================================ */
|
|
.sim-gdop-legend {
|
|
margin-top: var(--space-3);
|
|
padding: var(--space-3);
|
|
background: var(--bg-hover);
|
|
border-radius: var(--radius-control);
|
|
}
|
|
|
|
.gdop-legend-item {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: var(--space-150);
|
|
}
|
|
|
|
.gdop-legend-item:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.gdop-legend-color {
|
|
width: 24px;
|
|
height: 12px;
|
|
border-radius: var(--radius-control);
|
|
margin-right: var(--space-2);
|
|
}
|
|
|
|
.gdop-legend-item[data-quality="excellent"] .gdop-legend-color { background: var(--ok); }
|
|
.gdop-legend-item[data-quality="good"] .gdop-legend-color { background: var(--warn); }
|
|
.gdop-legend-item[data-quality="fair"] .gdop-legend-color { background: var(--orange); }
|
|
.gdop-legend-item[data-quality="poor"] .gdop-legend-color { background: var(--alert); }
|
|
.gdop-legend-item[data-quality="none"] .gdop-legend-color { background: var(--slate-7); }
|
|
|
|
.gdop-legend-label {
|
|
font-size: var(--text-xs);
|
|
color: var(--slate-11);
|
|
}
|
|
|
|
.gdop-stats {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-3);
|
|
margin-top: var(--space-3);
|
|
padding-top: var(--space-3);
|
|
border-top: 1px solid var(--slate-6);
|
|
}
|
|
|
|
.gdop-stat-item {
|
|
font-size: var(--text-xs);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.gdop-stat-item strong {
|
|
color: var(--text-on-accent);
|
|
margin-left: var(--space-1);
|
|
}
|
|
|
|
/* ============================================
|
|
Simulation Controls
|
|
============================================ */
|
|
.sim-controls {
|
|
display: flex;
|
|
gap: var(--space-2);
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
|
|
.sim-controls button {
|
|
flex: 1;
|
|
}
|
|
|
|
/* ============================================
|
|
Progress Bar
|
|
============================================ */
|
|
.sim-progress {
|
|
margin-top: var(--space-3);
|
|
}
|
|
|
|
.sim-progress #sim-time {
|
|
font-size: var(--text-xs);
|
|
color: var(--text-muted);
|
|
margin-bottom: var(--space-1);
|
|
display: block;
|
|
}
|
|
|
|
.sim-progress-bar {
|
|
width: 100%;
|
|
height: 6px;
|
|
background: var(--bg-hover);
|
|
border-radius: var(--radius-control);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sim-progress-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, var(--blue-9), var(--blue-9));
|
|
transition: width 0.1s linear;
|
|
}
|
|
|
|
/* ============================================
|
|
Results Section
|
|
============================================ */
|
|
.sim-results {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.sim-result-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: var(--space-2);
|
|
background: var(--bg-hover);
|
|
border-radius: var(--radius-control);
|
|
}
|
|
|
|
.sim-result-label {
|
|
font-size: var(--text-sm);
|
|
color: var(--slate-11);
|
|
}
|
|
|
|
.sim-result-value {
|
|
font-size: var(--text-sm);
|
|
color: var(--text-on-accent);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* ============================================
|
|
Recommendations
|
|
============================================ */
|
|
.sim-recommendations {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.sim-recommendation {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: var(--space-2);
|
|
padding: var(--space-250);
|
|
background: var(--bg-hover);
|
|
border-radius: var(--radius-control);
|
|
border-left: 3px solid var(--slate-7);
|
|
}
|
|
|
|
.sim-rec-priority.high {
|
|
border-left-color: var(--alert);
|
|
}
|
|
|
|
.sim-rec-priority.medium {
|
|
border-left-color: var(--warn);
|
|
}
|
|
|
|
.sim-rec-priority.low {
|
|
border-left-color: var(--ok);
|
|
}
|
|
|
|
.sim-rec-text {
|
|
font-size: var(--text-sm);
|
|
color: var(--slate-11);
|
|
flex: 1;
|
|
}
|
|
|
|
/* ============================================
|
|
Shopping List
|
|
============================================ */
|
|
.sim-shopping-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-150);
|
|
}
|
|
|
|
.sim-shopping-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: var(--space-2);
|
|
background: var(--bg-hover);
|
|
border-radius: var(--radius-control);
|
|
}
|
|
|
|
.sim-shopping-item span {
|
|
font-size: var(--text-sm);
|
|
color: var(--slate-11);
|
|
}
|
|
|
|
.sim-shopping-item strong {
|
|
color: var(--blue-9);
|
|
}
|
|
|
|
/* ============================================
|
|
Empty State
|
|
============================================ */
|
|
.sim-empty-state {
|
|
text-align: center;
|
|
padding: var(--space-8) var(--space-4);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.sim-empty-state svg {
|
|
width: 48px;
|
|
height: 48px;
|
|
margin-bottom: var(--space-3);
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.sim-empty-state p {
|
|
font-size: var(--text-sm);
|
|
margin: 0;
|
|
}
|
|
|
|
/* ============================================
|
|
Responsive Design
|
|
============================================ */
|
|
@media (max-width: 768px) {
|
|
.simulator-panel {
|
|
width: 100%;
|
|
max-height: 50vh;
|
|
}
|
|
|
|
.sim-space-controls {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.sim-space-controls label {
|
|
width: 100%;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.sim-space-controls input[type="number"] {
|
|
width: 70px;
|
|
}
|
|
|
|
.sim-controls {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.sim-controls button {
|
|
min-width: calc(50% - 4px);
|
|
}
|
|
}
|
|
|
|
/* ============================================
|
|
Animations
|
|
============================================ */
|
|
@keyframes pulse {
|
|
0%, 100% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
|
|
.sim-progress-fill.running {
|
|
animation: pulse 1s ease-in-out infinite;
|
|
}
|
|
|
|
/* ============================================
|
|
Loading State
|
|
============================================ */
|
|
.sim-loading {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--space-8);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.sim-loading::after {
|
|
content: "";
|
|
width: 16px;
|
|
height: 16px;
|
|
margin-left: var(--space-2);
|
|
border: 2px solid var(--blue-9);
|
|
border-top-color: transparent;
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|