/*
 * Toggle Switch Component
 */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-700);
  transition: background-color 0.2s ease;
  border-radius: 24px;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: transform 0.2s ease;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #10b981;
}

input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Focus state for accessibility */
input:focus-visible + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Toggle row: label on left, toggle on right */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  /* 44px min touch target */
  min-height: 52px;
}

.toggle-row-label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.toggle-row-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-200);
}

.toggle-row-desc {
  font-size: 0.8125rem;
  color: var(--gray-500);
}
