.theme-toggle {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 12px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  background: var(--card-hover);
  border-color: var(--accent);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle__icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--accent);
  font-size: 19px;
  line-height: 1;
}

.theme-toggle__sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle__moon {
  display: none;
}

:root[data-theme='dark'] .theme-toggle__sun {
  display: inline;
}

@media (max-width: 620px) {
  .theme-toggle {
    width: 40px;
    min-width: 40px;
    padding: 7px;
  }

  .theme-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
  }
}
