Files
pi-multifx-pedal/ui/src/pedal/pedal.css
T
shawn 214f3c13d7 feat: Footswitch Modes — Stomp/Preset/Snapshot/Combo with scribble strips
Implements multi-mode footswitch system for the Helix Stadium-inspired pedal UI:

- Footswitch mode context provider with 4 modes: stomp, preset, snapshot, combo
- ModeSelector in status bar (collapsed cycling mode for mobile)
- Stomp mode: footswitches toggle individual blocks on/off, scribble strips show block name + status
- Preset mode: footswitches show Bank Up/Down + preset selection, scribble strips show preset name + number
- Snapshot mode: footswitches recall 8 snapshots, scribble strips show snapshot name
- Combo mode: first 4 stomp + bank nav + preset select + global bypass
- ScribbleStrip LCD component with LED indicator and double-tap support
- Double-tap gesture hook for secondary actions (tuner, snapshot save, etc.)
- FootswitchBar container with 8 capacitive-touch footswitch buttons and LED rings
- usePedalState hook (WebSocket + API polling, ported from frontend-react/App.jsx)
- Dark pedal theme CSS (Helix-inspired) with responsive mobile layout
- Full App.tsx rewrite with status bar, footswitch bar, tab bar, and all screens
2026-06-12 19:22:50 -04:00

448 lines
10 KiB
CSS

/* ══════════════════════════════════════════════════════════════
Pi Multi-FX Pedal — Styles
Dark pedal theme with Helix-inspired footswitch bar
══════════════════════════════════════════════════════════════ */
/* ── Design Tokens ─────────────────────────────────────────── */
:root {
--pedal-bg: #0A0A0C;
--pedal-panel: #141418;
--pedal-surface: #1C1C22;
--pedal-border: #2A2A32;
--pedal-border-light: #3A3A48;
--pedal-amber: #E8A030;
--pedal-amber-dim: #7A5218;
--pedal-blue: #3A7BA8;
--pedal-blue-dim: #1E4060;
--pedal-green: #3AB87A;
--pedal-green-dim: #1E6040;
--pedal-red: #C84040;
--pedal-red-dim: #602020;
--pedal-purple: #9B59B6;
--pedal-cyan: #1ABC9C;
--pedal-text: #F0EDE6;
--pedal-text-sec: #8888A0;
--pedal-text-dim: #444458;
--pedal-radius: 0.625rem;
--pedal-fs-height: 80px;
}
/* ── Status Bar ────────────────────────────────────────────── */
.pedal-statusbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 12px 4px;
background: var(--pedal-panel);
border-bottom: 1px solid var(--pedal-border);
flex-shrink: 0;
gap: 8px;
min-height: 32px;
}
.pedal-statusbar-left,
.pedal-statusbar-right {
display: flex;
align-items: center;
gap: 6px;
}
.pedal-statusbar-mid {
display: flex;
align-items: center;
gap: 4px;
flex: 1;
justify-content: center;
}
.pedal-brand {
font-family: 'JetBrains Mono', 'SF Mono', monospace;
font-size: 9px;
color: var(--pedal-text-sec);
letter-spacing: 0.08em;
text-transform: uppercase;
}
/* ── Mode Selector ─────────────────────────────────────────── */
.mode-selector {
display: flex;
gap: 2px;
background: var(--pedal-surface);
border-radius: 6px;
border: 1px solid var(--pedal-border);
overflow: hidden;
}
.mode-selector-collapsed {
display: flex;
align-items: center;
gap: 4px;
padding: 4px 8px;
cursor: pointer;
border-radius: 5px;
background: var(--pedal-surface);
border: 1px solid var(--pedal-border);
transition: background 0.15s;
}
.mode-selector-collapsed:hover {
background: var(--pedal-border);
}
.mode-btn {
flex: 1;
display: flex;
align-items: center;
gap: 3px;
padding: 5px 7px;
font-size: 10px;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
background: none;
border: none;
color: var(--pedal-text-dim);
cursor: pointer;
transition: all 0.12s;
white-space: nowrap;
}
.mode-btn:hover {
color: var(--pedal-text-sec);
}
.mode-btn-active {
background: var(--pedal-amber-dim);
color: var(--pedal-amber) !important;
}
.mode-btn-icon {
font-size: 11px;
}
.mode-icon {
font-size: 12px;
color: var(--pedal-amber);
}
.mode-label {
font-size: 10px;
color: var(--pedal-text-sec);
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
}
/* ── Badge chips in status bar ─────────────────────────────── */
.pedal-badge {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 1px 5px;
border-radius: 3px;
font-size: 8px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.pedal-badge-amber {
background: rgba(232, 160, 48, 0.2);
color: var(--pedal-amber);
}
.pedal-badge-green {
background: rgba(58, 184, 122, 0.2);
color: var(--pedal-green);
}
.pedal-badge-red {
background: rgba(200, 64, 64, 0.2);
color: var(--pedal-red);
}
.pedal-badge-blue {
background: rgba(58, 123, 168, 0.2);
color: var(--pedal-blue);
}
/* ── Status LED dot ────────────────────────────────────────── */
.pedal-led-dot {
width: 6px;
height: 6px;
border-radius: 50%;
flex-shrink: 0;
}
/* ── Footswitch Bar ────────────────────────────────────────── */
.footswitch-bar {
display: flex;
gap: 3px;
padding: 4px 6px 6px;
background: var(--pedal-panel);
border-top: 1px solid var(--pedal-border);
flex-shrink: 0;
justify-content: center;
}
.footswitch-slot {
display: flex;
flex-direction: column;
align-items: center;
gap: 3px;
flex: 1;
min-width: 0;
max-width: 56px;
}
/* ── Scribble Strip ────────────────────────────────────────── */
.scribble-strip {
display: flex;
flex-direction: column;
align-items: center;
gap: 1px;
width: 100%;
padding: 3px 2px;
background: #0D0D10;
border: 1px solid var(--pedal-border);
border-radius: 3px;
cursor: pointer;
transition: border-color 0.15s;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
.scribble-strip[data-active="true"] {
border-color: var(--scribble-color, var(--pedal-amber));
}
.scribble-strip[data-bypassed="true"] {
opacity: 0.5;
}
.scribble-led {
width: 4px;
height: 4px;
border-radius: 50%;
flex-shrink: 0;
transition: opacity 0.15s;
margin-bottom: 1px;
}
.scribble-label-wrap {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
min-height: 22px;
justify-content: center;
}
.scribble-label {
font-family: 'JetBrains Mono', 'SF Mono', monospace;
font-size: 8px;
font-weight: 600;
color: var(--pedal-text);
text-align: center;
line-height: 1.1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.scribble-sublabel {
font-family: 'JetBrains Mono', 'SF Mono', monospace;
font-size: 6.5px;
color: var(--scribble-color, var(--pedal-text-sec));
text-align: center;
line-height: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.scribble-icon {
font-size: 9px;
line-height: 1;
}
/* ── Footswitch Button ─────────────────────────────────────── */
.footswitch-btn {
position: relative;
width: 42px;
height: 42px;
cursor: pointer;
user-select: none;
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
transition: transform 0.08s;
}
.footswitch-btn:active {
transform: scale(0.93);
}
.footswitch-ring {
position: absolute;
inset: 0;
border-radius: 50%;
border: 2.5px solid var(--pedal-border);
background: radial-gradient(circle at 40% 35%, #2A2A38, #141418);
transition: border-color 0.12s, box-shadow 0.12s;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.footswitch-btn-active .footswitch-ring {
border-color: var(--fs-color, var(--pedal-green));
box-shadow:
0 2px 6px rgba(0, 0, 0, 0.5),
inset 0 1px 0 rgba(255, 255, 255, 0.06),
0 0 8px var(--fs-color, var(--pedal-green));
}
.footswitch-btn-bypassed .footswitch-ring {
opacity: 0.5;
border-color: var(--pedal-text-dim);
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.footswitch-cap {
position: absolute;
inset: 8px;
border-radius: 50%;
background: radial-gradient(circle at 38% 32%, #3A3A48, #1A1A22);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.08),
inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}
.footswitch-cap::after {
content: '';
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 8px;
height: 8px;
border-radius: 50%;
background: radial-gradient(circle at 50% 35%, #5A5A6A, #2A2A38);
}
/* ── Tab bar (existing, aligned) ───────────────────────────── */
.pedal-tabbar {
display: flex;
background: var(--pedal-panel);
border-top: 1px solid var(--pedal-border);
flex-shrink: 0;
}
.pedal-tab {
flex: 1;
padding: 8px 4px 6px;
font-size: 9px;
font-weight: 500;
letter-spacing: 0.04em;
text-align: center;
text-transform: uppercase;
color: var(--pedal-text-dim);
cursor: pointer;
border-top: 2px solid transparent;
transition: all 0.12s;
user-select: none;
}
.pedal-tab-active {
color: var(--pedal-amber);
border-top-color: var(--pedal-amber);
}
.pedal-tab-icon {
font-size: 13px;
display: block;
margin-bottom: 1px;
}
/* ── Screen Area ───────────────────────────────────────────── */
.pedal-screen {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
}
/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 420px) {
.footswitch-bar {
padding: 3px 3px 5px;
gap: 2px;
}
.footswitch-slot {
max-width: 48px;
}
.footswitch-btn {
width: 36px;
height: 36px;
}
.footswitch-cap {
inset: 6px;
}
.footswitch-cap::after {
width: 6px;
height: 6px;
}
.scribble-label {
font-size: 7px;
}
.mode-btn {
padding: 3px 5px;
font-size: 9px;
}
.mode-btn-label {
display: none;
}
}
/* ── Pedal Shell ───────────────────────────────────────────── */
.pedal-shell {
width: 100%;
max-width: 440px;
margin: 0 auto;
height: 100dvh;
display: flex;
flex-direction: column;
background: var(--pedal-bg);
color: var(--pedal-text);
overflow: hidden;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
@media (min-width: 441px) {
.pedal-shell {
border-left: 1px solid var(--pedal-border);
border-right: 1px solid var(--pedal-border);
}
}