import { css } from "lit";
const componentStyle = css`
          * {
            -webkit-tap-highlight-color: transparent;
          }

* {
  box-sizing: border-box;
  user-select: none;
}

:host {
  display: block;
}

.outer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: var(--ui-components-start-stop-switch-touch-target-size);
  justify-content: center;
}

.wrapper {
  position: relative;
  width: 100%;

  /* Focus styling on the wrapper */
}

.wrapper:focus-visible {
    outline-width: var(--global-size-spacing-border-weight-focusframe, 2px);
    outline-color: var(--border-focus-color);
    outline-style: solid;
    outline-offset: 1px;
    border-radius: var(--ui-components-start-stop-switch-border-radius);
  }

.wrapper:focus-visible .button-track-checked {
      border: none;
    }

/* Size variants - button track heights */

.wrapper.size-regular .button-track {
  height: var(--ui-components-start-stop-switch-visual-target-size);
}

.wrapper.size-large .button-track {
  height: var(--ui-components-start-stop-switch-touch-target-size);
}

.button-track {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  border-radius: var(--ui-components-start-stop-switch-border-radius);
}

.button-track {
            border-color: var(--indent-enabled-border-color);
            background-color: var(--indent-enabled-background-color);
            border-width: 1px;
            border-style: solid;
            --base-border-color: var(--indent-enabled-border-color);
            --base-background-color: var(--indent-enabled-background-color);
}

.button-track .button-track-checked {
    position-anchor: --thumb;
    box-sizing: border-box;
    position: absolute;
    left: -1px; /* Compensate for border to align flush with track edge */
    right: anchor(center);
    top: 0;
    bottom: 0;
    border-radius: var(--ui-components-start-stop-switch-border-radius);
  }

:is(.button-track .button-track-checked) {
            border-color: var(--selected-enabled-border-color);
            background-color: var(--selected-enabled-background-color);
            border-width: 1px;
            border-style: solid;
            --base-border-color: var(--selected-enabled-border-color);
            --base-background-color: var(--selected-enabled-background-color);
}

/* Variant: running - green overlay */

.wrapper.variant-running .button-track .button-track-checked {
  background: var(--running-enabled-background-color);
  border-color: var(--running-enabled-border-color);
}

.wrapper.variant-running .state.checked {
  color: var(--on-running-active-color);
}

/* Variant: loading - light blue overlay */

.wrapper.variant-loading .button-track .button-track-checked {
  background: var(--amplified-enabled-background-color);
  border-color: var(--amplified-enabled-border-color);
}

.wrapper.variant-loading .state.checked {
  color: var(--on-amplified-neutral-color);
}

.state {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  position-anchor: --thumb;
  width: calc(100% - anchor-size(width));
  top: 0;
  bottom: 0;
}

.state-label {
  padding: 0px var(--ui-components-start-stop-switch-label-spacing);
  white-space: nowrap;
}

/* State icon slots - only target direct slotted children of .state, not those inside .state-label */

.state > ::slotted(*) {
  width: var(--ui-components-start-stop-switch-icon-size);
  height: var(--ui-components-start-stop-switch-icon-size);
}

.checked.state {
  left: 0;
  font-family: var(--font-family-main);
  font-weight: var(--font-weight-bold);
  font-size: var(--global-typography-ui-body-active-font-size);
  line-height: var(--global-typography-ui-body-active-line-height);
  font-feature-settings:
    "liga" off,
    "clig" off,
    "ss04" on;
  color: var(--on-selected-active-color);
}

.unchecked:not(.tmp-checked) .state.checked,
.tmp-unchecked .state.checked {
  display: none;
}

.checked:not(.tmp-unchecked) .state.unchecked,
.tmp-checked .state.unchecked {
  display: none;
}

.unchecked.state {
  right: 0;
  font-family: var(--font-family-main);
  font-weight: var(--global-typography-ui-body-font-weight);
  font-size: var(--global-typography-ui-body-font-size);
  line-height: var(--global-typography-ui-body-line-height);
  font-feature-settings:
    "liga" off,
    "clig" off,
    "ss04" on;
  color: var(--on-indent-active-color);
}

.button {
            cursor: pointer;
}

.button:focus {
            outline: none;
}

.button .button-visible {
            border-color: var(--thumb-enabled-border-color);
            background-color: var(--thumb-enabled-background-color);
            border-width: 1px;
            border-style: solid;
            cursor: pointer;
            --base-border-color: var(--thumb-enabled-border-color);
            --base-background-color: var(--thumb-enabled-background-color);
}

.button.activated .button-visible {
            border-color: var(--thumb-activated-border-color);
            background-color: var(--thumb-activated-background-color);
            --base-border-color: var(--thumb-activated-border-color);
            --base-background-color: var(--thumb-activated-background-color);
}

@media (hover:hover) {

.button:hover .button-visible {
                        border-color: color-mix(in srgb, var(--thumb-hover-border-color) calc(var(--obc-can-hover) * 100%), var(--base-border-color));
                        background-color: color-mix(in srgb, var(--thumb-hover-background-color) calc(var(--obc-can-hover) * 100%), var(--base-background-color));
            }
}

.button:active .button-visible {
            border-color: var(--thumb-pressed-border-color);
            background-color: var(--thumb-pressed-background-color);
}

.button:focus-visible .button-visible {
            outline-color: var(--border-focus-color);
            outline-width: var(--global-size-spacing-border-weight-focusframe);
            outline-style: solid;
            border-color: var(--container-global-color);
            z-index: 1;
}

.button:disabled .button-visible {
            border-color: var(--thumb-disabled-border-color);
            background-color: var(--thumb-disabled-background-color);
            cursor: not-allowed;
            color: var(--on-thumb-disabled-color) !important;
}

.button.disabled .button-visible {
            border-color: var(--thumb-disabled-border-color);
            background-color: var(--thumb-disabled-background-color);
            cursor: not-allowed;
            color: var(--on-thumb-disabled-color) !important;
}

.button:disabled {
            cursor: not-allowed;
}

.button.disabled {
            cursor: not-allowed;
}

.button {
  z-index: 1;
  height: var(--ui-components-start-stop-switch-touch-target-size);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  width: fit-content;
  justify-content: center;
  align-items: center;

  padding: 0;
  background: transparent;
  border: none;
  min-width: var(--ui-components-start-stop-switch-touch-target-size);
  cursor: grab;

  transition:
    left 0.1s ease-in-out,
    right 0.1s ease-in-out,
    width 0.2s ease-in-out;

  /* Remove focus styling from button - focus is shown on wrapper instead */
}

.button:focus-visible {
    outline: none;
    box-shadow: none;
  }

/* Prevent any visual changes on active/pressed state */

.button:active {
    cursor: grabbing;
  }

/* Button position: -1px compensates for border to align flush with track edge */

.unchecked .button {
  left: -1px;
}

.checked .button {
  right: -1px;
}

.button-visible {
  anchor-name: --thumb;
  display: flex;
  align-items: center;
  padding: 0px var(--ui-components-start-stop-switch-padding-horizontal);
  border-radius: var(--ui-components-state-toggle-border-radius);
  font-family: var(--font-family-main);
  font-weight: var(--global-typography-ui-button-font-weight);
  font-size: var(--global-typography-ui-button-font-size);
  line-height: var(--global-typography-ui-button-line-height);
  font-feature-settings:
    "liga" off,
    "clig" off,
    "ss04" on;
  color: var(--on-thumb-active-color);
}

/* Size variants for button-visible height */

.wrapper.size-regular .button-visible {
  height: var(--ui-components-start-stop-switch-visual-target-size);
}

.wrapper.size-large .button-visible {
  height: var(--ui-components-start-stop-switch-touch-target-size);
}

.unchecked .button-visible {
  flex-direction: row-reverse;
}

.checked .button-visible {
  flex-direction: row;
}

.button-icon {
  width: var(--ui-components-start-stop-switch-icon-size);
  height: var(--ui-components-start-stop-switch-icon-size);
}

.checked .button-icon {
  transform: rotate(180deg);
}

.button-label {
  padding: 0px var(--ui-components-start-stop-switch-label-spacing);
}

/* Disabled state - base (off) */

:is(.wrapper.disabled .button-track) {
            border-color: var(--indent-enabled-border-color);
            background-color: var(--indent-enabled-background-color);
            border-width: 1px;
            border-style: solid;
            --base-border-color: var(--indent-enabled-border-color);
            --base-background-color: var(--indent-enabled-background-color);
}

.wrapper.disabled .button-track {
  background: var(--indent-disabled-background-color);
  border-color: var(--indent-disabled-border-color);
}

/* Hide the button visually when disabled, but keep it in DOM for accessibility */

.wrapper.disabled .button {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrapper.disabled .state {
  position: relative;
  width: 100%;
  height: 100%;
  align-items: center;
  left: auto;
  right: auto;
  font-family: var(--font-family-main);
  font-weight: var(--global-typography-ui-body-font-weight);
  font-size: var(--global-typography-ui-body-font-size);
  line-height: var(--global-typography-ui-body-line-height);
  font-feature-settings:
    "liga" off,
    "clig" off,
    "ss04" on;
  color: var(--on-indent-disabled-color);
}

.wrapper.disabled .state.unchecked {
  display: flex;
  justify-content: center;
}

.wrapper.disabled .state.checked {
  display: none;
}

.wrapper.disabled.checked .state.checked {
  display: flex;
  justify-content: center;
}

.wrapper.disabled.checked .state.unchecked {
  display: none;
}

/* Disabled + checked + normal variant: gray filled background */

.wrapper.disabled.checked.variant-normal .button-track {
  background: var(--selected-disabled-background-color);
  border-color: var(--selected-disabled-border-color);
}

.wrapper.disabled.checked.variant-normal .state.checked {
  font-family: var(--font-family-main);
  font-weight: var(--font-weight-bold);
  font-size: var(--global-typography-ui-body-active-font-size);
  line-height: var(--global-typography-ui-body-active-line-height);
  font-feature-settings:
    "liga" off,
    "clig" off,
    "ss04" on;
  color: var(--on-selected-disabled-color);
}

/* Disabled + checked + running variant: green filled background */

.wrapper.disabled.checked.variant-running .button-track {
  background: var(--running-disabled-background-color);
  border-color: var(--running-disabled-border-color);
}

.wrapper.disabled.checked.variant-running .state.checked {
  font-family: var(--font-family-main);
  font-weight: var(--font-weight-bold);
  font-size: var(--global-typography-ui-body-active-font-size);
  line-height: var(--global-typography-ui-body-active-line-height);
  font-feature-settings:
    "liga" off,
    "clig" off,
    "ss04" on;
  color: var(--on-running-disabled-color);
}

/* Disabled + checked + loading variant: gray filled background with neutral text */

.wrapper.disabled.checked.variant-loading .button-track {
  background: var(--selected-disabled-background-color);
  border-color: var(--selected-disabled-border-color);
}

.wrapper.disabled.checked.variant-loading .state.checked {
  font-family: var(--font-family-main);
  font-weight: var(--font-weight-bold);
  font-size: var(--global-typography-ui-body-active-font-size);
  line-height: var(--global-typography-ui-body-active-line-height);
  font-feature-settings:
    "liga" off,
    "clig" off,
    "ss04" on;
  color: var(--on-indent-neutral-color);
}

/* Alert frame */

.alert-frame {
  position: absolute;
  inset: -1px;
  z-index: 10;
  border: var(--global-size-and-spacing-border-weight-alertframe, 4px) solid
    var(--alert-alarm-color);
  border-radius: var(--app-components-alert-frame-border-radius-top-left, 6px)
    var(--app-components-alert-frame-border-radius-top-right, 6px)
    var(--app-components-alert-frame-border-radius-bottom-right, 6px)
    var(--app-components-alert-frame-border-radius-bottom-left, 6px);
  pointer-events: none;
}

/* Description */

.description {
  font-family: var(--font-family-main);
  font-weight: var(--font-weight-regular);
  font-size: var(--global-typography-ui-label-font-size);
  line-height: var(--global-typography-ui-label-line-height);
  font-feature-settings:
    "liga" off,
    "clig" off,
    "ss04" on;
  width: 100%;
  color: var(--element-neutral-color);
  padding-top: var(--ui-components-start-stop-switch-description-spacing);
  text-align: center;
}

.wrapper.disabled ~ .description {
  color: var(--element-disabled-color);
}
`;
export {
  componentStyle as default
};
//# sourceMappingURL=start-stop-switch.css.js.map
