/**
 * END-JS9 — Journey Setup (visually frozen, 1366×768)
 */

.ed-journey-setup-root {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ed-journey-setup-root .card-body {
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

body.ed-journey-setup-view .ed-topbar {
  display: none;
}

body.ed-journey-setup-view .ed-content {
  padding: var(--ed-space-2) var(--ed-space-5) var(--ed-space-2);
}

body.ed-journey-setup-view.ed-quote-edit-view .ed-content {
  padding-bottom: var(--ed-space-2);
}

body.ed-journey-setup-view .card-body {
  overflow: visible !important;
}

.js-workspace {
  max-width: 880px;
  margin: 0 auto;
}

.js-breadcrumb {
  margin: 0 0 var(--ed-space-1);
}

.js-back {
  font-weight: 600 !important;
  font-size: var(--ed-text-sm) !important;
  color: var(--ed-navy) !important;
}

.js-back:hover {
  color: var(--ed-amber-muted) !important;
}

.js-header {
  margin-bottom: var(--ed-space-2);
  padding-bottom: var(--ed-space-2);
  border-bottom: 1px solid var(--ed-border-light);
}

.js-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ed-space-2);
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.js-quoting-in {
  flex-shrink: 0;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 700;
  color: var(--ed-navy, #171d26);
  letter-spacing: 0.02em;
}

.js-quoting-code {
  display: inline-block;
  margin-left: 6px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.js-context-line {
  margin: 0;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
}

.js-step-label {
  flex-shrink: 0;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 500;
  color: var(--ed-text-muted);
}

.js-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ed-space-3);
  flex-wrap: wrap;
}

.js-title {
  margin: 0;
  font-family: var(--ed-font-display);
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ed-navy);
}

.js-progress {
  display: flex;
  align-items: center;
  gap: var(--ed-space-2);
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
}

.js-progress-item.is-current {
  color: var(--ed-navy);
  font-weight: 600;
}

.js-progress-sep {
  color: var(--ed-text-subtle);
  font-size: 10px;
}

.js-journey-summary {
  margin: var(--ed-space-1) 0 0;
  font-family: var(--ed-font);
  font-size: var(--ed-text-sm);
  font-weight: 500;
  color: var(--ed-navy);
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.js-form-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px var(--ed-space-4);
}

.js-form .field label {
  display: block;
  margin-bottom: 4px;
  font-size: var(--ed-text-sm);
  font-weight: 600;
  color: var(--ed-navy);
}

.js-form .js-control,
.js-form .ed-date-display,
.js-form select {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  font-size: var(--ed-text-base);
}

.js-token-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
}

.js-token-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.js-token-box:focus-within {
  border-color: var(--ed-navy);
  box-shadow: 0 0 0 3px rgba(15, 31, 51, 0.08);
}

.js-token-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.js-token-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 8px 4px 10px;
  font-family: var(--ed-font);
  font-size: var(--ed-text-sm);
  font-weight: 500;
  color: var(--ed-navy);
  background: var(--ed-amber-soft);
  border: 1px solid var(--ed-amber-border);
  border-radius: var(--ed-radius-pill);
  line-height: 1.3;
  word-break: break-word;
}

.js-token-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 14px;
  line-height: 1;
  color: var(--ed-text-muted);
  cursor: pointer;
}

.js-token-remove:hover {
  color: var(--ed-navy);
  background: rgba(15, 31, 51, 0.06);
}

.js-token-search-row {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
}

.js-token-input {
  display: block;
  width: 100% !important;
  min-width: 12rem;
  min-height: 30px !important;
  padding: 5px 8px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: var(--ed-text-base);
}

.js-token-input::placeholder {
  color: var(--ed-text-muted);
}

.js-token-input:focus {
  outline: none;
  box-shadow: none !important;
}

.js-token-add {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 22px;
  padding: 1px 0;
  margin: 0;
  border: none;
  border-radius: var(--ed-radius-sm);
  background: transparent;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--ed-text-muted);
  cursor: pointer;
}

.js-token-add:hover {
  color: var(--ed-navy);
}

.js-token-create {
  color: var(--ed-navy);
  font-weight: 500;
}

.js-token-compose {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.js-token-compose.hidden {
  display: none;
}

.js-token-compose-input {
  flex: 1;
  min-width: 0;
  min-height: 30px;
  padding: 5px 8px;
}

.js-token-compose-save,
.js-token-compose-cancel {
  flex-shrink: 0;
  min-height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: var(--ed-radius-sm);
  background: transparent;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 500;
  cursor: pointer;
}

.js-token-compose-save {
  color: var(--ed-navy);
}

.js-token-compose-cancel {
  color: var(--ed-text-muted);
}

.js-token-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  max-height: 200px;
  overflow-y: auto;
}

.js-row-dates.full-width,
.js-form-footer.full-width {
  grid-column: 1 / -1;
}

.js-date-range {
  display: flex;
  align-items: flex-end;
  gap: var(--ed-space-3);
}

.js-date-item {
  flex: 1;
  min-width: 0;
}

.js-date-sublabel {
  display: block;
  margin-bottom: 3px;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 500;
  color: var(--ed-text-muted);
}

.js-date-separator {
  flex-shrink: 0;
  padding-bottom: 10px;
  font-family: var(--ed-font);
  color: var(--ed-text-muted);
}

.js-form-footer {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.js-footer-grid {
  display: grid;
  grid-template-columns: 72px 72px minmax(0, 1fr) minmax(148px, 168px);
  gap: 10px 14px;
  align-items: end;
}

.js-footer-grid:has(.js-col-child-ages.is-empty) {
  grid-template-columns: 72px 72px minmax(148px, 168px);
}

.js-col-adults .js-control,
.js-col-children .js-control {
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding-left: 8px;
  padding-right: 8px;
}

.js-col-child-ages label {
  font-weight: 500;
  color: var(--ed-text-muted);
}

.js-col-child-ages.is-empty {
  display: none;
}

.js-child-ages-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ed-space-2);
  min-height: 38px;
}

.js-child-ages-inline .js-child-age {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  min-height: 38px;
  padding: 8px 6px;
  text-align: center;
  font-size: var(--ed-text-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ed-text-muted);
  border-color: var(--ed-border-light);
  background: var(--ed-surface, #f8f6f2);
}

.js-child-ages-inline .js-child-age:focus {
  color: var(--ed-navy);
  background: var(--ed-white);
  border-color: var(--ed-navy);
}

.js-child-ages-empty {
  min-height: 0;
}

.js-col-currency {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--ed-navy, #171d26);
  border-radius: 6px;
}
.js-col-currency > label {
  font-weight: 600;
  color: var(--ed-navy, #171d26);
}
.js-col-currency .js-currency-select {
  min-width: 0;
}

.js-field-hint {
  margin: 3px 0 0;
  font-family: var(--ed-font);
  font-size: 11px;
  color: var(--ed-text-muted);
  line-height: 1.3;
}

.js-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ed-space-2);
  width: 100%;
  margin-top: var(--ed-space-3);
  padding-top: var(--ed-space-3);
  border-top: 1px solid var(--ed-border-light);
}

.js-continue-btn {
  padding: 9px 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: none;
}

.js-continue-btn:hover:not(:disabled) {
  box-shadow: none;
}

.js-error {
  margin: 0;
  font-family: var(--ed-font);
  font-size: var(--ed-text-sm);
  color: var(--ed-danger);
}

body.ed-journey-setup-view .ce-quote-breadcrumb {
  margin-bottom: var(--ed-space-1);
}

@media (max-width: 720px) {
  .js-form-grid {
    grid-template-columns: 1fr;
  }

  .js-footer-grid,
  .js-footer-grid:has(.js-col-child-ages.is-empty) {
    grid-template-columns: 1fr 1fr;
  }

  .js-col-child-ages {
    grid-column: 1 / -1;
  }

  .js-col-child-ages.is-empty {
    display: none;
  }

  .js-col-currency {
    grid-column: 1 / -1;
    max-width: 260px;
  }

  .js-date-range {
    flex-direction: column;
    align-items: stretch;
  }

  .js-date-separator {
    display: none;
  }
}

@media (min-width: 721px) {
  .js-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}
