/* =====================================================
   ENGINE REGISTRATION FORM – FINAL COMPACT CSS (FIXED)
   - Removes extra blank gaps between fields
   - Hides empty error rows
   - Tight vertical + horizontal spacing
===================================================== */

/* ---------- GLOBAL RESET ---------- */
.erf-wrap,
.erf-wrap * {
  box-sizing: border-box;
}

.erf-wrap h1,
.erf-wrap h2,
.erf-wrap h3,
.erf-wrap h4,
.erf-wrap p,
.erf-wrap small,
.erf-wrap label {
  margin: 0;
  padding: 0;
}

/* Kill any theme input margins inside the form */
.erf-wrap input,
.erf-wrap select,
.erf-wrap textarea {
  margin: 0 !important;
}

/* ---------- WRAPPER ---------- */
.erf-wrap {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 12px;
}

/* ---------- TITLES ---------- */
.erf-title {
  font-size: 36px;
  margin-bottom: 10px;
}

.erf-subtitle {
  font-size: 18px;
  font-weight: 700;
  margin: 10px 0 6px;
}

/* ---------- CARD ---------- */
.erf-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

/* ---------- GRID ---------- */
.erf-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 5px;      /* control vertical spacing here */
  column-gap: 16px;   /* control horizontal spacing here */
  width: 100%;
}

@media (min-width: 880px) {
  .erf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.erf-span-2 {
  grid-column: span 2;
}

/* ---------- FIELD ---------- */
.erf-field {
  width: 100%;
}

.erf-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.2;
}

.erf-field input,
.erf-field select {
  width: 100%;
  background: #f5f5f5;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  min-height: 40px;
  outline: none;
}

.erf-field input:focus,
.erf-field select:focus {
  background: #fff;
  border-color: rgba(0,0,0,0.35);
}

/* Remove placeholders (you requested no placeholders) */
.erf-form ::placeholder {
  color: transparent;
}

/* ---------- REQUIRED / HELP ---------- */
.erf-required {
  color: #cc0000;
  font-weight: 700;
}

.erf-help {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  opacity: 0.7;
  line-height: 1.2;
}

/* ---------- THE FIX: ERROR SPACING ---------- */
/* Default: remove reserved height completely */
.erf-inline-error {
  margin-top: 4px;
  font-size: 12px;
  color: #cc0000;
  line-height: 1.2;
}

/* Hide empty error divs so they do NOT create blank gaps */
.erf-inline-error:empty {
  display: none !important;
}

/* ---------- RADIO (Customer Type) ---------- */
.erf-radio {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 6px;
}

.erf-radio label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.erf-radio input[type="radio"] {
  appearance: auto !important;
  -webkit-appearance: auto !important;
  width: auto !important;
  height: auto !important;
}

/* ---------- TYPE STRIP ---------- */
.erf-type-strip {
  display: flex;
  gap: 10px;
  margin: 8px 0 10px;
  flex-wrap: wrap;
}

.erf-type-strip span {
  border: 1px solid rgba(0,0,0,0.18);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0.8;
}

.erf-type-strip span.active {
  font-weight: 700;
  opacity: 1;
}

/* ---------- CHECKBOX ---------- */
.erf-accept {
  margin-top: 10px;
}

.erf-accept label {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 14px;
  line-height: 1.3;
}

.erf-accept input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: auto !important;
  width: auto !important;
  height: auto !important;
  margin-top: 3px !important;
}

/* ---------- BUTTON ---------- */
.erf-actions {
  margin-top: 12px;
}

.erf-submit {
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

/* ---------- ALERTS ---------- */
.erf-alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.erf-alert-success {
  background: #e9f7ef;
  border: 1px solid #bfe7d1;
}

.erf-alert-error {
  background: #fdecec;
  border: 1px solid #f4bcbc;
}

/* ---------- VISIBILITY ---------- */
.erf-part2[hidden],
.erf-block[hidden] {
  display: none !important;
}

/* ---------- MOBILE ---------- */
@media (max-width: 640px) {
  .erf-title { font-size: 28px; }
  .erf-card { padding: 12px; }
}


/* Make privacy statement link clearly look like a link */
.erf-accept a{ text-decoration: underline; cursor: pointer; }
