.qa-branch-switcher {
    position: relative;
    display: inline-flex;
}

.qa-branch-switcher-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--color-border-default);
    border-radius: 6px;
    color: var(--color-text-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    transition: background-color 100ms ease, border-color 100ms ease;
}

.qa-branch-switcher-trigger:hover {
    background: var(--color-surface-muted);
    border-color: var(--color-border-strong);
}

.qa-branch-switcher-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qa-branch-switcher--loading {
    opacity: 0.4;
    padding: 6px 10px;
    color: var(--color-text-primary);
}

.qa-branch-switcher-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.qa-branch-switcher-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    min-width: 240px;
    background: var(--color-surface-overlay);
    border: 1px solid var(--color-border-default);
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
    padding: 6px;
    max-height: 360px;
    overflow-y: auto;
}

.qa-branch-switcher-menu-header {
    padding: 8px 10px 6px;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.qa-branch-switcher-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--color-text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
}

.qa-branch-switcher-item:hover:not(:disabled) {
    background: var(--color-surface-hover);
}

.qa-branch-switcher-item--current {
    color: var(--color-text-muted);
    cursor: default;
}

.qa-branch-switcher-item-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--color-accent-default);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.qa-branch-switcher-confirm-form {
    display: inline-flex;
    margin: 0;
}
