Add CSS environment variables for safe-area-inset to prevent content overlap with notch/home indicator on iOS devices. Changes: - expert.css: Add safe area support to body, scene container, and simple-quick-actions (hamburger menu) navigation - quick-actions.css: Add safe area support to context menu and follow-mode-indicator - panels.css: Add safe area support to toast-container - troubleshoot.css: Add safe area support to spaxel-dismiss-all The viewport-fit=cover meta tag was already present in index.html. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
306 lines
6.5 KiB
CSS
306 lines
6.5 KiB
CSS
/**
|
|
* Spaxel Dashboard - Spatial Quick Actions Styles
|
|
*
|
|
* Right-click (desktop) or long-press (mobile) context menus
|
|
* on 3D elements for context-sensitive actions.
|
|
*/
|
|
|
|
/* ===== Context Menu Container ===== */
|
|
.context-menu {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 1000;
|
|
display: none;
|
|
}
|
|
|
|
.context-menu.visible {
|
|
display: block;
|
|
}
|
|
|
|
.context-backdrop {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.4);
|
|
backdrop-filter: blur(2px);
|
|
-webkit-backdrop-filter: blur(2px);
|
|
animation: fadeIn 0.15s ease-out;
|
|
}
|
|
|
|
/* ===== Safe Area Insets for iOS ===== */
|
|
@supports (padding: max(0px)) {
|
|
.context-menu {
|
|
/* Respect safe area insets for notched devices */
|
|
padding-top: env(safe-area-inset-top);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
padding-left: env(safe-area-inset-left);
|
|
padding-right: env(safe-area-inset-right);
|
|
}
|
|
|
|
.follow-mode-indicator {
|
|
/* Adjust bottom position to account for safe area */
|
|
bottom: calc(80px + env(safe-area-inset-bottom));
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.follow-mode-indicator {
|
|
bottom: calc(100px + env(safe-area-inset-bottom));
|
|
}
|
|
}
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
/* ===== Context Container ===== */
|
|
.context-container {
|
|
position: absolute;
|
|
min-width: 280px;
|
|
max-width: 340px;
|
|
background: var(--context-bg, #1e1e1e);
|
|
border-radius: 12px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
|
|
border: 1px solid var(--context-border, rgba(255, 255, 255, 0.1));
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
animation: scaleIn 0.15s ease-out;
|
|
}
|
|
|
|
@keyframes scaleIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: scale(0.95);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
/* ===== Context Header ===== */
|
|
.context-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 14px 16px;
|
|
border-bottom: 1px solid var(--context-border, rgba(255, 255, 255, 0.1));
|
|
background: var(--context-header-bg, rgba(255, 255, 255, 0.03));
|
|
}
|
|
|
|
.context-icon {
|
|
font-size: 22px;
|
|
flex-shrink: 0;
|
|
width: 32px;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--context-icon-bg, rgba(79, 195, 247, 0.15));
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.context-title {
|
|
flex: 1;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: var(--context-text, #eee);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* ===== Context Body ===== */
|
|
.context-body {
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.context-body::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.context-body::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.context-body::-webkit-scrollbar-thumb {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.context-body::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
/* ===== Context Items ===== */
|
|
.context-item {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 12px;
|
|
padding: 12px 16px;
|
|
cursor: pointer;
|
|
transition: background 0.15s ease;
|
|
border-left: 3px solid transparent;
|
|
}
|
|
|
|
.context-item:hover {
|
|
background: var(--context-hover, rgba(255, 255, 255, 0.05));
|
|
}
|
|
|
|
.context-item:active {
|
|
background: var(--context-active, rgba(255, 255, 255, 0.08));
|
|
}
|
|
|
|
.item-icon {
|
|
font-size: 18px;
|
|
flex-shrink: 0;
|
|
width: 24px;
|
|
text-align: center;
|
|
padding-top: 2px;
|
|
}
|
|
|
|
.item-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.item-label {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: var(--context-text, #eee);
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.item-description {
|
|
font-size: 12px;
|
|
color: var(--context-description, #888);
|
|
line-height: 1.3;
|
|
}
|
|
|
|
/* ===== Target-Specific Styling ===== */
|
|
|
|
/* Blob/Person context */
|
|
.context-menu[data-target="blob"] .context-icon {
|
|
background: rgba(79, 195, 247, 0.15);
|
|
color: #4fc3f7;
|
|
}
|
|
|
|
/* Node context */
|
|
.context-menu[data-target="node"] .context-icon {
|
|
background: rgba(76, 175, 80, 0.15);
|
|
color: #4caf50;
|
|
}
|
|
|
|
/* Zone context */
|
|
.context-menu[data-target="zone"] .context-icon {
|
|
background: rgba(255, 152, 0, 0.15);
|
|
color: #ff9800;
|
|
}
|
|
|
|
/* Empty space context */
|
|
.context-menu[data-target="empty"] .context-icon {
|
|
background: rgba(158, 158, 158, 0.15);
|
|
color: #9e9e9e;
|
|
}
|
|
|
|
/* Portal context */
|
|
.context-menu[data-target="portal"] .context-icon {
|
|
background: rgba(156, 39, 176, 0.15);
|
|
color: #9c27b0;
|
|
}
|
|
|
|
/* Trigger context */
|
|
.context-menu[data-target="trigger"] .context-icon {
|
|
background: rgba(244, 67, 54, 0.15);
|
|
color: #f44336;
|
|
}
|
|
|
|
/* ===== Follow Mode Indicator ===== */
|
|
.follow-mode-indicator {
|
|
position: fixed;
|
|
bottom: 80px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: rgba(79, 195, 247, 0.9);
|
|
color: white;
|
|
padding: 10px 20px;
|
|
border-radius: 20px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
z-index: 999;
|
|
animation: slideUp 0.2s ease-out;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.follow-mode-indicator::before {
|
|
content: '🎯';
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translate(-50%, 20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translate(-50%, 0);
|
|
}
|
|
}
|
|
|
|
/* ===== Responsive Design ===== */
|
|
@media (max-width: 600px) {
|
|
.context-container {
|
|
min-width: 260px;
|
|
max-width: 90vw;
|
|
}
|
|
|
|
.context-item {
|
|
padding: 14px 16px;
|
|
}
|
|
|
|
.follow-mode-indicator {
|
|
bottom: 100px;
|
|
padding: 12px 24px;
|
|
font-size: 15px;
|
|
}
|
|
}
|
|
|
|
/* ===== Accessibility ===== */
|
|
.context-item:focus-visible {
|
|
outline: 2px solid var(--context-accent, #4fc3f7);
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
/* ===== Reduced Motion ===== */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.context-menu * {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
}
|
|
|
|
/* ===== Dark/Light Mode Support ===== */
|
|
@media (prefers-color-scheme: light) {
|
|
.context-menu {
|
|
--context-bg: #ffffff;
|
|
--context-text: #1d1d1f;
|
|
--context-border: rgba(0, 0, 0, 0.1);
|
|
--context-hover: rgba(0, 0, 0, 0.05);
|
|
--context-active: rgba(0, 0, 0, 0.08);
|
|
--context-description: #666;
|
|
--context-header-bg: rgba(0, 0, 0, 0.02);
|
|
}
|
|
}
|