/* Forms, Piecewise Range Sliders, Chips & Inputs */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: var(--ab-text-xs);
  font-weight: 700;
  color: var(--ab-brand-primary);
  display: flex;
  justify-content: space-between;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--ab-radius-sm);
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--ab-brand-primary);
  font-size: var(--ab-text-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--ab-brand-accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
  background: #ffffff;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* Range Slider Group */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slider-inputs-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-val-badge {
  font-size: var(--ab-text-xs);
  font-weight: 700;
  color: var(--ab-brand-accent);
}

/* Range Track */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ab-brand-accent);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.4);
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Multi-select Chips */
.chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-item {
  position: relative;
}

.chip-item input[type="checkbox"],
.chip-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip-label {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--ab-radius-pill);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: var(--ab-text-xs);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.chip-item input:checked + .chip-label {
  background: var(--ab-brand-primary);
  color: #ffffff;
  border-color: var(--ab-brand-primary);
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

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

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

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

input:checked + .toggle-slider {
  background-color: var(--ab-brand-accent);
}

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

/* Honeypot Trap Field (Security) */
.hp-field {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Validation Error Text */
.field-error-text {
  font-size: 11px;
  color: #dc2626;
  font-weight: 600;
  margin-top: 2px;
}
