/* Site Switcher - Inline Button Style */
.site-switcher {
  display: inline-flex;
  position: relative;
  align-items: center;
  user-select: none;
}

/* The button itself - styled like other header buttons */
.site-switcher__tab {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-primary, #111827);
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.site-switcher__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-switcher__text {
  white-space: nowrap;
}

.site-switcher__tab:hover {
  background-color: var(--surface-tertiary, #f3f4f6);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.site-switcher__tab:active {
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

/* Menu/Popup - FIXED position like original, always visible when active */
.site-switcher__menu {
  display: none;
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  gap: 12px;
  z-index: 10000;
}

.site-switcher__menu.active {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  align-items: stretch;
}

.site-switcher__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 8px;
  border-radius: 8px;
}

.site-switcher__item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.site-switcher__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.site-switcher__label {
  margin-top: 6px;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 640px) {
  .site-switcher__menu {
    width: 90vw;
    left: 50%;
    transform: translateX(-50%);
  }
  .site-switcher__menu.active {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  
  /* Hide text on mobile, show only icon */
  .site-switcher__text {
    display: none;
  }
  
  .site-switcher__tab {
    padding: 0.5rem;
    width: 2.5rem;
    min-width: 2.5rem;
  }
}


