@use "_sizes";
@use "_colors";
@use "_states";

.draco-toggle-warper {
  gap: 8px;
  position: relative;
  isolation: isolate;
  align-items: center;
  justify-content: center;
  text-align: center;
  display: inline-flex;
  font-family: var(--token-typography-display-400-font-family);
  font-weight: var(--token-typography-font-weight-regular);

  .draco-toggle__text {
    position: relative;
    display: flex;
  }
}

.draco-toggle__control {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  appearance: none;
}

.draco-toggle {
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  border-style: solid;
  border-width: 1px;
  border-radius: var(--token-border-radius-full);

  @media (prefers-reduced-motion: no-preference) {
    transition: {
      property: background-color;
      duration: 0.2s;
      timing-function: ease;
    }
  }
}

.draco-toggle__thumb {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--token-border-radius-full);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

  @media (prefers-reduced-motion: no-preference) {
    transition: {
      duration: 0.2s;
      property: transform;
      timing-function: ease;
    }
  }
}
