/* SWITCH */
.global-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}

.global-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* SLIDER */
.global-switch-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--color-switch-off);
  border-radius: 999px;
  transition: var(--transition-fast);
}

.global-switch-slider::before {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  background: var(--color-switch-thumb);
  border-radius: 50%;
  box-shadow: var(--shadow-xs);
  transition: var(--transition-fast);
}

/* ACTIVE */
.global-switch input:checked + .global-switch-slider {
  background: var(--color-switch-on);
}

.global-switch input:checked + .global-switch-slider::before {
  transform: translateX(22px);
}

/* ROW */
.global-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md-12);
}

/* DESCRIPTION */
.global-switch-description {
  margin-top: var(--space-xs-04);
  font-size: var(--font-sm-12);
  color: var(--color-text-secondary);
}

/* =====================================================
   SWITCH COMPACTO
===================================================== */

.global-switch-compacto {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}

.global-switch-compacto input {
  opacity: 0;
  width: 0;
  height: 0;
}

.global-switch-compacto-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  transition: 0.2s;
  border-radius: 999px;
}

.global-switch-compacto-slider:before {
  position: absolute;
  content: '';
  height: 14px;
  width: 14px;
  left: 2px;
  top: 2px;
  background: #ffffff;
  transition: 0.2s;
  border-radius: 50%;
}

.global-switch-compacto input:checked + .global-switch-compacto-slider {
  background: var(--color-primary);
}

.global-switch-compacto input:checked + .global-switch-compacto-slider:before {
  transform: translateX(16px);
}
