/**
 * IVA Test Fee on/off switch (calculator).
 */

.ds-calc-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.ds-calc-switch__label {
  font: inherit;
  color: inherit;
}

.ds-calc-switch__control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ds-calc-switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ds-calc-switch__track {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #c5c5c5;
  transition: background-color 0.2s ease;
}

.ds-calc-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.ds-calc-switch__input:checked + .ds-calc-switch__track {
  background: #2bb673;
}

.ds-calc-switch__input:checked + .ds-calc-switch__track .ds-calc-switch__thumb {
  transform: translateX(20px);
}

.ds-calc-switch__input:focus-visible + .ds-calc-switch__track {
  outline: 2px solid #2bb673;
  outline-offset: 2px;
}

.ds-calc-switch__state {
  position: relative;
  min-width: 1.75em;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #666;
}

.ds-calc-switch__on {
  display: none;
}

.ds-calc-switch__off {
  display: inline;
}

.ds-calc-switch__input:checked ~ .ds-calc-switch__state {
  color: #2bb673;
}

.ds-calc-switch__input:checked ~ .ds-calc-switch__state .ds-calc-switch__on {
  display: inline;
}

.ds-calc-switch__input:checked ~ .ds-calc-switch__state .ds-calc-switch__off {
  display: none;
}

.calc-row--iva .calc-label {
  display: flex;
  align-items: center;
}

@media (hover: hover) and (pointer: fine) {
  .ds-calc-switch__advice_wrap:hover .ds-calc-switch__advice {
    visibility: visible;
  }
}

.ds-calc-switch__advice_wrap.is-open .ds-calc-switch__advice {
  visibility: visible;
}
