/**
 * SMUGGLER: Mobile Omni-Drawer
 * Phase 7: Mobile Drawer System for HUD Access
 * Industrial Zen design system
 * 
 * Stream 29: Mobile Support & Responsive Design
 * Additional mobile UI components
 */

/* Mobile Header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(9, 11, 16, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 1000;

.mobile-menu-btn,
.mobile-settings-btn {
    background: transparent;
    border: 1px solid var(--surface-3);
    color: var(--terminal-green);
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;

.mobile-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--signal-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;

/* Mobile Footer */
.mobile-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(9, 11, 16, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0.5rem;
    z-index: 1000;

.mobile-nav-btn {
    background: transparent;
    border: none;
    color: var(--terminal-dim);
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 0.25rem;
    flex: 1;

.mobile-nav-btn.active {
    color: var(--signal-cyan);

.nav-icon {
    font-size: 1.5rem;

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;

.mobile-menu.is-open {
    display: block;

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 320px;
    background: rgba(9, 11, 16, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 1px solid var(--surface-3);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;

@keyframes slideInRight {
    from {
        transform: translateX(100%);

    to {
        transform: translateX(0);

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--surface-3);

.mobile-menu-close {
    background: transparent;
    border: none;
    color: var(--terminal-green);
    font-size: 1.5rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    overflow-y: auto;

.mobile-menu-item {
    background: var(--surface-2);
    border: 1px solid var(--surface-3);
    color: var(--terminal-green);
    padding: 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    border-radius: 4px;
    text-align: left;

.mobile-menu-item:active {
    background: var(--surface-3);

.menu-item-icon {
    font-size: 1.5rem;

.menu-item-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;

/* Touch Optimizations */
.touch-optimized {
    -webkit-tap-highlight-color: rgba(0, 255, 0, 0.2);
    touch-action: manipulation;

/* Mobile Optimized Panels */
.mobile-optimized {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 70px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    overflow-y: auto;

.mobile-optimized.mobile-active {
    display: block !important;

/* Orientation Modes */
.landscape-mode {
    /* Landscape-specific styles */

.portrait-mode {
    /* Portrait-specific styles */

/* Performance Modes */
.perf-low {
    /* Low performance optimizations */
    * {
        will-change: auto;

.perf-medium {
    /* Medium performance optimizations */

.perf-high {
    /* High performance - no restrictions */

/* Mobile-only styles */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
        padding-bottom: 70px;

    .mobile-only {
        display: block;

    .desktop-only {
        display: none !important;

@media (min-width: 769px) {
    .mobile-header,
    .mobile-footer,
    .mobile-menu {
        display: none !important;

    .mobile-only {
        display: none !important;

/* ============================================
   MOBILE DRAWER CONTAINER
   ============================================ */

.mobile-drawer {
    position: fixed;
    top: 60px; /* Below Header */
    left: 0;
    width: 100%;
    height: calc(100vh - 60px); /* Full remaining height */
    background: rgba(9, 11, 16, 0.95); /* Deep dark, high opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 200; /* Above everything except header */
    
    /* Animation State: Closed */
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                opacity 0.3s ease,
                pointer-events 0s 0.3s; /* Delay pointer-events disable */
    
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    
    /* Scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--surface-2) transparent;

.mobile-drawer::-webkit-scrollbar {
    width: 8px;

.mobile-drawer::-webkit-scrollbar-track {
    background: transparent;

.mobile-drawer::-webkit-scrollbar-thumb {
    background: var(--surface-2);
    border-radius: 4px;

.mobile-drawer::-webkit-scrollbar-thumb:hover {
    background: var(--surface-3);

/* Animation State: Open */
.mobile-drawer.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                opacity 0.3s ease,
                pointer-events 0s 0s; /* Enable immediately */

/* Drawer overlay backdrop */
.mobile-drawer::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: -1;

.mobile-drawer.is-open::before {
    opacity: 1;
    pointer-events: auto;

/* ============================================
   SEGMENTED CONTROL (TABS)
   ============================================ */

.drawer-tabs {
    display: flex;
    background: var(--surface-2);
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--surface-3);
    gap: 0.25rem;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

.drawer-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-display); /* Orbitron */
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-weight: 500;

.drawer-tab:hover {
    background: var(--surface-3);
    color: var(--text-primary);

.drawer-tab.active {
    background: var(--surface-3);
    color: var(--signal-cyan);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--signal-cyan);
    font-weight: 600;

.drawer-tab:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--surface-0), 0 0 0 4px var(--signal-cyan);

/* ============================================
   DRAWER CONTENT
   ============================================ */

.drawer-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Allow flex shrinking */

.drawer-panel {
    display: none;

.drawer-panel.active {
    display: block;
    animation: fadeIn 0.2s ease-out;

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);

    to {
        opacity: 1;
        transform: translateY(0);

/* ============================================
   HEADER TRIGGER BUTTON
   ============================================ */

.menu-toggle {
    background: transparent;
    border: 1px solid var(--surface-3);
    color: var(--signal-cyan);
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;

.menu-toggle:hover {
    background: var(--surface-2);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    border-color: var(--signal-cyan);

.menu-toggle:active {
    transform: scale(0.95);

.menu-toggle.is-active {
    background: rgba(0, 240, 255, 0.1);
    color: var(--signal-cyan);
    transform: rotate(90deg);
    border-color: var(--signal-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);

.menu-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--surface-0), 0 0 0 4px var(--signal-cyan);

/* Icon styles */
.menu-toggle-icon {
    width: 20px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;

.menu-toggle-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: all 0.3s ease;

.menu-toggle.is-active .menu-toggle-icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);

.menu-toggle.is-active .menu-toggle-icon span:nth-child(2) {
    opacity: 0;

.menu-toggle.is-active .menu-toggle-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);

/* Alternative: Grid icon */
.menu-toggle-icon-grid {
    width: 18px;
    height: 18px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    transition: transform 0.3s ease;

.menu-toggle-icon-grid span {
    display: block;
    background: currentColor;
    border-radius: 1px;

.menu-toggle.is-active .menu-toggle-icon-grid {
    transform: rotate(90deg);

/* ============================================
   HEADER CONTROLS CONTAINER
   ============================================ */

.header-controls {
    display: none; /* Hidden by default, shown on mobile */
    align-items: center;
    gap: 0.5rem;

/* ============================================
   BODY SCROLL LOCK
   ============================================ */

body.drawer-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Mobile: Show drawer, hide sidebars */
@media (max-width: 768px) {
    /* Hide desktop rails */
    .rail-left,
    .rail-right {
        display: none !important;

    /* Show the trigger */
    .header-controls {
        display: flex;

    /* Ensure drawer is available */
    .mobile-drawer {
        display: flex;

    /* Adjust center stage to full width on mobile */
    .stage-center {
        width: 100%;

    /* Adjust cockpit container for mobile */
    .cockpit-container {
        grid-template-columns: 100%;

/* Desktop: Hide drawer, show sidebars */
@media (min-width: 769px) {
    .mobile-drawer,
    .menu-toggle,
    .header-controls {
        display: none !important;

    .rail-left,
    .rail-right {
        display: flex !important;

/* ============================================
   DRAWER CLOSE BUTTON (Optional)
   ============================================ */

.drawer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 1px solid var(--surface-3);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 11;

.drawer-close:hover {
    background: var(--surface-2);
    border-color: var(--signal-crimson);
    color: var(--signal-crimson);

.drawer-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--surface-0), 0 0 0 4px var(--signal-crimson);

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .mobile-drawer {
        transition: opacity 0.2s ease;

    .mobile-drawer.is-open {
        transform: none;

    .menu-toggle {
        transition: background 0.2s ease, border-color 0.2s ease;

    .menu-toggle.is-active {
        transform: none;

    .drawer-tab {
        transition: background 0.2s ease, color 0.2s ease;

    .drawer-panel.active {
        animation: none;

/* High contrast mode */
@media (prefers-contrast: more) {
    .mobile-drawer {
        background: var(--surface-0);
        border: 2px solid var(--text-tertiary);

    .drawer-tabs {
        border-width: 2px;

    .drawer-tab.active {
        border-width: 2px;

    .menu-toggle {
        border-width: 2px;

/* ============================================
   SAFE AREA INSETS (Notched Devices)
   ============================================ */

@supports (padding: max(0px)) {
    .mobile-drawer {
        padding-left: max(1.5rem, env(safe-area-inset-left));
        padding-right: max(1.5rem, env(safe-area-inset-right));
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));

/* ============================================
   DRAWER BACKDROP CLICK TO CLOSE
   ============================================ */

.mobile-drawer-backdrop {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 199;

.mobile-drawer-backdrop.is-active {
    opacity: 1;
    pointer-events: auto;

}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}