.etea-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  color: rgba(255, 255, 255, 0.78);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.etea-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.etea-theme-toggle__track {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 150ms ease, border-color 150ms ease;
}

.etea-theme-toggle__thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 150ms ease;
}

.etea-theme-toggle__icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  opacity: 0.55;
  pointer-events: none;
}

.etea-theme-toggle__icon--sun {
  left: 3px;
}

.etea-theme-toggle__icon--moon {
  right: 3px;
}

.etea-theme-toggle[aria-checked="true"] .etea-theme-toggle__thumb {
  transform: translateX(16px);
}

.etea-theme-toggle[aria-checked="true"] .etea-theme-toggle__track {
  background: rgba(34, 113, 177, 0.35);
  border-color: rgba(34, 113, 177, 0.45);
}

html[data-theme="light"] .etea-theme-toggle {
  border-color: #c3c4c7;
  background: #fff;
  color: #646970;
}

html[data-theme="light"] .etea-theme-toggle:hover {
  background: #f6f7f7;
  border-color: #8c8f94;
}

html[data-theme="light"] .etea-theme-toggle__track {
  background: #dcdcde;
  border-color: #c3c4c7;
}

html[data-theme="light"] .etea-theme-toggle[aria-checked="true"] .etea-theme-toggle__track {
  background: rgba(34, 113, 177, 0.25);
  border-color: #2271b1;
}

.etea-theme-toggle--floating {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 10050;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.etea-theme-toggle--compact {
  width: auto;
  height: auto;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 0;
  justify-content: flex-start;
  gap: 10px;
}

.etea-theme-toggle--compact .etea-theme-toggle__label {
  font-size: 13px;
  font-weight: 500;
  color: inherit;
}

html[data-theme="light"] .user-dd-item .etea-theme-toggle--compact {
  color: #1d2327;
}
