/* --- Component Structural Styles --- */ mc-world, mc-timeline, mc-camera, mc-frame { display: none; } mc-diorama { display: block; position: relative; width: 100%; height: 20em; & canvas { display: block; width: 100%; height: 100%; } } .spacetime-overlay { position: absolute; inset: 0; /* Replaces top, left, width, height */ padding: 5px; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; box-sizing: border-box; z-index: 10; font-family: sans-serif; /* Core icon engine rules */ & .icon { display: inline-block; width: 1.2em; height: 1.2em; background-color: currentColor; /* Inherits text color (white, or hover states) */ mask-repeat: no-repeat; mask-position: center; mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain; /* Map classes to your local SVG paths */ &.ico-play { mask-image: url('ico-play.svg'); -webkit-mask-image: url('ico-play.svg'); } &.ico-pause { mask-image: url('ico-pause.svg'); -webkit-mask-image: url('ico-pause.svg'); } &.ico-auto-events { mask-image: url('ico-auto-events.svg'); -webkit-mask-image: url('ico-auto-events.svg'); } &.ico-prev { mask-image: url('ico-prev.svg'); -webkit-mask-image: url('ico-prev.svg'); } &.ico-next { mask-image: url('ico-next.svg'); -webkit-mask-image: url('ico-next.svg'); } &.ico-prev-event { mask-image: url('ico-prev-event.svg'); -webkit-mask-image: url('ico-prev-event.svg'); } &.ico-next-event { mask-image: url('ico-next-event.svg'); -webkit-mask-image: url('ico-next-event.svg'); } &.ico-reset { mask-image: url('ico-reset.svg'); -webkit-mask-image: url('ico-reset.svg'); } /* Spatial indicators (mapped for future integration if desired) */ &.ico-rotate { mask-image: url('ico-rotate.svg'); -webkit-mask-image: url('ico-rotate.svg'); } &.ico-pan { mask-image: url('ico-pan.svg'); -webkit-mask-image: url('ico-pan.svg'); } &.ico-zoom { mask-image: url('ico-zoom.svg'); -webkit-mask-image: url('ico-zoom.svg'); } } /* Define the safe zones for the top cluster */ & .top-row { display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; } /* Spatial Tool Hints */ & .spacetime-indicator { display: flex; gap: 4px; /* Mimic the .btn box model so baselines perfectly align with the Play button */ padding: 4px 8px; border: 1px solid transparent; color: rgba(255, 255, 255, 0.4); font-family: monospace; font-size: 14px; opacity: 1; transition: opacity 0.2s ease; pointer-events: auto; } /* Unified Button Design Language */ & .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; /* Spacing between icon and text for the reset button */ } & .btn { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: white; padding: 4px 8px; border-radius: 4px; cursor: pointer; text-align: center; font-weight: bold; font-family: inherit; backdrop-filter: blur(4px); pointer-events: auto; &:hover { background: rgba(255, 255, 255, 0.2); } } & .top-row .btn { background: rgba(0, 0, 0, 0.6); visibility: hidden; &:hover { background: rgba(0, 0, 0, 0.8); } } /* Bottom: Timeline Panel Context */ & .visualizer-ui { pointer-events: none; background: transparent; margin: -5px; padding: 5px; display: flex; flex-direction: column; gap: 4px; color: white; user-select: none; border: 1px solid transparent; transition: all 0.2s ease; & .scrubber-row { display: flex; gap: 4px; align-items: center; } & .track-container { flex-grow: 1; height: 24px; padding: 0 8px; /* Safe zone so the rounded handle doesn't bleed out */ cursor: pointer; display: flex; align-items: center; & .track-inner { position: relative; width: 100%; height: 8px; /* Defines the actual track geometry */ background: rgba(255, 255, 255, 0.2); pointer-events: none; & .track-fill { position: absolute; left: 0; top: 0; bottom: 0; /* Snaps tightly to inner geometry */ background: #f00; } & .track-handle { position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; box-shadow: 0 0 4px rgba(0, 0, 0, 0.5); } & .marker { position: absolute; top: 0; bottom: 0; /* Matches track height */ transform: translateX(-50%); pointer-events: none; z-index: 1; &.marker-event { width: 2px; background: rgba(255, 255, 255, 0.5); } &.marker-label { width: 4px; background: gold; z-index: 2; } } } } } } /* --- Hover Visibility Logic --- */ .spacetime-hover-reveal { opacity: 0; pointer-events: none; transition: opacity 0.2s ease; } .spacetime-container:hover { & .spacetime-hover-reveal { opacity: 1; pointer-events: auto; } & .visualizer-ui { pointer-events: auto; } }