/**
* Switch Component Styles
* 
* Styling Approach
* ----------------
* - **Design Tokens**: Uses `@infineon/design-system-tokens` for consistent spacing, colors
* - **SCSS**: Compiled by Stencil's SASS plugin (configured in stencil.config.ts)
* - **Shadow DOM**: Styles are scoped via Shadow DOM, `:host` targets the component root
* - **BEM-like naming**: `.switch__element` pattern for component-scoped class names
*/
:host {
  display: inline-block;
  user-select: none;
}

.container {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.container.gap {
  gap: 16px;
}

.switch__checkbox-container {
  padding: 4px;
  display: flex;
  align-items: center;
  position: relative;
  width: 32px;
  height: 16px;
  background-color: #ffffff;
  border: 1px solid #575352;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  outline: none;
}
.switch__checkbox-container:focus {
  outline: 4px solid #0a8276;
  outline-offset: 2px;
}
.switch__checkbox-container:focus:not(:focus-visible) {
  outline: none;
}
.switch__checkbox-container:focus-visible {
  outline: 2px solid #0a8276;
  outline-offset: 2px;
}
.switch__checkbox-container.disabled {
  cursor: default;
  border-color: #bfbbbb;
}

.switch__label-wrapper {
  font-family: var(--ifx-font-family);
  color: #1d1d1d;
}
.switch__label-wrapper label:hover {
  cursor: pointer;
}
.switch__label-wrapper.disabled {
  color: #bfbbbb;
}
.switch__label-wrapper.disabled label:hover {
  cursor: default;
}
.switch__label-wrapper.readOnly {
  color: #575352;
}
.switch__label-wrapper.readOnly label:hover {
  cursor: default;
}

.switch__checkbox-wrapper .switch {
  width: 16px;
  height: 16px;
  background-color: #575352;
  border-radius: 50%;
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.switch__checkbox-wrapper .switch.disabled {
  background-color: #bfbbbb;
  border-color: #bfbbbb;
  cursor: default;
}
.switch__checkbox-wrapper .switch.checked {
  transform: translateX(16px);
  background-color: #ffffff;
}
.switch__checkbox-wrapper .switch.checked.disabled {
  cursor: default;
}

.switch__checkbox-container:hover .toggle-switch {
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.switch__checkbox-container.checked {
  background-color: #0a8276;
  border-color: #0a8276;
}
.switch__checkbox-container.checked.disabled {
  background-color: #bfbbbb;
  border-color: #bfbbbb;
  cursor: default;
}
.switch__checkbox-container.checked.readOnly {
  background-color: #575352;
  border-color: #575352;
}

.switch__checkbox-container.readOnly {
  border-color: #bfbbbb;
  cursor: default;
}