/* Basic HTML Structure */
html {
  height: auto;
  width: 450px;
}

/* Checkbox Styling (Hidden) */
input[type="checkbox"] {
  display: none;
}

/* Toggle Switch Container */
.toggleContainer {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 18px;
}

/* Toggle Slider */
.switch input:checked + .slider {
  background-color: #4CAF50; /* Green for active */
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #999; /* Consistent grey when off */
  transition: 0.4s;
  border-radius: 50px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  border-radius: 50%;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
}

input:checked + .slider:before {
  transform: translateX(12px);
}

/* Toggle Label */
.toggleLabel {
  margin-left: 10px;
  font-size: 14px;
  line-height: 18px;
  color: #333;
}

/* Button Styling */
button {
  background-color: #999; /* Consistent grey */
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
  margin-top: 10px;
}

button:hover {
  background-color: #bbb; /* Slightly darker grey on hover */
}

/* Slider Container */
.sliderContainer {
  margin-bottom: 10px;
}

/* Label and Slider Wrapper */
.label-and-slider {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
}

/* Slider Label */
.sliderLabel {
  font-size: 14px;
  color: #333;
  margin-bottom: 5px;
}

/* Input Slider */
input[type="range"] {
  appearance: none;
  width: 100%;
  height: 4px;
  background: #999; /* Consistent grey for slider track */
  border-radius: 4px;
  outline: none;
  transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: #999; /* Green for active slider thumb */
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background-color: #777;
}

/* Details Dropdown */
details {
  margin-top: 10px;
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
}

details summary:hover {
  background-color: #bbb; /* Darker grey on hover */
}


details[open] {
  border-color: #999;
}

details summary {
  font-weight: bold;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 10px;
  background-color: #999; /* Consistent grey */
  color: white;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

details summary::after {
  content: "\25BC"; /* Downward arrow */
  font-size: 12px;
  margin-left: 6px;
  transition: transform 0.4s ease;
}

details[open] summary::after {
  transform: rotate(-180deg);
}


/* Course Registry Container */
#courseRegistryContainer {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease, padding 0.6s ease;
  padding: 0 10px;
  width: 100%;
  margin-bottom: 10px;
}


details[open] #courseRegistryContainer {
  max-height: 500px;
  padding-top: 8px;
}

/* Course Item */
.course-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

/* Course Name */
.course-name {
  text-align: left;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
  flex-shrink: 0;
}

/* Course Input */
.course-input {
  width: 50px;
  text-align: center;
  color: black;
  border: 1px solid #bbb;
  border-radius: 5px;
}

/* Image Padding */
img {
  margin-top: 10px;
}

/* Course registry checkbox override (global rule hides all checkboxes) */
.course-item input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #bbb;
  border-radius: 3px;
  background: white;
  cursor: pointer;
  position: relative;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
  transition: all 0.2s ease;
}

.course-item input[type="checkbox"]:checked {
  background-color: #777;
  border-color: #777;
}

.course-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.empty-tracked-courses {
  color: #666;
  font-style: italic;
  font-size: 13px;
  padding: 8px 0;
  text-align: center;
}

