.theme-switch {
  position: fixed;
  width: 45px;
  height: 45px;
  bottom: 40px;
  right: 40px;
  border-radius: 8px;
  border-width: 1px;
  border-color: rgba(198, 198, 198, 0.411);
  text-align: center;

  background-color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: color, background-color var(--transition-duration);
  z-index: 10;
}

.theme-switch button {
  /* border: none; */
  border-color: rgba(198, 198, 198, 0.411);
  border-width: 1px;
  background-color: inherit;
  cursor: pointer;
  border-radius: 9px;
  padding: 8px;
}

.theme-switch {
  --transition-duration: 400ms;
  --bg: white;
  --text: #333;
}

.dark .theme-switch {
  --bg: #333;
  --text: white;
}

.theme-switch svg {
  padding: 6px 4px 0 4px;
  transition: stroke var(--transition-duration);
  stroke: var(--text);
}

.theme-switch .moon-icon {
  stroke-dasharray: 0px 1px;
  opacity: 0;
  transition: stroke-dasharray 0.5s ease-in, opacity 300ms ease-in;
}

.theme-switch .sun-icon {
  stroke-dasharray: 1px 1px;
  opacity: 1;
  transition: stroke-dasharray 0.5s ease-in, opacity 300ms ease-in;
}

.dark .theme-switch .moon-icon {
  stroke-dasharray: 1px 1px;
  opacity: 1;
}

.dark .theme-switch .sun-icon {
  stroke-dasharray: 0px 1px;
  opacity: 0;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 180px;
  background-color: rgb(116, 116, 116);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;

  /* Position the tooltip */
  position: absolute;
  z-index: 1;
  top: 5px;
  right: 135%;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}

.tooltip .tooltiptext {
  background-color: #f9fbfc;
  color: #515a6e;
}

.tooltip .tooltiptext:after {
  content: "Dark mode switch";
}

.dark .tooltip .tooltiptext {
  background-color: #1f2022;
  color: #d3d3d3;
}
.dark .tooltip .tooltiptext:after {
  content: "Light mode switch";
}
