.ccxl-branch-switcher {
  --ccxl-bg: #fff;
  --ccxl-border: #d0d0d0;
  --ccxl-text: #1a1a1a;
  --ccxl-muted: #666;
  --ccxl-hover: #f4f4f4;
  --ccxl-radius: 6px;
  position: relative;
  display: inline-block;
  font-size: 0.95rem;
  line-height: 1.3;
  z-index: 50;
}

.ccxl-branch-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.45rem 0.75rem;
  margin: 0;
  border: 1px solid var(--ccxl-border);
  border-radius: var(--ccxl-radius);
  background: var(--ccxl-bg);
  color: var(--ccxl-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.ccxl-branch-switcher__toggle:hover,
.ccxl-branch-switcher__toggle:focus-visible {
  border-color: #999;
  outline: none;
}

.ccxl-branch-switcher__label {
  white-space: nowrap;
}

.ccxl-branch-switcher__label strong {
  font-weight: 600;
}

.ccxl-branch-switcher__arrow {
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  opacity: 0.7;
  margin-top: -0.2rem;
}

.ccxl-branch-switcher.is-open .ccxl-branch-switcher__arrow {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.ccxl-branch-switcher__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  padding: 0.35rem 0;
  margin: 0;
  border: 1px solid var(--ccxl-border);
  border-radius: var(--ccxl-radius);
  background: var(--ccxl-bg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.ccxl-branch-switcher__menu[hidden] {
  display: none !important;
}

.ccxl-branch-switcher__item {
  display: block;
  padding: 0.55rem 0.85rem;
  color: var(--ccxl-text);
  text-decoration: none;
  white-space: nowrap;
}

a.ccxl-branch-switcher__item:hover,
a.ccxl-branch-switcher__item:focus-visible {
  background: var(--ccxl-hover);
  outline: none;
}

.ccxl-branch-switcher__item--muted {
  color: var(--ccxl-muted);
  cursor: default;
  font-size: 0.9em;
}
