.lightswitch-btn {
  @include icon-button;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
  display: none;
  cursor: pointer;
  color: #444;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  
  @include dark-mode {
    color: #d0d0d0;
  }

  .lightswitch-moon,
  .lightswitch-sun {
    font-size: 1.25rem;
    transition: transform 0.2s ease;
    line-height: 0;
    
    svg {
      display: block;
      margin: 0;
    }
  }

  &.theme-loaded {
    display: flex;
  }
  
  // Override for sidebar
  .sidebar-brand & {
    position: static;
    margin: 0;
    width: 36px;
    height: 36px;
    display: flex;
    
    .lightswitch-moon,
    .lightswitch-sun {
      font-size: 1.1rem;
    }
  }
  
  // Mobile visibility
  @media (max-width: 768px) {
    &.theme-loaded {
      display: flex;
    }
    
    .sidebar-brand & {
      display: none;
    }
  }
}
