.qflow-sample-showcase {
  --demo-ink: #183548;
  --demo-accent: #126b69;
  --demo-soft: #edf7f5;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 880px;
  margin: 28px auto 56px;
  color: var(--demo-ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.qflow-sample-showcase *,
.qflow-sample-showcase *::before,
.qflow-sample-showcase *::after {
  box-sizing: border-box;
}
.qflow-sample-showcase .qflow-demo-intro {
  margin-bottom: 28px;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid #cce4df;
  border-radius: 18px;
  background: linear-gradient(125deg, #edf7f5, #f7fafc);
}
.qflow-sample-showcase .qflow-demo-eyebrow {
  margin: 0 0 12px;
  color: #12615f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
}
.qflow-sample-showcase .qflow-demo-intro h2 {
  margin: 0 0 14px;
  color: var(--demo-ink);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}
.qflow-sample-showcase .qflow-demo-intro p:last-child {
  margin-bottom: 0;
}
.qflow-sample-showcase .qflow-demo-note {
  padding-top: 16px;
  border-top: 1px solid #cce0db;
  font-size: 14px;
}
.qflow-sample-showcase .qflow-demo-section {
  margin: 0 0 24px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid #dce5ea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 20px rgb(24 53 72 / 4%);
}
.qflow-sample-showcase .webform-section-title {
  margin: 0 0 24px;
  padding: 0 0 16px;
  border-bottom: 1px solid #e5eded;
  color: var(--demo-accent);
  font-size: 20px;
  line-height: 1.4;
}
.qflow-sample-showcase .form-item,
.qflow-sample-showcase fieldset {
  min-width: 0;
  margin: 0 0 28px;
}
.qflow-sample-showcase .webform-section-wrapper > :last-child {
  margin-bottom: 0;
}
.qflow-sample-showcase label,
.qflow-sample-showcase .fieldset-legend {
  color: var(--demo-ink);
  font-size: 16px;
  font-weight: 600;
}
.qflow-sample-showcase fieldset {
  padding: 0;
  border: 0;
  background: transparent;
}
.qflow-sample-showcase legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 16px;
  line-height: 1.5;
}
.qflow-sample-showcase .description,
.qflow-sample-showcase .webform-element-description {
  margin-top: 8px;
  color: #536772;
  font-size: 14px;
  line-height: 1.5;
}
.qflow-sample-showcase input[type="text"],
.qflow-sample-showcase input[type="date"],
.qflow-sample-showcase input[type="number"],
.qflow-sample-showcase select,
.qflow-sample-showcase textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  margin-top: 9px;
  padding: 11px 14px;
  border: 1px solid #aebfc8;
  border-radius: 9px;
  background-color: #fff;
  color: var(--demo-ink);
  font: inherit;
  font-size: 16px;
}
.qflow-sample-showcase input[type="number"] {
  max-width: 170px;
}
.qflow-sample-showcase input[type="date"] {
  max-width: 290px;
}
.qflow-sample-showcase textarea {
  resize: vertical;
}
.qflow-sample-showcase input:focus-visible,
.qflow-sample-showcase select:focus-visible,
.qflow-sample-showcase textarea:focus-visible,
.qflow-sample-showcase button:focus-visible {
  outline: 3px solid #78bcb1;
  outline-offset: 3px;
}
/* Native checkbox behavior with an accessible, generous on/off switch. */
.qflow-sample-showcase .qflow-demo-toggle {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
}
.qflow-sample-showcase .qflow-demo-toggle > .description {
  grid-column: 1 / -1;
}
.qflow-sample-showcase input.qflow-demo-switch {
  display: inline-block;
  position: relative;
  width: 64px;
  height: 44px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #687e89;
  border-radius: 24px;
  background: #dce5ea;
  vertical-align: middle;
  cursor: pointer;
  touch-action: manipulation;
}
.qflow-sample-showcase input.qflow-demo-switch::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 32px;
  height: 32px;
  border: 1px solid #687e89;
  border-radius: 50%;
  background: #fff;
}
.qflow-sample-showcase input.qflow-demo-switch:checked {
  border-color: var(--demo-accent);
  background: var(--demo-accent);
}
.qflow-sample-showcase input.qflow-demo-switch:checked::before {
  transform: translateX(20px);
}
.qflow-sample-showcase .qflow-demo-toggle label {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  vertical-align: middle;
  cursor: pointer;
}
@media (forced-colors: active) {
  .qflow-sample-showcase input.qflow-demo-switch {
    appearance: auto;
    -webkit-appearance: auto;
  }
  .qflow-sample-showcase input.qflow-demo-switch::before {
    content: none;
  }
}
/* Large, fully tappable options; keep the native radio/checkbox semantics. */
.qflow-sample-showcase .webform-options-display-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.qflow-sample-showcase .webform-options-display-buttons-wrapper {
  min-width: 0;
  margin: 0;
}
.qflow-sample-showcase .webform-options-display-buttons .form-item {
  display: flex;
  height: 100%;
  margin: 0;
}
.qflow-sample-showcase .webform-options-display-buttons label.webform-options-display-buttons-label {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px;
  border: 2px solid #c5d3da;
  border-radius: 10px;
  color: var(--demo-ink);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.qflow-sample-showcase .webform-options-display-buttons input + label::before {
  content: "";
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 2px solid #687e89;
  border-radius: 4px;
  background: #fff;
  color: #fff;
  font-size: 16px;
  line-height: 18px;
  text-align: center;
}
.qflow-sample-showcase .webform-options-display-buttons input[type="radio"] + label::before {
  border-radius: 50%;
}
.qflow-sample-showcase .webform-options-display-buttons input:checked + label.webform-options-display-buttons-label {
  border-color: var(--demo-accent);
  background: var(--demo-soft);
  color: #0c5251;
}
.qflow-sample-showcase .webform-options-display-buttons input:checked + label::before {
  border-color: var(--demo-accent);
  background: var(--demo-accent);
}
.qflow-sample-showcase .webform-options-display-buttons input[type="checkbox"]:checked + label::before {
  content: "✓";
}
.qflow-sample-showcase .webform-options-display-buttons input[type="radio"]:checked + label::before {
  box-shadow: inset 0 0 0 4px #fff;
}
.qflow-sample-showcase .webform-options-display-buttons input:focus + label.webform-options-display-buttons-label,
.qflow-sample-showcase .webform-scale-options input:focus + label {
  outline: 3px solid #78bcb1;
  outline-offset: 3px;
  box-shadow: none;
}
/* Preserve page scrolling while giving the slider a generous touch area. */
.qflow-sample-showcase input[type="range"] {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 44px;
  margin: 10px 0 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  touch-action: pan-y;
}
.qflow-sample-showcase input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: #c7ded9;
}
.qflow-sample-showcase input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -10px;
  -webkit-appearance: none;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--demo-accent);
  box-shadow: 0 0 0 1px var(--demo-accent);
}
.qflow-sample-showcase input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: #c7ded9;
}
.qflow-sample-showcase input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--demo-accent);
  box-shadow: 0 0 0 1px var(--demo-accent);
}
/* The module updates the value; keep it in normal flow above the help text. */
.qflow-sample-showcase .form-type-range output {
  position: static;
  width: fit-content;
  margin: 4px 0 10px;
  padding: 4px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--demo-soft);
  color: var(--demo-accent);
  font-size: 18px;
  font-weight: 700;
  opacity: 1;
}
/* A tap-to-rate scale that stays usable even when its buttons need to wrap. */
.qflow-sample-showcase .webform-scale-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  white-space: normal;
}
.qflow-sample-showcase .webform-scale-option {
  flex: 0 0 48px;
  margin: 0;
}
.qflow-sample-showcase .webform-scale-options .form-item {
  margin: 0;
}
.qflow-sample-showcase .webform-scale-options input + label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  border: 2px solid #aebfc8;
  border-radius: 10px;
  background: #fff;
  color: var(--demo-ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.qflow-sample-showcase .webform-scale-options input:checked + label {
  border-color: var(--demo-accent);
  background: var(--demo-accent);
  color: #fff;
}
.qflow-sample-showcase .form-actions {
  margin: 28px 0 0;
  text-align: right;
}
.qflow-sample-showcase .form-actions input[type="submit"] {
  min-height: 50px;
  margin: 0;
  padding: 13px 26px;
  border: 2px solid var(--demo-accent);
  border-radius: 9px;
  background: var(--demo-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-transform: none;
}
.qflow-sample-showcase .form-actions input[type="submit"]:hover {
  border-color: #0b5250;
  background: #0b5250;
}
@media (max-width: 600px) {
  .qflow-sample-showcase {
    margin-top: 16px;
  }
  .qflow-sample-showcase .qflow-demo-section {
    padding: 22px 16px;
  }
  .qflow-sample-showcase .webform-options-display-buttons {
    grid-template-columns: minmax(0, 1fr);
  }
  .qflow-sample-showcase input[type="date"],
  .qflow-sample-showcase input[type="number"] {
    max-width: 100%;
  }
  .qflow-sample-showcase .webform-scale-options {
    gap: 6px;
  }
  .qflow-sample-showcase .webform-scale-option {
    flex-basis: 44px;
  }
  .qflow-sample-showcase .webform-scale-options input + label {
    width: 44px;
    height: 48px;
  }
  .qflow-sample-showcase .form-actions input[type="submit"] {
    width: 100%;
  }
}
