/*
  EnquiryFlow shared demo components
  Steps, service cards, product shell, assistant fields, and lead preview.
*/

.demo-icon {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  color: var(--demo-blue-700);
  background: var(--demo-blue-100);
  border-radius: 8px;
}

.demo-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.demo-steps-grid,
.demo-services-grid {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-step-card {
  display: flex;
  gap: 0.85rem;
  padding: 1.15rem;
  background: var(--demo-white);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius);
  box-shadow: var(--demo-shadow-sm);
}

.demo-step-number {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  color: var(--demo-white);
  background: var(--demo-blue-600);
  border-radius: 7px;
  font-size: 0.86rem;
  font-weight: 850;
}

.demo-step-card .demo-icon {
  display: none;
}

.demo-step-card h3 {
  margin-bottom: 0.25rem;
}

.demo-step-card p {
  margin: 0;
  color: var(--demo-slate-600);
  font-size: 0.93rem;
}

.demo-services-heading,
.demo-assistant-heading {
  display: grid;
  gap: 0.75rem;
}

.demo-services-heading > p,
.demo-assistant-heading > p {
  max-width: 32rem;
  margin: 0;
  color: var(--demo-slate-600);
}

.demo-service-card {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--demo-white);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius);
  box-shadow: var(--demo-shadow-sm);
}

.demo-service-card h3 {
  margin: 0;
  font-size: 1.04rem;
}

.demo-product-section {
  padding: 4.75rem 0;
  background: var(--demo-grey-100);
  border-block: 1px solid #e1e9ec;
}

.demo-product-shell {
  overflow: hidden;
  background: var(--demo-white);
  border: 1px solid var(--demo-border-dark);
  border-radius: var(--demo-radius-lg);
  box-shadow: var(--demo-shadow-lg);
}

.demo-shell-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  background: var(--demo-grey-50);
  border-bottom: 1px solid var(--demo-border);
}

.demo-shell-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.6rem;
}

.demo-shell-logo {
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 7px;
  font-size: 0.86rem;
}

.demo-shell-title strong,
.demo-shell-title small {
  display: block;
}

.demo-shell-title strong {
  color: var(--demo-navy-900);
  font-size: 0.88rem;
}

.demo-shell-title small {
  margin-top: 0.1rem;
  color: var(--demo-slate-500);
  font-size: 0.72rem;
}

.demo-local-badge,
.demo-preview-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.5rem;
  color: var(--demo-teal-700);
  background: var(--demo-teal-100);
  border: 1px solid #cce9e4;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

.demo-product-grid {
  display: grid;
}

.demo-assistant-panel,
.demo-preview-panel {
  padding: 1.2rem;
}

.demo-assistant-panel {
  position: relative;
  min-height: 37rem;
  border-bottom: 1px solid var(--demo-border);
}

.demo-panel-heading,
.demo-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.demo-panel-heading h3,
.demo-preview-heading h3 {
  margin: 0;
  font-size: 1.22rem;
}

.demo-panel-kicker {
  margin-bottom: 0.2rem;
  font-size: 0.7rem;
}

.demo-progress-label {
  padding: 0.25rem 0.45rem;
  color: var(--demo-slate-600);
  background: var(--demo-grey-100);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 750;
  white-space: nowrap;
}

.demo-progress-track {
  height: 0.34rem;
  margin: 0.65rem 0 1.45rem;
  overflow: hidden;
  background: #e6edf0;
  border-radius: 99px;
}

.demo-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--demo-blue-600), var(--demo-teal-500));
  border-radius: inherit;
  transition: width 180ms ease;
}

.demo-question-group {
  min-height: 20.5rem;
  padding: 0;
  margin: 0;
  border: 0;
}

.demo-question-label,
.demo-question-group legend {
  display: block;
  width: 100%;
  margin-bottom: 0.9rem;
  color: var(--demo-navy-900);
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.demo-field-hint {
  display: block;
  margin: -0.35rem 0 0.9rem;
  color: var(--demo-slate-500);
  font-size: 0.84rem;
}

.demo-option-grid {
  display: grid;
  gap: 0.5rem;
}

.demo-option {
  cursor: pointer;
}

.demo-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.demo-option span {
  display: flex;
  min-height: 2.95rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.78rem;
  color: var(--demo-navy-900);
  background: var(--demo-grey-50);
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 700;
  transition: background-color 130ms ease, border-color 130ms ease;
}

.demo-option span::after {
  width: 0.88rem;
  height: 0.88rem;
  flex: 0 0 auto;
  border: 2px solid #9fb1ba;
  border-radius: 50%;
  content: "";
}

.demo-option:hover span {
  border-color: #b9d0d9;
}

.demo-option input:checked + span {
  background: var(--demo-blue-100);
  border-color: var(--demo-blue-600);
}

.demo-option input:checked + span::after {
  background: var(--demo-blue-600);
  border-color: var(--demo-blue-600);
  box-shadow: inset 0 0 0 3px var(--demo-white);
}

.demo-input,
.demo-select,
.demo-textarea {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.7rem 0.8rem;
  color: var(--demo-navy-900);
  background: var(--demo-white);
  border: 2px solid var(--demo-border);
  border-radius: 8px;
  outline: none;
}

.demo-textarea {
  min-height: 7rem;
  resize: vertical;
}

.demo-input::placeholder,
.demo-textarea::placeholder {
  color: #91a0aa;
}

.demo-input:focus,
.demo-select:focus,
.demo-textarea:focus {
  border-color: var(--demo-blue-600);
  box-shadow: 0 0 0 3px rgba(8, 120, 223, 0.08);
}

.demo-option input[aria-invalid="true"] + span,
.demo-input[aria-invalid="true"],
.demo-select[aria-invalid="true"],
.demo-textarea[aria-invalid="true"] {
  border-color: var(--demo-danger);
}

.demo-form-error {
  min-height: 1.3rem;
  margin: 0.2rem 0 0.6rem;
  color: var(--demo-danger);
  font-size: 0.84rem;
  font-weight: 650;
}

.demo-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
}

.demo-panel-disclaimer {
  position: absolute;
  right: 1.2rem;
  bottom: 0.85rem;
  left: 1.2rem;
  margin: 0;
  color: var(--demo-slate-500);
  font-size: 0.74rem;
  text-align: center;
}

.demo-completion {
  display: flex;
  min-height: 28rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
}

.demo-completion-icon {
  display: grid;
  width: 2.9rem;
  height: 2.9rem;
  margin-bottom: 0.9rem;
  place-items: center;
  color: var(--demo-white);
  background: var(--demo-teal-500);
  border-radius: 50%;
  font-weight: 900;
}

.demo-completion h3 {
  margin-bottom: 0.55rem;
  font-size: 1.6rem;
}

.demo-completion p {
  max-width: 28rem;
  margin-bottom: 1rem;
  color: var(--demo-slate-600);
  font-size: 0.96rem;
}

.demo-preview-panel {
  background: #fbfcfd;
}

.demo-preview-heading {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--demo-border);
}

.demo-preview-status.is-complete {
  color: #176c63;
  background: var(--demo-teal-100);
}

.demo-email-subject {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--demo-border);
}

.demo-email-subject span,
.demo-summary-box span,
.demo-action-box span {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--demo-slate-500);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.demo-email-subject strong {
  display: block;
  color: var(--demo-navy-900);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.demo-lead-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.demo-lead-details div {
  min-width: 0;
  padding: 0.58rem 0;
  border-bottom: 1px solid var(--demo-border);
}

.demo-lead-details div:nth-child(even) {
  padding-left: 0.65rem;
}

.demo-lead-details dt {
  color: var(--demo-slate-500);
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
}

.demo-lead-details dd {
  margin: 0.1rem 0 0;
  color: var(--demo-navy-900);
  font-size: 0.87rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.demo-lead-details dd.is-empty {
  color: #94a2aa;
  font-weight: 500;
}

.demo-summary-box,
.demo-action-box {
  margin-top: 0.75rem;
  padding: 0.75rem 0.82rem;
  border-radius: 8px;
}

.demo-summary-box {
  background: var(--demo-blue-100);
  border: 1px solid #d2e5fb;
}

.demo-action-box {
  background: var(--demo-teal-100);
  border: 1px solid #cfe9e5;
}

.demo-summary-box p,
.demo-action-box strong {
  margin: 0;
  color: var(--demo-slate-700);
  font-size: 0.86rem;
}

.demo-action-box strong {
  display: block;
  color: var(--demo-navy-900);
}

.demo-preview-disclaimer {
  margin: 0.65rem 0 0;
  color: var(--demo-slate-500);
  font-size: 0.74rem;
  text-align: center;
}

@media (max-width: 35.98rem) {
  .demo-shell-toolbar,
  .demo-panel-heading,
  .demo-preview-heading,
  .demo-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .demo-shell-toolbar,
  .demo-panel-heading,
  .demo-preview-heading {
    gap: 0.65rem;
  }

  .demo-local-badge,
  .demo-preview-status {
    align-self: flex-start;
    white-space: normal;
  }

  .demo-assistant-panel {
    min-height: auto;
    padding-bottom: 3.4rem;
  }

  .demo-question-group {
    min-height: 0;
  }

  .demo-form-actions .demo-button {
    width: 100%;
  }

  .demo-panel-disclaimer {
    right: 1rem;
    left: 1rem;
  }

  .demo-lead-details {
    grid-template-columns: 1fr;
  }

  .demo-lead-details div:nth-child(even) {
    padding-left: 0;
  }
}

@media (min-width: 36rem) {
  .demo-steps-grid,
  .demo-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .demo-option-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .demo-assistant-panel,
  .demo-preview-panel {
    padding: 1.5rem;
  }

  .demo-panel-disclaimer {
    right: 1.5rem;
    left: 1.5rem;
  }
}

@media (min-width: 50rem) {
  .demo-steps-grid,
  .demo-services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .demo-step-card {
    flex-direction: column;
  }

  .demo-services-heading,
  .demo-assistant-heading {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.7fr);
    align-items: end;
    gap: 3rem;
  }

  .demo-services-heading h2,
  .demo-services-heading > p,
  .demo-assistant-heading h2,
  .demo-assistant-heading > p {
    margin-bottom: 0;
  }

  .demo-product-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .demo-assistant-panel {
    border-right: 1px solid var(--demo-border);
    border-bottom: 0;
  }
}

@media (min-width: 64rem) {
  .demo-assistant-panel,
  .demo-preview-panel {
    padding: 1.8rem;
  }
}

/* Premium dental component layer */
.demo-steps-grid,
.demo-services-grid {
  gap: 1rem;
}

.demo-step-card,
.demo-service-card {
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(8, 29, 44, 0.08);
}

.demo-step-card {
  display: grid;
  padding: 1.25rem;
}

.demo-step-card .demo-icon {
  display: none;
}

.demo-step-number {
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.8rem;
  background: var(--demo-navy-900);
  border-radius: 10px;
}

.demo-service-card {
  min-height: 5.25rem;
  padding: 1rem 1.1rem;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.demo-service-card:hover {
  border-color: #bdd9f0;
  box-shadow: 0 18px 44px rgba(8, 29, 44, 0.1);
  transform: translateY(-2px);
}

.demo-product-section {
  padding: 5.25rem 0;
  background:
    linear-gradient(180deg, #f8fbfd 0%, #eef6fa 100%);
}

.demo-product-shell {
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(8, 29, 44, 0.16);
}

.demo-shell-toolbar {
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.78);
}

.demo-local-badge,
.demo-preview-status {
  padding: 0.38rem 0.6rem;
}

.demo-assistant-panel,
.demo-preview-panel {
  padding: 1.35rem;
}

.demo-assistant-panel {
  min-height: 38rem;
  background: #ffffff;
}

.demo-panel-heading h3,
.demo-preview-heading h3 {
  color: var(--demo-navy-900);
  font-size: 1.35rem;
}

.demo-progress-track {
  height: 0.42rem;
  margin-bottom: 1.65rem;
}

.demo-question-label,
.demo-question-group legend {
  font-size: clamp(1.45rem, 4vw, 1.8rem);
}

.demo-option-grid {
  gap: 0.65rem;
}

.demo-option span {
  min-height: 3.25rem;
  padding: 0.78rem 0.9rem;
  background: #f8fbfd;
  border-color: #e3edf2;
  border-radius: 12px;
}

.demo-option:hover span {
  background: #ffffff;
  border-color: #b9d7ef;
  box-shadow: 0 8px 22px rgba(8, 29, 44, 0.08);
}

.demo-input,
.demo-select,
.demo-textarea {
  min-height: 3.35rem;
  border-color: #d4e2e8;
  border-radius: 12px;
}

.demo-form-actions {
  align-items: center;
}

.demo-preview-panel {
  background: #fbfdff;
}

.demo-email-subject {
  padding: 1rem 0;
}

.demo-lead-details div {
  padding: 0.75rem 0;
}

.demo-summary-box,
.demo-action-box {
  margin-top: 0.95rem;
  padding: 0.95rem;
  border-radius: 14px;
}

.demo-panel-disclaimer,
.demo-preview-disclaimer {
  color: #6f8491;
}

@media (max-width: 35.98rem) {
  .demo-product-section {
    padding: 4rem 0;
  }

  .demo-assistant-panel {
    padding-bottom: 3.8rem;
  }

  .demo-panel-heading h3,
  .demo-preview-heading h3 {
    font-size: 1.2rem;
  }
}

@media (min-width: 50rem) {
  .demo-product-grid {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  }
}

/* Readability and premium polish pass */
.demo-step-card,
.demo-service-card {
  padding: 1.25rem;
}

.demo-step-card p {
  font-size: 1rem;
  line-height: 1.58;
}

.demo-service-card h3 {
  font-size: 1.08rem;
}

.demo-shell-title strong {
  font-size: 0.96rem;
}

.demo-shell-title small,
.demo-local-badge,
.demo-preview-status,
.demo-progress-label {
  font-size: 0.78rem;
}

.demo-panel-kicker {
  font-size: 0.76rem;
}

.demo-field-hint,
.demo-form-error {
  font-size: 0.92rem;
  line-height: 1.45;
}

.demo-option span {
  font-size: 1rem;
  line-height: 1.35;
}

.demo-input,
.demo-select,
.demo-textarea {
  font-size: 1rem;
  line-height: 1.45;
}

.demo-panel-disclaimer,
.demo-preview-disclaimer {
  font-size: 0.86rem;
  line-height: 1.45;
}

.demo-completion p {
  font-size: 1rem;
  line-height: 1.6;
}

.demo-email-subject span,
.demo-summary-box span,
.demo-action-box span,
.demo-lead-details dt {
  font-size: 0.76rem;
}

.demo-email-subject strong {
  font-size: 0.98rem;
  line-height: 1.4;
}

.demo-lead-details dd {
  font-size: 0.96rem;
  line-height: 1.45;
}

.demo-summary-box p,
.demo-action-box strong {
  font-size: 0.96rem;
  line-height: 1.58;
}

@media (max-width: 35.98rem) {
  .demo-step-card,
  .demo-service-card {
    padding: 1.05rem;
  }

  .demo-option span,
  .demo-input,
  .demo-select,
  .demo-textarea {
    font-size: 0.98rem;
  }
}

/* Final assistant readability nudge */
.demo-step-card p {
  font-size: 1.04rem;
  line-height: 1.62;
}

.demo-service-card h3 {
  font-size: 1.12rem;
}

.demo-shell-title small,
.demo-local-badge,
.demo-preview-status,
.demo-progress-label,
.demo-panel-kicker {
  font-size: 0.82rem;
}

.demo-field-hint,
.demo-form-error {
  font-size: 0.96rem;
  line-height: 1.5;
}

.demo-option span,
.demo-input,
.demo-select,
.demo-textarea {
  font-size: 1.03rem;
}

.demo-panel-disclaimer,
.demo-preview-disclaimer {
  font-size: 0.9rem;
}

.demo-email-subject strong,
.demo-lead-details dd,
.demo-summary-box p,
.demo-action-box strong {
  font-size: 1rem;
}

.demo-email-subject span,
.demo-summary-box span,
.demo-action-box span,
.demo-lead-details dt {
  font-size: 0.8rem;
}

@media (max-width: 35.98rem) {
  .demo-step-card p,
  .demo-option span,
  .demo-input,
  .demo-select,
  .demo-textarea,
  .demo-email-subject strong,
  .demo-lead-details dd,
  .demo-summary-box p,
  .demo-action-box strong {
    font-size: 0.98rem;
  }
}
