/* vars */
:root {
  --accent: hsl(25, 84%, 50%);
  --accent-opaque: hsla(25, 84%, 50%, 0.7);
  --accent2: hsla(193, 94%, 50%, 1);
  --accent2-opaque: hsla(193, 94%, 50%, 0.7);
}

.controls {
  display: flex;
  gap: 0.5rem;
  width: max-content;
  margin-top: 1rem;
  border: 1px solid #ddd;
  padding: 0.5rem;
  border-radius: 1rem;
}

/* The switch - the box around the speaker*/
.toggleSwitch {
  width: 2em;
  height: 1.75em;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent2-opaque);
  border-radius: 0.5rem;
  cursor: pointer;
  transition-duration: 0.3s;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.13);
  overflow: hidden;
}

/* Hide default HTML checkbox */
#mute-toggle {
  display: none;
}

.bell {
  width: 18px;
}

.bell path {
  fill: white;
}

.speaker {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition-duration: 0.3s;
}

.speaker svg {
  width: 18px;
}

.mute-speaker {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 3;
  transition-duration: 0.3s;
}

.mute-speaker svg {
  width: 18px;
}

#mute-toggle:checked + .toggleSwitch .speaker {
  opacity: 0;
  transition-duration: 0.3s;
}

#mute-toggle:checked + .toggleSwitch .mute-speaker {
  opacity: 1;
  transition-duration: 0.3s;
  background-color: #333;
}

#mute-toggle:active + .toggleSwitch {
  transform: scale(0.8);
}

#mute-toggle:hover + .toggleSwitch {
  background-color: var(--accent2);
}

/* Dark Toggle */

.mute-toggle,
.dark-toggle {
  display: inline-flex;
  border: 1px solid var(--accent2-opaque);
  padding: 0.6rem;
  background-color: #1fd2ff2a;
  border-radius: 0.5rem;
  align-items: center;
  gap: 0.5rem;
}

/* toggle */
.toggle-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  border-radius: 0.5em;
  padding: 0.125em;
  background-image: linear-gradient(to bottom, #d5d5d5, #e8e8e8);
  box-shadow: 0 1px 1px rgb(255 255 255 / 0.6);
  /* resize for demo */
  font-size: 1em;
}

.toggle-checkbox {
  appearance: none;
  position: absolute;
  z-index: 1;
  border-radius: inherit;
  width: 100%;
  height: 100%;
  /* fix em sizing */
  font: inherit;
  opacity: 0;
  cursor: pointer;
}

.toggle-container {
  display: flex;
  align-items: center;
  position: relative;
  border-radius: 0.375em;
  width: 3em;
  height: 1.5em;
  background-color: #e8e8e8;
  box-shadow: inset 0 0 0.0625em 0.125em rgb(255 255 255 / 0.2),
    inset 0 0.0625em 0.125em rgb(0 0 0 / 0.4);
  transition: background-color 0.4s linear;
}

.toggle-checkbox:checked + .toggle-container {
  background-color: var(--accent2);
}

.toggle-button {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: 0.0625em;
  border-radius: 0.3125em;
  width: 1.375em;
  height: 1.375em;
  background-color: #e8e8e8;
  box-shadow: inset 0 -0.0625em 0.0625em 0.125em rgb(0 0 0 / 0.1),
    inset 0 -0.125em 0.0625em rgb(0 0 0 / 0.2),
    inset 0 0.1875em 0.0625em rgb(255 255 255 / 0.3),
    0 0.125em 0.125em rgb(0 0 0 / 0.5);
  transition: left 0.4s;
}

.toggle-checkbox:checked + .toggle-container > .toggle-button {
  left: 1.5625em;
}

.toggle-button-circles-container {
  display: grid;
  grid-template-columns: repeat(3, min-content);
  gap: 0.125em;
  position: absolute;
  margin: 0 auto;
}

.toggle-button-circle {
  border-radius: 50%;
  width: 0.125em;
  height: 0.125em;
  background-image: radial-gradient(circle at 50% 0, #f5f5f5, #c4c4c4);
}

@media (width < 425px) {
  .controls {
    flex-direction: column;
    align-items: start;
  }
}
