/* Sidebar Styles for Diffusion Bridge */

.control-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    box-sizing: border-box;
    background: linear-gradient(180deg, #2c3e50 0%, #000000 100%);
    box-shadow: 2px 0 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    padding: 60px 20px 0 20px; /* Reset bottom padding here */
    gap: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999; /* Higher z-index to ensure it's on top of everything */
    color: white;
    pointer-events: auto; /* Ensure events are captured */
}

/* Export Group */
.export-group {
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

.export-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.export-buttons button {
    padding: 8px !important;
    background: rgba(255, 255, 255, 0.1);
}

.export-buttons button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.export-buttons .full-width {
    grid-column: span 2;
}

/* Add a spacer at the end of the sidebar content to ensure scrolling reaches the bottom */
.control-panel::after {
    content: '';
    display: block;
    min-height: 80px;
    width: 100%;
    flex-shrink: 0;
}

.control-panel.collapsed {
    transform: translateX(-100%);
}

.control-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-bottom: 5px;
}

.control-group label {
    margin-bottom: 4px;
    font-size: 11px;
    opacity: 0.8;
}

.control-group input[type="range"] {
    width: 100%;
}

.control-group select, 
.control-group button {
    width: 100%;
}

#chart-container {
    margin-left: 280px;
    width: calc(100vw - 280px);
    height: 100vh;
    margin-top: 0 !important;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#chart-container.full-width {
    margin-left: 0;
    width: 100vw;
}

/* Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 290px;
    z-index: 10000; /* Even higher than the sidebar */
    background: #2c3e50;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.sidebar-toggle:hover {
    background: #34495e;
}

.sidebar-toggle.collapsed {
    left: 10px;
}

/* Navigation bar adjustment */
.top-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: 280px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-bottom: 1px solid #ddd;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-nav.full-width {
    left: 0;
}

/* Loading indicator adjustment */
.loading-indicator {
    top: 50px !important;
}
