/* Styles for the system | light | dark toggle control. */

.toggle {
  position: fixed;
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
  z-index: 10;
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.25rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-elevated);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.toggle__option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.toggle__icon {
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.toggle__icon--system {
  -webkit-mask-image: url("../icons/laptop.svg");
  mask-image: url("../icons/laptop.svg");
}

.toggle__icon--light {
  -webkit-mask-image: url("../icons/sun.svg");
  mask-image: url("../icons/sun.svg");
}

.toggle__icon--dark {
  -webkit-mask-image: url("../icons/moon.svg");
  mask-image: url("../icons/moon.svg");
}

.toggle__option:hover {
  color: var(--color-text);
}

.toggle__option[aria-checked="true"] {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}
