/* Illustrated model help is a compact guide, separate from the booking flow. */
.model-help-overlay {
  --help-ink: #24334b;
  --help-muted: #647187;
  --help-accent: #4e6b91;
  --help-line: #e1e6ee;
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: rgb(25 38 56 / 43%);
  overscroll-behavior: contain;
}
.model-help-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(560px, 100%);
  min-width: 0;
  max-height: min(680px, calc(100vh - 32px));
  max-height: min(680px, calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 22px;
  background: #fff;
  color: var(--help-ink);
  box-shadow: 0 18px 65px rgb(15 31 54 / 20%);
  outline: none;
}
.model-help-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 17px;
  border-bottom: 1px solid var(--help-line);
}
.model-help-header > div { min-width: 0; }
.model-help-header .eyebrow {
  margin: 0 0 5px;
  color: var(--help-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .02em;
}
.model-help-header h2 {
  margin: 0;
  color: var(--help-ink);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.5px;
}
.model-help-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 11px;
  margin: -3px -3px 0 0;
  border-radius: 12px;
  background: #f1f4f8;
  color: #5b708d;
}
.model-help-close > svg { width: 22px; height: 22px; }
.model-help-content {
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 22px 19px;
  scrollbar-width: thin;
}
.model-help-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--help-muted);
  font-size: 12px;
  line-height: 1.4;
}
.model-help-progress ol {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.model-help-progress li {
  width: 7px;
  height: 7px;
  overflow: hidden;
  border-radius: 50%;
  background: #dce3ec;
  font-size: 0;
  line-height: 0;
}
.model-help-progress li.active { width: 21px; border-radius: 5px; background: var(--help-accent); }
.model-help-step-title {
  margin: 0 0 7px;
  color: var(--help-ink);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.3px;
}
.model-help-step-copy {
  margin: 0;
  color: var(--help-muted);
  font-size: 15px;
  line-height: 1.5;
}
.model-help-step-copy strong { color: var(--help-ink); font-weight: 600; }
.model-help-figure { margin: 17px 0 0; }
.model-help-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 250px;
  aspect-ratio: 600 / 330;
  object-fit: contain;
  border: 1px solid #e7ebf1;
  border-radius: 14px;
  background: #f5f7fa;
}
.model-help-figure figcaption {
  margin-top: 7px;
  color: #78859a;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}
.model-help-tip {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f4f8;
  color: #5c6e87;
  font-size: 13px;
  line-height: 1.45;
}
.model-help-tip:empty { display: none; }
.model-help-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 22px 20px;
  border-top: 1px solid var(--help-line);
  background: #fff;
}
.model-help-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.model-help-actions .btn-primary { flex-grow: 1.45; background: var(--help-accent); border-color: var(--help-accent); color: #fff; }
.model-help-actions .btn-secondary { background: #fff; border-color: #d8e0ea; color: var(--help-accent); }
.model-help-close:focus-visible,
.model-help-actions .btn:focus-visible,
.model-help-trigger:focus-visible {
  outline: 2px solid #6c85a6;
  outline-offset: 3px;
}
.model-help-trigger {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #4e6b91;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}
.model-help-trigger > .icon { width: 18px; height: 18px; }
.model-picker-screen .model-family-label strong { overflow-wrap: normal; }
.model-picker-screen .model-family-label .model-series-name,
.model-picker-screen .model-family-label .model-series-suffix { white-space: nowrap; }

@media (hover: hover) {
  .model-help-close:hover { background: #e7edf4; }
  .model-help-actions .btn-primary:hover:not(:disabled) { background: #425d80; border-color: #425d80; }
  .model-help-actions .btn-secondary:hover:not(:disabled) { background: #f3f6fa; border-color: #afbed1; }
  .model-help-trigger:hover { color: #304e77; }
}

@media (max-width: 999px) {
  .model-finder-help-mobile .model-help-trigger { justify-content: space-between; }
  .model-finder-help-mobile .model-help-trigger > .icon:first-child { display: none; }
}

@media (max-width: 640px) {
  .model-help-dialog { border-radius: 19px; }
  .model-help-header { gap: 12px; padding: 18px 18px 14px; }
  .model-help-header h2 { font-size: 22px; }
  .model-help-content { padding: 15px 18px 16px; }
  .model-help-progress { margin-bottom: 12px; }
  .model-help-step-title { font-size: 19px; margin-bottom: 6px; }
  .model-help-step-copy { font-size: 14px; line-height: 1.45; }
  .model-help-figure { margin-top: 14px; }
  .model-help-figure img { max-height: 192px; border-radius: 12px; }
  .model-help-tip { margin-top: 12px; padding: 9px 10px; font-size: 12px; }
  .model-help-actions { padding: 13px 18px 17px; }
  .model-picker-screen .model-family-label strong { font-size: 15px; }
}

@media (max-width: 374px) {
  .model-help-overlay { padding-inline: 12px; }
  .model-help-header { padding-inline: 15px; }
  .model-help-content { padding-inline: 15px; }
  .model-help-actions { padding-inline: 15px; gap: 8px; }
  .model-help-actions .btn { padding-inline: 10px; font-size: 14px; }
}

@media (max-height: 620px) {
  .model-help-header { padding-block: 13px; }
  .model-help-content { padding-top: 12px; padding-bottom: 12px; }
  .model-help-progress { margin-bottom: 10px; }
  .model-help-figure { margin-top: 11px; }
  .model-help-figure img { max-height: 160px; }
  .model-help-actions { padding-block: 11px; }
}
