/* Calculator Form Inputs - Indie maker dark theme styling */

/* Dark theme dropdown styling with indie maker accent colors */
.form-input select, 
.form-input option,
select.form-input,
select.form-input option {
  background-color: #374151 !important;
  color: #f9fafb !important;
  border-color: #667eea !important; /* Indie purple border */
  transition: border-color 0.2s ease;
}

/* Focus states with indie maker colors */
.form-input select:focus,
select.form-input:focus {
  border-color: #10b981 !important; /* Indie green on focus */
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* Dropdown arrow styling */
select.form-input {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23f9fafb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
  background-position: right 0.5rem center !important;
  background-repeat: no-repeat !important;
  background-size: 1.5em 1.5em !important;
  padding-right: 2.5rem !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

/* Focus states for dark dropdowns */
select.form-input:focus {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15) !important;
}

/* Option styling for better contrast in dark theme */
select.form-input option {
  background-color: #374151 !important;
  color: #f9fafb !important;
  padding: 0.5rem !important;
}

select.form-input option:hover,
select.form-input option:focus {
  background-color: #4b5563 !important;
}

/* Ensure placeholder/prompt text is visible */
select.form-input option[value=""] {
  color: #9ca3af !important;
}

/* Enhanced slider styling for dark theme */
input[type="range"].form-input {
  width: 100% !important; /* Full width */
  height: 10px !important; /* Thicker track */
  background: #4b5563 !important; /* Darker track color */
  border-radius: 5px !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Webkit slider thumb */
input[type="range"].form-input::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 24px !important; /* Slightly larger thumb */
  height: 24px !important;
  border-radius: 50% !important;
  background: #8b5cf6 !important; /* Purple thumb to match accent */
  cursor: pointer !important;
  border: 3px solid #f9fafb !important; /* White border for contrast */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important; /* Darker shadow */
}

/* Firefox slider thumb */
input[type="range"].form-input::-moz-range-thumb {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: #8b5cf6 !important;
  cursor: pointer !important;
  border: 3px solid #f9fafb !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  -moz-appearance: none !important;
}

/* Webkit slider track */
input[type="range"].form-input::-webkit-slider-track {
  width: 100% !important;
  height: 10px !important;
  cursor: pointer !important;
  background: #4b5563 !important;
  border-radius: 5px !important;
}

/* Firefox slider track */
input[type="range"].form-input::-moz-range-track {
  width: 100% !important;
  height: 10px !important;
  cursor: pointer !important;
  background: #4b5563 !important;
  border-radius: 5px !important;
  border: none !important;
}

/* Focus state for sliders */
input[type="range"].form-input:focus {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25) !important;
}

/* Hover effect for slider thumb */
input[type="range"].form-input:hover::-webkit-slider-thumb {
  background: #a78bfa !important; /* Lighter purple on hover */
  transform: scale(1.1) !important;
  transition: all 0.2s ease !important;
}

input[type="range"].form-input:hover::-moz-range-thumb {
  background: #a78bfa !important;
  transform: scale(1.1) !important;
  transition: all 0.2s ease !important;
}

/* Dark theme checkbox and radio button styling */
input[type="checkbox"].form-checkbox,
input[type="radio"].form-radio {
  width: 18px !important;
  height: 18px !important;
  background-color: #374151 !important;
  border: 2px solid #4b5563 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  position: relative !important;
  transition: all 0.2s ease !important;
}

/* Radio buttons are circular */
input[type="radio"].form-radio {
  border-radius: 50% !important;
}

/* Checked state */
input[type="checkbox"].form-checkbox:checked {
  background-color: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
}

input[type="radio"].form-radio:checked {
  background-color: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
}

/* Checkmark for checkbox */
input[type="checkbox"].form-checkbox:checked::after {
  content: '✓' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: white !important;
  font-size: 12px !important;
  font-weight: bold !important;
}

/* Dot for radio button */
input[type="radio"].form-radio:checked::after {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 8px !important;
  height: 8px !important;
  background-color: white !important;
  border-radius: 50% !important;
}

/* Focus states */
input[type="checkbox"].form-checkbox:focus,
input[type="radio"].form-radio:focus {
  outline: none !important;
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25) !important;
}

/* Hover states */
input[type="checkbox"].form-checkbox:hover,
input[type="radio"].form-radio:hover {
  border-color: #6b7280 !important;
  background-color: #4b5563 !important;
}

/* Disabled states */
input[type="checkbox"].form-checkbox:disabled,
input[type="radio"].form-radio:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Label styling for better contrast and clickability */
.radio-item label,
.checkbox-item label {
  color: #f9fafb !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 4px !important;
  transition: background-color 0.2s ease !important;
  flex: 1 !important;
  margin-left: 0.5rem !important;
}

/* Hover effect for labels to show they're clickable */
.radio-item label:hover,
.checkbox-item label:hover {
  background-color: rgba(75, 85, 99, 0.3) !important;
}

/* Ensure labels work with checkboxes/radios */
.radio-item,
.checkbox-item {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  margin-bottom: 0.25rem !important;
  padding: 0.25rem !important;
  border-radius: 6px !important;
  transition: background-color 0.2s ease !important;
}

/* Hover effect for the entire checkbox/radio container */
.radio-item:hover,
.checkbox-item:hover {
  background-color: rgba(75, 85, 99, 0.2) !important;
}

/* Make sure the input and label are properly aligned */
.radio-item input[type="radio"],
.checkbox-item input[type="checkbox"] {
  margin-right: 0 !important;
  flex-shrink: 0 !important;
}