/**
 * shadcn/ui v4 ModeSwitcher-style header theme toggle (compact ghost icon button).
 */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.blog-header-top .blog-mode-btn {
  width: 2rem;
  height: 2rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.375rem;
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--foreground));
  font-size: 0;
  line-height: 0;
  transition: opacity 0.2s, background-color 0.2s;
  border-radius: var(--radius, 0.5rem);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.blog-header-top .blog-mode-btn:hover,
.blog-header-top .blog-mode-btn:active {
  opacity: 0.85;
  background-color: rgba(var(--accent), 0.5);
}

.blog-header-top .blog-mode-btn:focus {
  outline: 2px solid rgb(var(--ring));
  outline-offset: 2px;
}

#blog-theme-icon,
#tab-bar-theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

#blog-theme-icon svg,
#tab-bar-theme-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

@media (max-width: 390px) {
  .blog-header-actions .blog-mode-btn {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }
}

/* Menu drawer header — theme toggle beside close button */
.blog-menu-drawer .blog-menu-header-actions {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex-shrink: 0;
  margin-left: auto;
}

.blog-menu-drawer .blog-menu-theme-btn {
  width: 2rem;
  height: 2rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.375rem;
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--foreground));
  font-size: 0;
  line-height: 0;
  transition: opacity 0.2s, background-color 0.2s;
  border-radius: var(--radius, 0.5rem);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.blog-menu-drawer .blog-menu-theme-btn:hover,
.blog-menu-drawer .blog-menu-theme-btn:active {
  opacity: 0.85;
  background-color: rgba(var(--accent), 0.5);
}

.blog-menu-drawer .blog-menu-theme-btn:focus {
  outline: 2px solid rgb(var(--ring));
  outline-offset: 2px;
}

#blog-menu-theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

#blog-menu-theme-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}
