.control-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: var(--panel-bg);
    padding: 15px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px var(--shadow-color);
    color: var(--text-color);
    width: 250px;
    max-height: 70vh;
    overflow-y: auto;
    transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.control-panel.collapsed {
    width: auto;
    height: auto;
    transform: translateX(-100%);
    padding-right: 40px; /* Space for the toggle button */
}

.toggle-panel-btn, .collapse-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-color);
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 1001;
    transition: all 0.2s ease;
}

.toggle-panel-btn:hover, .collapse-btn:hover {
    background: var(--hover-bg);
    color: var(--hover-color);
}

.control-panel-tab {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 15px;
    color: var(--text-color);
    font-family: 'Arial', sans-serif;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: none;
}

.control-panel-tab.visible {
    display: block;
}

.control-panel-tab:hover {
    background: var(--hover-bg);
}

.control-panel h3 {
    font-family: 'Arial', sans-serif;
    margin-top: 0;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
}

.feature-toggle:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.feature-label {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--toggle-bg);
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: var(--toggle-knob);
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--toggle-active);
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-on {
    background-color: #34a853;
}

.status-off {
    background-color: #ea4335;
}

.status-loading {
    background-color: #fbbc05;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
} 