/* Chat Bubble Color Differentiation */
.bubble.bot {
    background: rgba(147, 197, 253, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 2px solid rgba(96, 165, 250, 0.4);
    border-bottom-left-radius: 4px;
    color: var(--text);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.bubble.me {
    background: var(--brand-gradient);
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 24px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Capsule Toggle Switch Style */
.menu-toggle {
    position: relative;
    background: var(--surface-highlight);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 8px 48px 8px 40px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.menu-toggle .toggle-text {
    position: relative;
    z-index: 3;
    white-space: nowrap;
}

.menu-toggle .toggle-indicator {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.menu-toggle:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* Active state - indicator moves to the right */
.header.menu-open .menu-toggle {
    background: var(--brand-gradient);
    border-color: transparent;
    color: #fff;
}

.header.menu-open .menu-toggle .toggle-indicator {
    left: calc(100% - 30px);
    background: #fff;
}

/* Mobile layout - buttons below brand */
@media (max-width: 768px) {
    .bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .brand {
        width: 100%;
    }

    /* Button container */
    .theme-toggle,
    .menu-toggle {
        flex-shrink: 0;
    }

    /* Create a row for theme and menu buttons */
    .header .theme-toggle {
        margin: 4px 0;
    }
}

/* Dropdown Menu - Slides down from top like a blind */
.foot-actions {
    display: flex;
    gap: 12px;
    max-height: 0;
    overflow: visible;
    opacity: 0;
    padding: 8px 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
}

.foot-actions.visible {
    max-height: 200px;
    opacity: 1;
}