- Fix auto-dim timeout from 60 seconds to 30 minutes (30 * 60 * 1000ms) - Add auth.js dependency to ambient.html for proper authentication - Rewrite ambient.test.js to remove problematic require() statements - Update ambient.js with proper time-of-day handling - Enhance ambient.css with time-of-day palette themes Ambient mode provides a simplified, always-on display for wall-mounted tablets with Canvas 2D rendering, time-of-day awareness, auto-dim after 30min of no presence, alert mode with pulsing red border, and morning briefing integration. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
589 lines
13 KiB
CSS
589 lines
13 KiB
CSS
/**
|
|
* Spaxel Dashboard - Ambient Mode Styles
|
|
*
|
|
* Simplified, always-on display mode for wall-mounted tablets.
|
|
* Time-of-day aware palettes, auto-dim, and calm visualization.
|
|
*/
|
|
|
|
/* ===== Ambient Mode Layout ===== */
|
|
.ambient-mode {
|
|
--ambient-bg-morning: var(--slate-2);
|
|
--ambient-bg-day: var(--slate-2);
|
|
--ambient-bg-evening: var(--slate-3);
|
|
--ambient-bg-night: var(--slate-1);
|
|
|
|
--ambient-text-morning: var(--text-primary);
|
|
--ambient-text-day: var(--text-primary);
|
|
--ambient-text-evening: var(--text-primary);
|
|
--ambient-text-night: var(--text-secondary);
|
|
|
|
--ambient-accent-morning: var(--blue-9);
|
|
--ambient-accent-day: var(--blue-9);
|
|
--ambient-accent-evening: var(--warn);
|
|
--ambient-accent-night: var(--slate-5);
|
|
|
|
--ambient-person-bg-morning: var(--blue-muted);
|
|
--ambient-person-bg-day: var(--blue-muted);
|
|
--ambient-person-bg-evening: var(--warn-muted);
|
|
--ambient-person-bg-night: var(--blue-muted);
|
|
}
|
|
|
|
body.ambient-mode {
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
font-family: var(--font-body);
|
|
background: var(--ambient-bg-day);
|
|
color: var(--ambient-text-day);
|
|
/* Smooth transition for time-of-day changes */
|
|
transition: background 2s ease-in-out, color 2s ease-in-out;
|
|
}
|
|
|
|
/* Hide all non-ambient elements */
|
|
.ambient-mode #status-bar,
|
|
.ambient-mode #scene-container,
|
|
.ambient-mode #node-panel,
|
|
.ambient-mode #chart-panel,
|
|
.ambient-mode #presence-panel,
|
|
.ambient-mode #room-editor-panel,
|
|
.ambient-mode #gdop-legend,
|
|
.ambient-mode #timeline-view,
|
|
.ambient-mode .simulator-panel {
|
|
display: none !important;
|
|
}
|
|
|
|
/* ===== Ambient Container ===== */
|
|
.ambient-container {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--space-5);
|
|
transition: opacity 2s ease;
|
|
}
|
|
|
|
.ambient-container.dimmed {
|
|
opacity: 0.1;
|
|
}
|
|
|
|
.ambient-container.alert-active {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* ===== Ambient Floor Plan ===== */
|
|
.ambient-floorplan {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100%;
|
|
max-width: 1200px;
|
|
max-height: 800px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.ambient-canvas {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius-modal);
|
|
box-shadow: var(--shadow);
|
|
display: block;
|
|
/* Fix iOS Safari passive event listener warnings */
|
|
touch-action: none;
|
|
}
|
|
|
|
/* ===== Ambient Status Line ===== */
|
|
.ambient-status {
|
|
position: fixed;
|
|
bottom: var(--space-5);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-6);
|
|
font-size: var(--text-sm);
|
|
color: var(--ambient-text-day);
|
|
opacity: 0.7;
|
|
transition: color 1s ease, opacity 0.5s ease;
|
|
}
|
|
|
|
.ambient-status-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-150);
|
|
}
|
|
|
|
.ambient-status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--ambient-accent-day);
|
|
}
|
|
|
|
.ambient-status-dot.online {
|
|
background: var(--ok);
|
|
box-shadow: 0 0 8px var(--ok);
|
|
}
|
|
|
|
.ambient-status-dot.alert {
|
|
background: var(--alert);
|
|
box-shadow: 0 0 8px var(--alert);
|
|
animation: pulse-dot 1s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes pulse-dot {
|
|
0%, 100% {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
50% {
|
|
opacity: 0.6;
|
|
transform: scale(1.2);
|
|
}
|
|
}
|
|
|
|
/* ===== Time of Day Themes ===== */
|
|
|
|
/* Morning (6-10am): bright, cool - cheerful start */
|
|
.ambient-mode.time-morning {
|
|
background: #e0f2fe; /* Light sky blue */
|
|
color: #0c4a6e;
|
|
}
|
|
|
|
.ambient-mode.time-morning .ambient-status {
|
|
color: #0c4a6e;
|
|
}
|
|
|
|
.ambient-mode.time-morning .ambient-person {
|
|
background: #7dd3fc; /* Light blue */
|
|
color: #0284c7;
|
|
}
|
|
|
|
.ambient-mode.time-morning .ambient-canvas {
|
|
box-shadow: 0 4px 20px rgba(14, 165, 233, 0.2);
|
|
}
|
|
|
|
/* Day (10am-6pm): neutral, clean */
|
|
.ambient-mode.time-day {
|
|
background: #ffffff;
|
|
color: #1d1d1f;
|
|
}
|
|
|
|
.ambient-mode.time-day .ambient-status {
|
|
color: #1d1d1f;
|
|
}
|
|
|
|
.ambient-mode.time-day .ambient-person {
|
|
background: #3b82f6; /* Blue */
|
|
color: #1e40af;
|
|
}
|
|
|
|
.ambient-mode.time-day .ambient-canvas {
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
/* Evening (6-10pm): warm amber tones - relaxing */
|
|
.ambient-mode.time-evening {
|
|
background: #1c1507; /* Dark warm brown */
|
|
color: #fef3e7;
|
|
}
|
|
|
|
.ambient-mode.time-evening .ambient-status {
|
|
color: #fef3e7;
|
|
}
|
|
|
|
.ambient-mode.time-evening .ambient-person {
|
|
background: #f59e0b; /* Amber */
|
|
color: #78350f;
|
|
}
|
|
|
|
.ambient-mode.time-evening .ambient-canvas {
|
|
box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
|
|
}
|
|
|
|
/* Night (10pm-6am): very dim, minimal - OLED-safe */
|
|
.ambient-mode.time-night {
|
|
background: #000000; /* Pure black for OLED */
|
|
color: #6b7280; /* Dim gray */
|
|
}
|
|
|
|
.ambient-mode.time-night .ambient-status {
|
|
color: #6b7280;
|
|
opacity: 0.4;
|
|
}
|
|
|
|
.ambient-mode.time-night .ambient-person {
|
|
background: #4b5563; /* Dim gray */
|
|
color: #9ca3af;
|
|
}
|
|
|
|
.ambient-mode.time-night .ambient-canvas {
|
|
box-shadow: none;
|
|
}
|
|
|
|
/* ===== Ambient Person Indicators ===== */
|
|
.ambient-person {
|
|
position: absolute;
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: var(--text-sm);
|
|
font-weight: 600;
|
|
color: var(--text-on-accent);
|
|
transition: all 0.5s ease;
|
|
box-shadow: 0 2px 8px var(--shadow);
|
|
}
|
|
|
|
.ambient-person::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -4px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 20px;
|
|
height: 3px;
|
|
background: currentColor;
|
|
border-radius: var(--radius-control);
|
|
opacity: 0.5;
|
|
}
|
|
|
|
/* Person colors - consistent per person */
|
|
.ambient-person[data-person-index="0"] { background: var(--alert); }
|
|
.ambient-person[data-person-index="1"] { background: var(--blue-9); }
|
|
.ambient-person[data-person-index="2"] { background: var(--ok); }
|
|
.ambient-person[data-person-index="3"] { background: var(--warn); }
|
|
.ambient-person[data-person-index="4"] { background: var(--blue-9); }
|
|
.ambient-person[data-person-index="5"] { background: var(--ok); }
|
|
.ambient-person[data-person-index="6"] { background: var(--warn); }
|
|
.ambient-person[data-person-index="7"] { background: var(--slate-6); }
|
|
|
|
/* Unknown person */
|
|
.ambient-person.unknown {
|
|
background: var(--slate-10);
|
|
}
|
|
|
|
/* ===== Ambient Zone Labels ===== */
|
|
.ambient-zone-label {
|
|
position: absolute;
|
|
padding: 6px var(--space-3);
|
|
background: var(--slate-4);
|
|
border-radius: var(--radius-card);
|
|
font-size: var(--text-sm);
|
|
font-weight: 500;
|
|
color: var(--text-primary);
|
|
box-shadow: 0 2px 8px var(--shadow);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.ambient-zone-label.occupied {
|
|
background: var(--ok);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.ambient-zone-label.empty {
|
|
background: var(--slate-10);
|
|
color: var(--slate-7);
|
|
}
|
|
|
|
.ambient-zone-label .zone-name {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.ambient-zone-label .zone-count {
|
|
font-size: var(--text-2xs);
|
|
opacity: 0.8;
|
|
margin-left: var(--space-1);
|
|
}
|
|
|
|
/* ===== Ambient Alert Mode ===== */
|
|
.ambient-alert {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: var(--alert);
|
|
z-index: 100;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--space-10);
|
|
animation: alert-fade-in 0.5s ease-out;
|
|
/* Pulsing red border effect */
|
|
border: 8px solid #dc2626;
|
|
animation: alert-fade-in 0.5s ease-out, alert-pulse-border 1s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes alert-fade-in {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes alert-pulse-border {
|
|
0%, 100% {
|
|
border-color: #dc2626;
|
|
box-shadow: inset 0 0 20px rgba(220, 38, 38, 0.5);
|
|
}
|
|
50% {
|
|
border-color: #ef4444;
|
|
box-shadow: inset 0 0 40px rgba(239, 68, 68, 0.8);
|
|
}
|
|
}
|
|
|
|
.ambient-alert.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.ambient-alert-icon {
|
|
font-size: var(--text-6xl);
|
|
margin-bottom: var(--space-5);
|
|
animation: alert-pulse 1.5s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes alert-pulse {
|
|
0%, 100% {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
transform: scale(1.1);
|
|
opacity: 0.8;
|
|
}
|
|
}
|
|
|
|
.ambient-alert-title {
|
|
font-size: var(--text-4xl);
|
|
font-weight: 700;
|
|
color: var(--text-on-accent);
|
|
margin-bottom: var(--space-3);
|
|
text-align: center;
|
|
}
|
|
|
|
.ambient-alert-message {
|
|
font-size: var(--text-xl);
|
|
color: var(--text-on-accent);
|
|
margin-bottom: var(--space-8);
|
|
text-align: center;
|
|
max-width: 500px;
|
|
}
|
|
|
|
.ambient-alert-actions {
|
|
display: flex;
|
|
gap: var(--space-4);
|
|
}
|
|
|
|
.ambient-alert-btn {
|
|
padding: var(--space-350) var(--space-7);
|
|
border-radius: var(--radius-card);
|
|
font-size: var(--text-base);
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
border: none;
|
|
transition: transform 0.1s;
|
|
}
|
|
|
|
.ambient-alert-btn:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.ambient-alert-btn.primary {
|
|
background: var(--text-on-accent);
|
|
color: var(--alert);
|
|
}
|
|
|
|
.ambient-alert-btn.secondary {
|
|
background: var(--border-strong);
|
|
color: var(--text-on-accent);
|
|
border: 1px solid var(--border-strong);
|
|
}
|
|
|
|
/* ===== Morning Briefing Overlay ===== */
|
|
.ambient-briefing {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(135deg, var(--blue-7), var(--blue-9));
|
|
z-index: 50;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--space-10);
|
|
color: var(--text-on-accent);
|
|
animation: briefing-fade-in 1s ease-out;
|
|
}
|
|
|
|
@keyframes briefing-fade-in {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.ambient-briefing.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.ambient-briefing-content {
|
|
max-width: 600px;
|
|
text-align: center;
|
|
}
|
|
|
|
.ambient-briefing-greeting {
|
|
font-size: var(--text-2xl);
|
|
font-weight: 600;
|
|
margin-bottom: var(--space-6);
|
|
}
|
|
|
|
.ambient-briefing-section {
|
|
background: var(--border-strong);
|
|
padding: var(--space-4) var(--space-5);
|
|
border-radius: var(--radius-card);
|
|
margin-bottom: var(--space-3);
|
|
text-align: left;
|
|
}
|
|
|
|
.ambient-briefing-section-label {
|
|
font-size: var(--text-2xs);
|
|
text-transform: uppercase;
|
|
letter-spacing: var(--ls-wide);
|
|
opacity: 0.7;
|
|
margin-bottom: var(--space-1);
|
|
}
|
|
|
|
.ambient-briefing-section-value {
|
|
font-size: var(--text-base);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.ambient-briefing-dismiss {
|
|
margin-top: var(--space-6);
|
|
background: var(--border-strong);
|
|
border: none;
|
|
color: var(--text-on-accent);
|
|
padding: var(--space-3) var(--space-6);
|
|
border-radius: var(--radius-card);
|
|
font-size: var(--text-sm);
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.ambient-briefing-dismiss:hover {
|
|
background: var(--border-strong);
|
|
}
|
|
|
|
/* ===== "All Secure" State ===== */
|
|
.ambient-secure {
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
text-align: center;
|
|
opacity: 0.3;
|
|
transition: opacity 1s ease;
|
|
}
|
|
|
|
.ambient-secure-icon {
|
|
font-size: var(--text-6xl);
|
|
margin-bottom: var(--space-4);
|
|
}
|
|
|
|
.ambient-secure-text {
|
|
font-size: var(--text-3xl);
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ===== Responsive Design ===== */
|
|
@media (max-width: 768px) {
|
|
.ambient-container {
|
|
padding: var(--space-250);
|
|
}
|
|
|
|
.ambient-person {
|
|
width: 32px;
|
|
height: 32px;
|
|
font-size: var(--text-xs);
|
|
}
|
|
|
|
.ambient-zone-label {
|
|
padding: var(--space-1) var(--space-2);
|
|
font-size: var(--text-2xs);
|
|
}
|
|
|
|
.ambient-alert-title {
|
|
font-size: var(--text-3xl);
|
|
}
|
|
|
|
.ambient-alert-message {
|
|
font-size: var(--text-base);
|
|
}
|
|
|
|
.ambient-alert-actions {
|
|
flex-direction: column;
|
|
width: 100%;
|
|
max-width: 300px;
|
|
}
|
|
|
|
.ambient-alert-btn {
|
|
width: 100%;
|
|
}
|
|
|
|
.ambient-briefing-greeting {
|
|
font-size: 22px;
|
|
}
|
|
|
|
.ambient-briefing-section {
|
|
padding: var(--space-3) var(--space-4);
|
|
}
|
|
}
|
|
|
|
/* ===== OLED-Safe Mode ===== */
|
|
.ambient-mode.time-night {
|
|
background: var(--slate-1);
|
|
color: var(--slate-5);
|
|
}
|
|
|
|
.ambient-mode.time-night .ambient-status {
|
|
opacity: 0.3;
|
|
}
|
|
|
|
/* ===== Accessibility ===== */
|
|
.ambient-mode *:focus-visible {
|
|
outline: 2px solid var(--ambient-accent-day);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* ===== Reduced Motion ===== */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.ambient-mode,
|
|
.ambient-person,
|
|
.ambient-zone-label,
|
|
.ambient-status,
|
|
.ambient-alert,
|
|
.ambient-briefing {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
|
|
.ambient-status-dot {
|
|
animation: none;
|
|
}
|
|
}
|