/*
 * File: css/conf/02-components/11.forms.css
 * Logic: Global Form Elements & Inputs.
 * Refactored from: 07.comp-forms.css
 */

/* ==========================================================================
   1. LABELS & FIELDSETS
   ========================================================================== */
label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--text-body);
}

/* Required marker styling usually handled by Drupal class .form-required */
.form-required::after {
  content: "*";
  color: var(--color-error);
  margin-left: 0.2em;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

fieldset legend {
  display: block;
  width: 100%;
  font-family: var(--h-font-family);
  font-weight: var(--h-font-weight);
  font-size: var(--h3-size);
  margin-bottom: var(--space-md);
  color: var(--text-title);
}

/* ==========================================================================
   2. INPUTS & TEXTAREAS
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  border: var(--border-width-sm) solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  font-family: var(--p-font-family);
  font-size: var(--p-font-size);
  color: var(--text-body);
  background-color: var(--surface-bg);
  transition: border-color var(--transition-base),
    box-shadow var(--transition-base);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: var(--shadow-focus);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ==========================================================================
   3. CHECKBOXES & RADIOS
   ========================================================================== */
input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
  width: auto;
  margin-right: var(--space-xs);
  vertical-align: middle;
}

/* Wrapper for checkbox/radio to align with label */
.form-type-checkbox,
.form-type-radio {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.form-type-checkbox label,
.form-type-radio label {
  margin-bottom: 0;
  font-weight: 400;
}
