/* Sidebar - Settings panel styles */

.sidebar {
    background: var(--surface-variant);
    border-right: 1px solid var(--border-color);
    padding: var(--space-sm);
    overflow-y: auto;
    flex: 0 0 var(--sidebar-width, 480px);
    width: var(--sidebar-width, 480px);
    min-width: 0px;
    max-width: 800px;
}

/* Settings sections */
.settings-section {
    margin-bottom: var(--space-md);
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.settings-header:hover {
    background: var(--surface-variant);
}

.settings-title {
    font-weight: 600;
    font-size: var(--text-sm);
    margin: 0;
    color: var(--on-surface);
    text-transform: none;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.settings-title-muted {
    color: var(--text-secondary);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.collapse-icon {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.settings-section.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.settings-content {
    padding: var(--space-sm) var(--space-md) var(--space-md);
    border-top: 1px solid var(--border-color);
    transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
    max-height: 2000px;
    opacity: 1;
}

.settings-section.collapsed .settings-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top: none;
    overflow: hidden;
}

/* Sub-sections within bot configs */
.settings-subsection {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.settings-subsection:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.subsection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: var(--space-xs) 0;
    margin-bottom: var(--space-sm);
}

.subsection-header:hover .subsection-title {
    color: var(--primary-color);
}

.subsection-title {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color 0.15s ease;
}

.subsection-content {
    transition: max-height 0.2s ease, opacity 0.15s ease;
    max-height: 1000px;
    opacity: 1;
}

.subsection-content.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

/* Bot section specific styling */
.bot-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.bot-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bot-indicator.bot1 {
    background: var(--primary-color);
}

.bot-indicator.bot2 {
    background: var(--success-color);
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.sidebar-overlay.active {
    display: block;
}
