/* ============================================
   Business Switcher — Sidebar Dropdown
   ============================================ */

.business-switcher {
    padding: 6px 4px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.business-switcher.hidden {
    display: none;
}

.business-switcher-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--card-bg, transparent);
}

.business-switcher-trigger:hover {
    background: var(--hover-bg, rgba(255, 255, 255, 0.05));
}

.business-switcher-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    /* Allow text truncation */
}

.business-switcher-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.business-switcher-role {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.business-switcher-icon {
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* Dropdown */
.business-switcher-dropdown {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 100%;
    margin-bottom: 4px;
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    z-index: 100;
    overflow: hidden;
}

.business-switcher-dropdown.hidden {
    display: none;
}

.business-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    color: var(--text-primary);
}

.business-option:hover {
    background: var(--hover-bg, rgba(255, 255, 255, 0.05));
}

.business-option.active {
    background: var(--accent-bg, rgba(59, 130, 246, 0.1));
}

.business-option+.business-option {
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.business-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.business-option-name {
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.business-option-role {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Position context for dropdown */
.business-switcher {
    position: relative;
}