/* Convo Forms — Frontend (Classic Skin + v2 container helpers)
   This file provides minimal, theme-friendly defaults. Sites can override
   via their theme or additional plugin styles. */

/* Classic skin wrapper */
.cforms-form {
  max-width: 720px;
  margin: 0 auto;
}

/* Generic field styling (kept light to respect themes) */
.cforms-field {
  margin: 8px 0;
}
.cforms-field label {
  font-weight: 600;
  display: inline-block;
  margin-bottom: 4px;
}
.cforms-field input[type="text"],
.cforms-field input[type="email"],
.cforms-field input[type="number"],
.cforms-field input[type="url"],
.cforms-field textarea,
.cforms-field select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
}
.cforms-field.has-error input,
.cforms-field.has-error textarea,
.cforms-field.has-error select {
  border-color: #b30000;
  outline-color: #b30000;
}
.cforms-help {
  display: block;
  opacity: .75;
  margin-top: 4px;
  font-size: 0.92em;
}
.cforms-error {
  display: block;
  color: #b30000;
  margin-top: 4px;
  font-size: 0.92em;
}

/* Stepper + progress (shown when JS is present) */
.cforms-steps { position: relative; }
.cforms-step { display: block; }
.cforms-step[hidden] { display: none !important; }

.cforms-stepper {
  display: none;
  gap: 8px;
  justify-content: space-between;
  margin-top: 8px;
}
.cforms-progress {
  display: none;
  margin: 8px 0;
}
.cforms-progress-bar {
  height: 6px;
  background: #f1f1f1;
  border-radius: 6px;
  overflow: hidden;
}
.cforms-progress-bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: #2563eb;
  transition: width .25s ease;
}

/* JS-enabled hints (set in frontend.js) */
body.cforms-has-js .cforms-stepper { display: flex; }
body.cforms-has-js .cforms-progress { display: block; }

/* Save & Resume area */
.cforms-savewrap { margin-top: 8px; }
.cforms-saveresult .regular-text.cforms-savelink {
  width: 100%;
  max-width: 100%;
}

/* ---------- v2 Layout Helpers (Section / Column containers) ---------- */
.cforms-section { margin: 8px 0; }
.cforms-column  { display: block; }

/* Keep RTL consistent if no separate RTL file is loaded */
html[dir='rtl'] .cforms-form { direction: rtl; }

/* Buttons inherit WP styles; just a small nudge for spacing */
.cforms-submit-wrap .button { min-width: 120px; }
