/* Language toggle button — matches Chirpy dark theme */
.lang-toggle-wrapper {
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--sidebar-border-color, rgba(255,255,255,0.08));
  margin-top: 0.5rem;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;            /* pill shape */
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  font-family: inherit;
  line-height: 1.4;
}

.lang-toggle:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
}

.lang-toggle:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
}

.lang-toggle .active {
  color: #5eead4;                  /* teal accent */
}

.lang-toggle span {
  transition: color 0.2s;
}

/* --- Hide Chirpy search field --- */
#search-trigger,
#search,
#search-cancel,
#search-result-wrapper {
  display: none !important;
}

/* --- Logo/avatar override: rounded rectangle instead of cropped square --- */

/* Override the fixed square avatar container */
#sidebar #avatar {
  width: 100%;
  height: auto;
  overflow: visible;
  border-radius: 8px;
  box-shadow: var(--avatar-border-color) 0 0 0 2px;
  transform: translateZ(0);
}

/* Handle the Chirpy theme's larger breakpoint */
@media all and (min-width: 576px) {
  #sidebar #avatar {
    width: 100%;
    height: auto;
  }
}

/* Make the logo image fill the container while preserving aspect ratio */
#sidebar #avatar img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  transition: transform 0.5s;
}

/* Disable the 1.2x hover scale — logo already fills width */
#sidebar #avatar img:hover {
  transform: none;
}
