/*
 * 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.
 */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Radio button and checkbox styles for light/dark mode */
input[type="radio"],
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid #d1d5db; /* gray-300 */
  background-color: white;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"] {
  border-radius: 0.25rem;
}

/* Dark mode unchecked state */
.dark input[type="radio"],
.dark input[type="checkbox"] {
  border-color: #6b7280; /* gray-500 */
  background-color: #374151; /* gray-700 */
}

/* Hover states */
input[type="radio"]:hover,
input[type="checkbox"]:hover {
  border-color: #0d9488; /* brand-600 */
}

/* Checked state */
input[type="radio"]:checked,
input[type="checkbox"]:checked {
  background-color: #0d9488; /* brand-600 */
  border-color: #0d9488; /* brand-600 */
}

/* Radio button checked indicator */
input[type="radio"]:checked::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: white;
}

/* Checkbox checked indicator */
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 0.0625rem;
  width: 0.3125rem;
  height: 0.5625rem;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Focus states */
input[type="radio"]:focus,
input[type="checkbox"]:focus {
  outline: 2px solid #14b8a6; /* brand-500 */
  outline-offset: 2px;
}
