.portal-theme-switch {
  position: relative;
  width: 82px;
  height: 36px;
  flex: 0 0 82px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 3px;
  border: 1px solid #bdc4d0;
  border-radius: 999px;
  background: linear-gradient(90deg, #e9ebef 50%, #39496e 50%);
  color: #8892a0;
  cursor: pointer;
  vertical-align: middle;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-theme-switch:hover {
  border-color: #e66239;
  box-shadow: 0 0 0 3px rgba(230, 98, 57, 0.14);
}

.portal-theme-switch:focus-visible {
  outline: 2px solid #e66239;
  outline-offset: 2px;
}

.theme-switch-light,
.theme-switch-dark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
}

.theme-switch-dark {
  color: #9aabd2;
}

.theme-switch-thumb {
  position: absolute;
  z-index: 2;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: #ff8c19;
  color: #fff;
  box-shadow: 0 2px 5px rgba(17, 24, 39, 0.24);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.22s ease, background 0.22s ease;
}

[data-bs-theme="dark"] .theme-switch-thumb {
  transform: translateX(46px);
  background: #3868dd;
}

@media (prefers-reduced-motion: reduce) {
  .portal-theme-switch,
  .theme-switch-thumb {
    transition: none;
  }
}
