/* form.css — form grid, fields, labels, hints, actions, checkboxes, toggles */

/* ---- form grid ---- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

/* ---- field ---- */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ---- label ---- */
.form-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text2);
}

.form-label .required {
  color: var(--red);
  margin-left: 2px;
}

/* ---- hint & error ---- */
.form-hint {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.4;
}

.form-error {
  font-size: 11px;
  color: var(--red);
  line-height: 1.4;
}

/* ---- error state on inputs ---- */
input.error,
select.error,
textarea.error {
  border-color: var(--red);
}

input.error:focus,
select.error:focus,
textarea.error:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red-dim);
}

/* ---- form actions ---- */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  grid-column: 1 / -1;
}

/* ---- section title ---- */
.form-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text3);
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  grid-column: 1 / -1;
}

/* ---- checkbox group ---- */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border2);
  background: var(--bg);
  cursor: pointer;
  flex-shrink: 0;
  appearance: none;
  position: relative;
}

.checkbox-item input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

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

/* ---- form toggle row ---- */
.form-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
}

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

.form-toggle-label span:first-child {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.form-toggle-label span:last-child {
  font-size: 11px;
  color: var(--text3);
}
