/* Compact explanation preference on the page-selection toolbar. */
.pdf-gallery-explain {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
}

.pdf-gallery-explain__control {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex: none;
}

.pdf-gallery-explain__control input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.pdf-gallery-explain__track {
  position: absolute;
  inset: 0;
  background: var(--color-border-strong, #cbd5e1);
  border-radius: 999px;
  transition: background 0.15s ease;
}

.pdf-gallery-explain__track::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
  transition: transform 0.15s ease;
}

.pdf-gallery-explain__control input:checked + .pdf-gallery-explain__track {
  background: var(--color-primary-500, #2563eb);
}

.pdf-gallery-explain__control input:checked + .pdf-gallery-explain__track::before {
  transform: translateX(16px);
}

.pdf-gallery-explain__control input:focus-visible + .pdf-gallery-explain__track {
  outline: 2px solid var(--color-primary-500, #2563eb);
  outline-offset: 2px;
}
