/*
 * Form Elements
 * Inputs, toggles, checkboxes, selects
 */

/* Form elements */
.form-demo {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
}

.input {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
}

.input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.input::placeholder {
  color: var(--text-secondary);
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Theme toggle */
/* Legacy theme toggle container - now using .navbar-toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.toggle-switch.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
}

.toggle-switch.active::after {
  transform: translateX(20px);
  background-color: #fff;
}

.toggle-label {
  color: var(--text-secondary);
  font-size: 12px;
}

/* Toggle Switches */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
}

.toggle-description {
  font-size: 12px;
  color: var(--text-secondary);
}

.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  transition: all 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  transition: all 0.2s;
}

.toggle input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background-color: #fff;
}

.toggle-row-disabled {
  opacity: 0.5;
}

.toggle-disabled {
  cursor: not-allowed;
}

/* Checkbox Lists */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.checklist-item:hover {
  background-color: var(--bg-tertiary);
}

.checklist-item input {
  display: none;
}

.checklist-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.checklist-item input:checked ~ .checklist-checkbox {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
}

.checklist-item input:checked ~ .checklist-checkbox::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.checklist-text {
  font-size: 14px;
}

.checklist-item-checked .checklist-text {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.selection-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
}

.selection-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.selection-item:hover {
  background-color: var(--bg-tertiary);
}

.selection-item input {
  display: none;
}

.selection-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.selection-item input:checked ~ .selection-checkbox {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
}

.selection-item input:checked ~ .selection-checkbox::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.selection-label {
  font-size: 14px;
}
