/* VERSION: 1.0.0 */
/* css/drawer-aux.css */
/* Master FX & Aux DSP Rack Bottom-Docked Slideout Hardware Drawer */
/* Designed to match the exact 3-bay Eurorack pro studio rack template of VJ Console and Studio EQ */

#aux-drawer.aux-drawer {
    position: absolute;
    bottom: 64px;
    left: 10px;
    right: 10px;
    max-height: calc(100% - 72px);
    z-index: 46;
    background: var(--bg-panel, #20242e);
    background: color-mix(in srgb, var(--bg-panel, #222632) 88%, #ffffff 12%);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.22));
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(255, 255, 255, 0.14);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(calc(100% + 80px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    user-select: none;
    -webkit-user-select: none;
    font-family: inherit;
    color: var(--text-main, #f4f4f5);
}

#aux-drawer.aux-drawer.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* DRAWER PULL HANDLE */
.aux-drawer-handle {
    width: 100%;
    padding: 6px 0 3px;
    display: flex;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    transition: opacity 0.2s;
}

.aux-drawer-handle:hover {
    background: rgba(0, 0, 0, 0.2);
}

.aux-drawer-handle .handle-bar {
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    transition: background 0.15s, width 0.2s, box-shadow 0.2s;
}

.aux-drawer-handle:hover .handle-bar {
    width: 60px;
    background: var(--accent, #ff9e3b);
    box-shadow: 0 0 8px var(--accent, #ff9e3b);
}

/* HARDWARE HEADER BAR */
.aux-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
    gap: 8px;
    flex-shrink: 0;
}

.aux-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.aux-brand .highlight {
    color: var(--accent, #ff9e3b);
    text-shadow: 0 0 8px var(--accent, #ff9e3b);
}

.aux-power-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #333;
    box-shadow: inset 1px 1px 2px #000;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.aux-power-led.active {
    background-color: var(--accent, #ff9e3b);
    box-shadow: 0 0 8px var(--accent, #ff9e3b), inset -1px -1px 2px rgba(0,0,0,0.4);
}

.aux-version-badge {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
    background: color-mix(in srgb, var(--accent, #ff9e3b) 15%, transparent);
    color: var(--accent, #ff9e3b);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid color-mix(in srgb, var(--accent, #ff9e3b) 30%, transparent);
}

/* VECTOR SCOPE MONITOR CANVAS */
.aux-scope-canvas {
    width: 120px;
    height: 32px;
    background: #06090e;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85);
    flex-shrink: 0;
}

/* RETRO DIGITAL LCD DISPLAY */
.aux-lcd {
    background: #06090e;
    border: 1px solid color-mix(in srgb, var(--accent, #ff9e3b) 30%, transparent);
    border-radius: 6px;
    padding: 4px 10px;
    font-family: var(--font-mono, 'SF Mono', 'Courier New', monospace);
    font-size: 11px;
    font-weight: bold;
    color: var(--accent, #ff9e3b);
    text-shadow: 0 0 6px var(--accent, #ff9e3b);
    letter-spacing: 1.5px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85);
    min-width: 130px;
    text-align: center;
    flex-shrink: 0;
}

/* 1-CLICK SEGMENTED MODULE TABS */
.aux-module-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 1;
}
.aux-module-bar::-webkit-scrollbar {
    display: none;
}

.aux-module-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted, #a1a1aa);
    padding: 4px 9px;
    border-radius: 12px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    user-select: none;
}

.aux-module-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.aux-module-tab.active {
    background: color-mix(in srgb, var(--accent, #ff9e3b) 30%, transparent);
    border-color: var(--accent, #ff9e3b);
    color: #ffffff;
    box-shadow: 0 0 10px color-mix(in srgb, var(--accent, #ff9e3b) 40%, transparent);
}

.aux-module-tab .module-icon {
    font-size: 11px;
}

/* HEADER ACTIONS */
.aux-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.aux-btn {
    background: linear-gradient(180deg, #2a2d36, #15171d);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #b0b4be;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    flex-shrink: 0;
}

.aux-btn:hover {
    background: linear-gradient(180deg, #373b47, #1e2029);
    color: #ffffff;
    border-color: var(--accent, rgba(255, 255, 255, 0.35));
}

.aux-btn.active {
    background: color-mix(in srgb, var(--accent, #ff9e3b) 30%, transparent);
    color: #ffffff;
    border-color: var(--accent, #ff9e3b);
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent, #ff9e3b) 35%, transparent);
}

.aux-btn.danger {
    color: #ff5555;
    border-color: rgba(255, 85, 85, 0.4);
}

.aux-btn.danger:hover {
    background: #441111;
    color: #ff8888;
}

.aux-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.aux-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

/* 3-BAY EURORACK PRO STUDIO RACK BODY (COMPACT SINGLE ROW) */
.aux-rack-body {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    padding: 6px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 200px;
    width: 100%;
    box-sizing: border-box;
}

/* BAY 1: PRO MASTER INPUT STRIP (Audio VU Meter & Tactile Long-Throw Master Fader) */
.aux-sidebar-master {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    padding: 6px 6px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
    width: 94px;
    box-sizing: border-box;
}

.aux-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 2px;
}

.aux-strip-label {
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--text-muted, #9ea4b0);
    text-transform: uppercase;
}

.aux-strip-readout {
    font-family: var(--font-mono, 'SF Mono', monospace);
    font-size: 8px;
    font-weight: 700;
    color: var(--accent, #ff9e3b);
    text-shadow: 0 0 6px color-mix(in srgb, var(--accent, #ff9e3b) 40%, transparent);
}

.aux-strip-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 124px;
    gap: 6px;
}

.aux-meter-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 124px;
    flex-shrink: 0;
}

.aux-vu-meter-canvas {
    width: 28px;
    height: 122px;
    background: #06090d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9);
}

/* TACTILE MACHINED LONG-THROW FADER (MATCHING STUDIO EQ) */
.aux-fader-col {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: 124px;
    flex: 1;
    position: relative;
}

.aux-fader-track-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.aux-fader-ticks {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.aux-fader-ticks .tick {
    position: relative;
    width: 100%;
    height: 1px;
}

.aux-fader-ticks .tick::before,
.aux-fader-ticks .tick::after {
    content: '';
    position: absolute;
    top: 0;
    height: 1px;
    width: 4px;
    background: rgba(255, 255, 255, 0.22);
}

.aux-fader-ticks .tick::before { left: 4px; }
.aux-fader-ticks .tick::after { right: 4px; }

.aux-fader-ticks .tick-zero::before,
.aux-fader-ticks .tick-zero::after {
    width: 7px;
    background: var(--accent, #ff9e3b);
    box-shadow: 0 0 3px var(--accent, #ff9e3b);
}

.aux-fader-track {
    position: absolute;
    width: 6px;
    height: 112px;
    background: #080a0f;
    border-radius: 3px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.95), 0 1px 0 rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.aux-fader-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, var(--accent, #ff9e3b) 0%, rgba(255, 158, 59, 0.4) 100%);
    border-radius: 3px;
    box-shadow: 0 0 6px var(--accent, #ff9e3b);
    pointer-events: none;
}

.aux-fader-handle {
    position: absolute;
    width: 24px;
    height: 14px;
    left: 50%;
    transform: translate(-50%, 50%);
    background: linear-gradient(180deg, #505663 0%, #323742 40%, #1c1f26 100%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 2px;
    cursor: grab;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.6);
    touch-action: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    z-index: 2;
}

.aux-fader-handle:hover,
.aux-fader-handle.active-drag {
    border-color: var(--accent, #ff9e3b);
    box-shadow: 0 0 10px var(--accent, #ff9e3b);
}

.aux-fader-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 3px;
    right: 3px;
    height: 2px;
    transform: translateY(-50%);
    background: var(--accent, #ff9e3b);
    box-shadow: 0 0 4px var(--accent, #ff9e3b);
}

.aux-fader-input-native {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
    margin: 0;
}

.aux-strip-switches {
    display: flex;
    flex-direction: row;
    gap: 3px;
    width: 100%;
}

.aux-strip-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-muted, #9ea4b0);
    border-radius: 4px;
    padding: 3px 0;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-align: center;
    flex: 1;
    transition: all 0.18s ease;
    text-transform: uppercase;
}

.aux-strip-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.aux-strip-btn.active {
    background: color-mix(in srgb, var(--accent, #ff9e3b) 25%, transparent);
    border-color: var(--accent, #ff9e3b);
    color: #ffffff;
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent, #ff9e3b) 35%, transparent);
}

.aux-strip-btn.active {
    background: color-mix(in srgb, var(--accent, #ff9e3b) 30%, transparent);
    border-color: var(--accent, #ff9e3b);
    color: #ffffff;
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent, #ff9e3b) 35%, transparent);
}

/* BAY 2 & 3 COLUMNS - FLEX EXTENSION ACROSS FULL WIDTH */
.aux-deck-column {
    display: flex;
    gap: 8px;
    min-width: 0;
}

.aux-deck-engine {
    flex: 1.2 1 0;
    min-width: 0;
    display: flex;
}

.aux-deck-engine .aux-card {
    flex: 1 1 0;
    width: 100%;
    height: 100%;
    display: flex !important;
    flex-direction: column;
}

.aux-deck-master {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex: 1.8 1 0;
    min-width: 0;
}

.aux-deck-master .aux-card {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* STUDIO CARDS (MATCHING STUDIO EQ MIXER PANEL) */
.aux-card {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.aux-card:hover {
    border-color: var(--accent, rgba(255, 255, 255, 0.25));
}

.aux-card-header {
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.aux-card-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.aux-card-header h3 {
    margin: 0;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #e4e4e7;
    text-transform: uppercase;
}

.aux-card-body {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    flex: 1;
}

/* BADGES */
.aux-badge {
    font-size: 7.5px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--accent, #ff9e3b) 15%, transparent);
    color: var(--accent, #ff9e3b);
    border: 1px solid color-mix(in srgb, var(--accent, #ff9e3b) 30%, transparent);
}

/* BLANKING PLATE / PLACEHOLDER CHASSIS */
.aux-blanking-plate {
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
}

.aux-rack-screws {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    top: 0;
    left: 0;
}

.aux-screw {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #888 30%, #333 100%);
    box-shadow: inset 0 1px 1px #fff, 0 1px 2px #000;
}
.aux-screw.top-left { top: 6px; left: 8px; }
.aux-screw.top-right { top: 6px; right: 8px; }
.aux-screw.bottom-left { bottom: 6px; left: 8px; }
.aux-screw.bottom-right { bottom: 6px; right: 8px; }

.aux-placeholder-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-muted, #9ea4b0);
    text-transform: uppercase;
}

/* HARDWARE KNOBS (MATCHING EXACT VJ/EQ TEMPLATE) */
.aux-control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.aux-knob {
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #4a5060 0%, #2a2f3b 50%, #151820 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.4), inset 0 -1px 2px rgba(0, 0, 0, 0.7);
    position: relative;
    cursor: grab;
    border: 2px solid rgba(255, 255, 255, 0.3);
    touch-action: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.aux-knob:active {
    cursor: grabbing;
    box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.95), inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

.aux-knob:hover {
    border-color: var(--accent, #ff9e3b);
    box-shadow: 0 0 10px var(--accent, #ff9e3b);
}

.aux-knob.small {
    width: 28px;
    height: 28px;
}

.aux-pointer {
    position: absolute;
    left: 50%;
    top: 8%;
    transform: translateX(-50%);
    width: 2.5px;
    height: 8px;
    background-color: var(--accent, #ff9e3b);
    border-radius: 1.5px;
    box-shadow: 0 0 6px var(--accent, #ff9e3b);
}

.aux-label {
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #9ea4b0;
    text-transform: uppercase;
}

.aux-val-readout {
    font-family: var(--font-mono, 'SF Mono', monospace);
    font-size: 7.5px;
    color: var(--accent, #ff9e3b);
    font-weight: 700;
    text-shadow: 0 0 6px color-mix(in srgb, var(--accent, #ff9e3b) 40%, transparent);
}

/* KNOB CLUSTERS - SINGLE ROW FULL WIDTH FLEX */
.aux-knob-cluster.grid-2x2 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    gap: 12px;
    width: 100%;
}

.aux-knob-cluster.grid-row-3 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    gap: 8px;
    width: 100%;
}

/* RESPONSIVE FLEXBOX-LIKE BREAKPOINTS */
@media (max-width: 1200px) {
    .aux-rack-body {
        overflow-x: auto;
    }
}

@media (max-width: 820px) {
    .aux-top-bar {
        flex-wrap: wrap;
        gap: 6px;
    }
    .aux-rack-body {
        overflow-x: auto;
        max-height: 220px;
    }
}

/* Light Mode Aesthetic Overrides for Aux Rack */
body.light-mode #aux-drawer.aux-drawer {
    background: #f4f6f9;
    border-color: #cbd2db;
    color: #1e293b;
    box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.08);
}
body.light-mode .aux-top-bar {
    background: #eaedf1;
    border-bottom: 1px solid #cbd2db;
}
body.light-mode .aux-scope-canvas,
body.light-mode .aux-vu-meter-canvas {
    background: #e8ecf1;
    border-color: #cbd2db;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}
body.light-mode .aux-lcd {
    background: #e8ecf1;
    border-color: #cbd2db;
    color: #1e293b;
    text-shadow: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}
body.light-mode .aux-card,
body.light-mode .aux-sidebar-master {
    background: #f4f6f9;
    border-color: #cbd2db;
    color: #1e293b;
}
body.light-mode .aux-knob {
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #eaedf1 55%, #dde1e7 100%);
    border: 2px solid #cbd2db;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), inset 0 1px 2px #ffffff;
}
body.light-mode .aux-module-tab,
body.light-mode .aux-btn {
    background: #eaedf1;
    border-color: #cbd2db;
    color: #334155;
}
body.light-mode .aux-brand,
body.light-mode .aux-card-title,
body.light-mode .aux-label {
    color: #1e293b;
    text-shadow: none;
}

