/* Wizard-specific composition only. Shared panel/DD tokens and components own the theme.
   Keep dedalus-design-system.css last; no shell, Admin, pricing or media-permission overrides. */
.yacht-wizard { box-sizing: border-box; width: 100%; max-width: var(--dd-editor-width); min-width: 0; margin: 0 auto; background: var(--dd-surface); color: var(--dd-ink); border: 1px solid var(--dd-line); border-radius: var(--dd-radius); font: 14px/1.5 var(--dd-font); overflow: visible; overflow-wrap: anywhere; }
.yacht-wizard *, .yacht-wizard *::before, .yacht-wizard *::after { box-sizing: border-box; }
/* Never set display on a closed native dialog. Only [open] enters the modal composition.
   Auto height fits short steps; the bounded middle track alone scrolls on tall steps. */
dialog.yw-dialog:not([open]) { display: none; }
dialog.yw-dialog[open] {
  position: fixed;
  inset: 50% 0 auto;
  transform: translateY(-50%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(840px, calc(100vw - 48px));
  height: auto;
  max-height: calc(100dvh - 48px);
  max-width: calc(100vw - 48px);
  margin: auto;
  padding: 0;
  overflow: hidden;
}
dialog.yw-dialog::backdrop { background: color-mix(in srgb, var(--dd-ink) 48%, transparent); }
body[data-wizard-modal-open="true"] { overflow: hidden; }
[data-wizard-modal="fallback"] { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: color-mix(in srgb, var(--dd-ink) 48%, transparent); }
[data-wizard-modal="fallback"] dialog.yw-dialog[open] { z-index: 1001; }
.yw-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 12px; border-bottom: 1px solid var(--dd-line); }
.yw-header > div { min-width: 0; }
.yw-header h2 { font-size: 28px; line-height: 1.2; margin: 0; font-weight: 650; letter-spacing: -.02em; }
.yw-header p { margin: 6px 0 0; }
.yw-yacht-identity { color: var(--dd-muted-text); font-size: 14px; }
.yacht-wizard button { min-height: var(--dd-action-height, 34px); font: 500 14px/1.4 var(--dd-font); color: var(--dd-ink); padding: 6px 12px; background: var(--dd-surface); border: 1px solid var(--dd-line); border-radius: var(--dd-action-radius, 6px); cursor: pointer; }
.yacht-wizard button:hover:not(:disabled) { border-color: var(--dd-brand); }
.yacht-wizard button:disabled { opacity: .6; cursor: not-allowed; }
.yacht-wizard .dd-button-quiet { background: transparent; border-color: transparent; color: var(--dd-muted-text); }
.yacht-wizard :is(button, input, select, summary, [tabindex]):focus-visible { outline: 3px solid var(--dd-focus); outline-offset: 3px; }
.yacht-wizard :is(input, select, button, summary, [tabindex]) { scroll-margin: 12px; }
.yacht-wizard .yw-primary { background: var(--dd-brand); color: var(--dd-surface); border-color: var(--dd-brand); }
.yacht-wizard .yw-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--dd-brand) 85%, var(--dd-ink)); }
/* Visible, equal labelled segments. This is progress, not a way around step validation. */
.yw-progress { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0; list-style: none; }
.yw-progress li { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 8px; border-bottom: 3px solid var(--dd-line); color: var(--dd-muted-text); }
.yw-progress li[aria-current="step"] { color: var(--dd-brand); background: var(--dd-brand-soft); border-color: var(--dd-brand); border-radius: 6px 6px 0 0; }
.yw-progress .yw-progress-complete { color: var(--dd-ink); border-color: color-mix(in srgb, var(--dd-brand) 48%, var(--dd-line)); }
.yw-step-marker { display: inline-grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border: 1px solid var(--dd-line); border-radius: 50%; font-weight: 600; background: var(--dd-surface); }
.yw-progress li[aria-current="step"] .yw-step-marker { color: var(--dd-surface); background: var(--dd-brand); border-color: var(--dd-brand); }
.yw-progress-complete .yw-step-marker { color: var(--dd-brand); border-color: var(--dd-brand); }
.yw-step-caption { min-width: 0; font-size: 14px; line-height: 1.3; }
.yw-step-caption strong { font-weight: 500; }
.yw-progress li[aria-current="step"] strong { font-weight: 650; }
/* Redundant count stays available to screen readers, not a plain visible replacement for progress. */
.yw-step-count { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.yw-body { padding: 12px; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; scroll-padding: 12px; }
.yw-step-title { color: var(--dd-ink); font-size: 28px; line-height: 1.2; font-weight: 650; margin: 0; }
.yw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.yw-field { min-width: 0; }
/* A thin purposeful teal-to-blue frame, not a gradient behind content. */
.yw-section { padding: 12px; margin: 0 0 12px; border: 1px solid transparent; border-radius: var(--dd-radius); background: linear-gradient(var(--dd-surface), var(--dd-surface)) padding-box, linear-gradient(115deg, color-mix(in srgb, var(--dd-brand) 38%, var(--dd-line)), color-mix(in srgb, var(--dd-ink) 24%, var(--dd-line))) border-box; }
.yw-section:last-child { margin-bottom: 0; }
.yw-section > h3, .yw-section-heading h3 { color: var(--dd-ink); font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.yw-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.yw-section-heading h3 { margin: 0; }
.yacht-wizard label, .yacht-wizard legend { font-size: 14px; font-weight: 500; }
.yw-field > label, .yw-equipment > label, .yw-custom > label { display: block; margin-bottom: 5px; }
.yacht-wizard input:not([type="checkbox"]):not([type="radio"]), .yacht-wizard select { display: block; width: 100%; min-width: 0; height: var(--dd-control-height); min-height: var(--dd-control-height); padding: 6px 12px; border: 1px solid var(--dd-control-line); border-radius: var(--dd-radius-control); color: var(--dd-ink); background: var(--dd-surface); font: inherit; }
.yacht-wizard input[type="checkbox"], .yacht-wizard input[type="radio"] { width: 20px; height: 20px; margin: 0; accent-color: var(--dd-brand); flex: 0 0 20px; }
.yw-hint { color: var(--dd-muted-text); font-size: 14px; margin: 6px 0 0; font-weight: 400; }
.yw-options { display: flex; flex-wrap: wrap; gap: 6px; max-height: 140px; overflow: auto; padding: 4px; }
.yw-options button { text-align: left; }
.yw-options button[aria-pressed="true"] { background: var(--dd-brand-soft); border-color: var(--dd-brand); color: var(--dd-brand); }
.yw-crew-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; align-items: start; }
.yw-crew-layout > .yw-section { min-width: 0; margin: 0; }
.yw-crew-configuration > .yw-hint, .yw-equipment > .yw-hint { margin: 0 0 12px; }
.yw-checkboxes, .yw-modes { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.yw-checkboxes legend, .yw-modes legend { padding: 0; margin-bottom: 6px; }
.yacht-wizard .yw-check { display: flex; align-items: center; gap: 8px; min-height: var(--dd-action-height, 34px); padding: 4px 0; cursor: pointer; }
.yacht-wizard .yw-check:has(input:disabled) { cursor: default; }
.yw-modes { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.yacht-wizard .yw-mode { display: flex; align-items: center; gap: 8px; min-height: var(--dd-action-height, 34px); padding: 6px 8px; border: 1px solid var(--dd-control-line); border-radius: var(--dd-radius-control); cursor: pointer; }
.yw-mode:has(input:checked) { background: var(--dd-brand-soft); border-color: var(--dd-brand); }
.yw-mode-description { display: block; min-width: 0; }
.yw-mode-description strong { display: block; font-size: 14px; font-weight: 600; }
.yw-mode-description .yw-hint { display: block; margin: 4px 0 0; }
.yw-crew-fields { min-width: 0; }
.yw-equipment > label { margin-top: 12px; }
.yw-amenity-groups { margin-top: 8px; }
.yw-amenity-group { min-width: 0; border-top: 1px solid var(--dd-line); }
.yacht-wizard summary { min-height: var(--dd-action-height, 34px); padding: 6px 4px; cursor: pointer; color: var(--dd-ink); font-size: 14px; font-weight: 500; }
.yw-amenity-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin: 0; padding: 0 4px 8px; }
.yw-amenity-choices > legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.yw-equipment-details { border-top: 1px solid var(--dd-line); margin-top: 8px; }
.yw-equipment-issues p { margin: 6px 0; }
.yw-selected { min-width: 0; }
.yw-chip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--dd-line); }
.yw-amenity-heading { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.yw-amenity-heading strong { font-size: 14px; font-weight: 500; }
.yw-custom { margin-top: 12px; }
.yw-custom button { margin-top: 8px; }
.yw-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.yw-photo { margin: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--dd-line); border-radius: var(--dd-radius); min-width: 0; background: var(--dd-surface); }
.yw-photo img { order: -1; width: 100%; height: 180px; object-fit: contain; background: var(--dd-canvas); border-radius: var(--dd-radius-control); }
.yw-photo figcaption { font-size: 14px; }
.yw-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.yw-photo-actions button { padding: 6px 12px; }
.yw-review { padding: 12px; margin: 0 0 12px; border: 1px solid var(--dd-line); border-radius: var(--dd-radius); background: var(--dd-surface); }
.yw-review p { margin: 6px 0; overflow-wrap: anywhere; }
.yw-review-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.yw-review-heading h3 { font-size: 16px; font-weight: 600; margin: 0; }
.yw-review-model { font-size: 16px; font-weight: 600; }
.yw-validation, .yw-close-warning { padding: 12px; border: 1px solid var(--dd-danger); background: var(--dd-danger-soft); color: var(--dd-danger); border-radius: var(--dd-radius-control); margin: 0 0 12px; }
.yw-close-warning h3 { font-size: 16px; margin: 0 0 8px; }
.yw-close-warning p { margin: 8px 0; }
.yw-close-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.yacht-wizard [hidden] { display: none; }
.yw-validation p { margin: 4px 0; }
.yw-error { color: var(--dd-danger); }
.yacht-wizard input[aria-invalid="true"] { border-color: var(--dd-danger); }
.yw-server-drafts { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--dd-line); }
.yw-server-drafts button { display: block; margin: 8px 0; }
/* The footer is outside the only scroll container, always visible for the current step. */
.yw-footer { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--dd-line); background: var(--dd-surface); }
.yw-footer-status { flex: 1 1 200px; min-width: 0; max-height: min(180px, 25dvh); overflow: auto; }
.yw-status { font-size: 14px; margin: 0; overflow-wrap: anywhere; }
.yw-status:empty { display: none; }
.yw-pending { margin: 4px 0 0; }
.yw-recovery { min-width: 0; margin-top: 4px; }
.yw-recovery > summary { color: var(--dd-muted-text); padding: 6px 0; }
.yw-recovery > .yw-hint { max-width: 46ch; margin: 0 0 8px; }
.yw-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; max-width: 100%; }
@media (max-width: 760px) {
  dialog.yw-dialog[open] { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; inset: 0; transform: none; margin: 0; border: 0; border-radius: 0; }
  .yw-header { padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 10px; gap: 10px; }
  .yw-header h2 { font-size: 28px; }
  .yw-progress { gap: 4px; }
  .yw-progress li { flex-direction: column; align-items: center; gap: 6px; padding: 8px 3px; text-align: center; }
  .yw-step-marker { flex-basis: 24px; }
  .yw-step-caption { overflow-wrap: normal; }
  .yw-body { padding: 12px; }
  .yw-grid, .yw-crew-layout { grid-template-columns: 1fr; }
  .yw-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yw-footer { padding: 10px calc(12px + env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px)); gap: 8px; }
  .yw-footer-status { flex-basis: 100%; }
  .yw-footer-status:has(.yw-status:empty):has(.yw-recovery[hidden]):has(.yw-pending[hidden]) { display: none; }
  .yw-actions { width: 100%; }
}
@media (max-width: 760px), (pointer: coarse) {
  .yacht-wizard button { min-height: 44px; min-width: 44px; padding: 9px 12px; }
  .yacht-wizard :is(.yw-check, .yw-mode, summary) { min-height: 44px; }
}
@media (max-width: 460px) {
  .yw-amenity-choices, .yw-gallery { grid-template-columns: 1fr; }
  .yw-actions { justify-content: flex-start; }
  .yw-actions button { flex: 1 1 auto; }
  .yw-close-actions button { width: 100%; }
}
