/* W5.1: themes, button styles, progress bar, rating, image layouts and the mobile layout of public forms, surveys and quizzes.
   Theme values arrive as custom properties on .rh-form-custom (the page sets them from the form's saved settings). Owner CSS is scoped to .rh-form-custom. */
.rh-form-custom { background: var(--rh-bg, transparent); color: var(--rh-text, inherit); box-sizing: border-box; max-width: 100%; }
.rh-form-custom h1, .rh-form-custom h2 { overflow-wrap: anywhere; }
.rh-form-custom input, .rh-form-custom select, .rh-form-custom textarea { max-width: 100%; box-sizing: border-box; }
.rh-form-custom button[type="submit"], .rh-form-custom .btn { background: var(--rh-primary, #1f2937); border-color: var(--rh-primary, #1f2937); color: #fff; }
.rh-form-custom.rh-btn-outline button[type="submit"], .rh-form-custom.rh-btn-outline .btn { background: transparent; color: var(--rh-primary, #1f2937); border: 2px solid var(--rh-primary, #1f2937); }
.rh-form-custom.rh-btn-pill button[type="submit"], .rh-form-custom.rh-btn-pill .btn { border-radius: 999px; }
.rh-progress { height: 8px; background: rgba(127, 127, 127, .25); border-radius: 999px; overflow: hidden; margin: 8px 0 12px; }
.rh-progress > span { display: block; height: 100%; width: 0; background: var(--rh-primary, #1f2937); transition: width .2s ease; }
.rh-rating { border: 0; padding: 0; margin: 0; }
.rh-rating .rh-stars { display: flex; flex-wrap: wrap; gap: 4px; }
.rh-rating .rh-stars label { display: inline-flex; align-items: center; gap: 2px; padding: 6px 10px; border: 1px solid rgba(127, 127, 127, .5); border-radius: 8px; min-height: 44px; min-width: 44px; justify-content: center; cursor: pointer; }
.rh-rating .rh-stars input:checked + span { font-weight: 700; color: var(--rh-primary, inherit); }
.rh-choices { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.rh-choices label { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.rh-msg { margin: 6px 0 0; padding: 8px 10px; border-left: 3px solid var(--rh-primary, #1f2937); background: rgba(127, 127, 127, .12); }
.rh-calc output { font-weight: 700; }
.rh-img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.rh-layout-left, .rh-layout-right { display: grid; gap: 16px; grid-template-columns: 1fr; }
.rh-save { margin-top: 8px; }
.rh-resume { word-break: break-all; }
@media (min-width: 700px) {
  .rh-layout-left { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .rh-layout-right { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .rh-layout-right > .rh-img-col { order: 2; }
}
.rh-form-custom[data-mobile-preview] { max-width: 390px; margin-left: auto; margin-right: auto; }
