/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* iOS-style sliding toggle */
.nibble-switch {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.75rem;
  flex-shrink: 0;
}

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

.nibble-switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d4d4d8;
  transition: background-color 0.2s ease;
  border-radius: 9999px;
}

.nibble-switch .slider::before {
  position: absolute;
  content: "";
  height: 1.375rem;
  width: 1.375rem;
  left: 0.1875rem;
  top: 0.1875rem;
  background-color: #fff;
  transition: transform 0.2s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
}

.nibble-switch input:checked + .slider {
  background-color: #18181b;
}

.nibble-switch input:checked + .slider::before {
  transform: translateX(1.25rem);
}

.nibble-switch input:focus-visible + .slider {
  outline: 2px solid #18181b;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
