/*
  HPOS glass toggle — apply to all checkbox inputs in admin UIs.
  Wrap optional: <label class="checkbox-row glass-switch-row">…</label>
*/

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 24px;
  margin: 0;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(220, 230, 255, 0.88));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="checkbox"]:hover {
  border-color: rgba(158, 192, 255, 0.45);
  background: rgba(255, 255, 255, 0.09);
}

input[type="checkbox"]:checked {
  border-color: rgba(107, 155, 255, 0.75);
  background: linear-gradient(145deg, rgba(107, 155, 255, 0.55), rgba(139, 125, 255, 0.45));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 2px rgba(107, 155, 255, 0.16),
    0 6px 18px rgba(88, 120, 255, 0.25);
}

input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(107, 155, 255, 0.55);
  outline-offset: 2px;
}

input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.45;
}

.checkbox-row span {
  flex: 1;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

label.field.muted:has(input[type="checkbox"]),
label.muted:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 12px;
}

label.field.muted input[type="checkbox"],
label.muted input[type="checkbox"] {
  margin-right: 0;
}

.dunning-row input[type="checkbox"] {
  flex-shrink: 0;
}

.checkbox-row.compact {
  gap: 8px;
  font-size: 13px;
}
