/* Mobile Layout CSS */

/* Only apply when body has .mobile-mode class */
body.mobile-mode {
    --dock-height: 80px;
    --header-height: 60px;
    overflow: hidden;
    /* Prevent body scroll, handle in canvas */
}

/* Hide Desktop Elements */
body.mobile-mode #floating-dock,
/* Original desktop dock */
body.mobile-mode .dock-handle,
body.mobile-mode .dock-label,
body.mobile-mode #options-bar {
    /* We might want a mobile specific options bar later */
    display: none !important;
}

/* Mobile Header */
body.mobile-mode #app-header {
    height: var(--header-height);
    padding: 0 10px;
    justify-content: space-between;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--grid-color);
    flex-wrap: nowrap;
    /* Prevent wrapping */
}

body.mobile-mode .header-left,
body.mobile-mode .header-right {
    gap: 8px;
    /* Reduce gap */
}

body.mobile-mode .brand {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    /* Truncate long title */
}

body.mobile-mode .menu-txt {
    padding: 4px 6px;
    font-size: 0.8rem;
}

/* Mobile Bottom Dock - Hidden by default */
#mobile-dock {
    display: none;
}

/* Mobile Bottom Dock - Show on mobile */
body.mobile-mode #mobile-dock {
    display: flex !important;
    /* Force display */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--dock-height);
    background: #252526;
    border-top: 1px solid #333;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 10px);
    z-index: 9999;
    /* High z-index */
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
}

body.mobile-mode .mobile-dock-btn {
    background: none;
    border: none;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 10px;
    cursor: pointer;
    transition: color 0.2s, transform 0.1s;
    flex: 1;
    /* Distribute space */
}

body.mobile-mode .mobile-dock-btn.active {
    color: var(--accent-color, #007bff);
}

body.mobile-mode .mobile-dock-btn:active {
    transform: scale(0.95);
}

body.mobile-mode .mobile-dock-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Adjust Canvas for Mobile */
body.mobile-mode #canvas-viewport {
    top: var(--header-height);
    bottom: var(--dock-height);
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
}