/* Only journey layout and controls; existing presentation styles stay intact. */
.hotel-journey-ready [hidden] {
  display: none !important;
}

.hotel-journey-ready .demo-header,
.main.hotel-journey {
  width: min(1000px, 100%);
}

.hotel-journey-ready .progress-phases,
.hotel-journey-ready .channel-progress {
  display: none;
}

.main.hotel-journey {
  display: grid;
  grid-template-columns: clamp(128px, 20%, 190px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
}

.journey-nav {
  min-width: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.journey-nav ol {
  display: grid;
  gap: 8px;
  list-style: none;
}

.journey-step {
  position: relative;
  display: block;
  width: 100%;
  min-height: 56px;
  height: 100%;
  padding: 10px 25px 10px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  color: #1a2a28;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.journey-step:disabled {
  background: #f7f7f7;
  color: #777;
  cursor: default;
}

.journey-step[aria-current] {
  border-color: #1e7a66;
  background: #1e7a66;
  color: #fff;
}

.journey-step:focus-visible {
  outline: 2px solid #0f5d4a;
  outline-offset: -3px;
}

.journey-step .phase {
  padding: 0;
  background: none;
  color: inherit;
  box-shadow: none;
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
}

.journey-status {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.35;
  opacity: 0.8;
}

.journey-marker {
  position: absolute;
  right: 10px;
  top: 17px;
  font-size: 14px;
}

.journey-stage {
  display: grid;
  grid-template-columns: minmax(155px, 0.85fr) minmax(0, 1.35fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px 10px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.journey-stage-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 2px;
}

.journey-stage-heading h2 {
  font-size: 12px;
  line-height: 1.4;
}

.journey-mode {
  color: #666;
  font-size: 10px;
}

.hotel-journey .phone-col,
.hotel-journey .system-col {
  width: 100%;
  height: auto;
  min-width: 0;
  padding-right: 2px;
}

.hotel-journey .sys-card {
  flex: 0 0 auto;
}

/* Keep the complete phone frame inside the existing embedded player height. */
.hotel-journey .phone-frame {
  height: min(376px, 100%);
  min-height: 220px;
}

.hotel-journey .phone-screen {
  height: 100%;
}

.journey-system-only {
  grid-template-columns: minmax(0, 1fr);
}

.hotel-journey .row,
.hotel-journey .row-text,
.hotel-journey .sys-card-header > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.journey-enter {
  animation: journey-reveal 0.2s ease-out;
}

@keyframes journey-reveal {
  from {
    opacity: 0.4;
    transform: translateX(5px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (min-width: 561px) {
  :fullscreen .hotel-journey-ready .demo-header,
  :fullscreen .main.hotel-journey {
    width: min(1180px, 100%);
  }
}

@media (max-width: 560px) {
  .hotel-journey-ready .topbar {
    flex-wrap: wrap;
    gap: 6px;
  }

  .hotel-journey-ready .brand-block {
    flex: 1 1 150px;
  }

  .hotel-journey-ready .demo-label {
    max-width: none;
    white-space: normal;
  }

  .main.hotel-journey {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
  }

  .journey-nav ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .journey-step {
    min-height: 51px;
    padding: 6px 15px 6px 6px;
  }

  .journey-step .phase {
    font-size: 10px;
  }
  .journey-status {
    font-size: 8px;
    margin-top: 2px;
  }
  .journey-marker {
    right: 5px;
    top: 8px;
    font-size: 11px;
  }

  .journey-stage {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overscroll-behavior: contain;
  }

  .journey-stage-heading {
    flex: 0 0 auto;
  }

  .hotel-journey .phone-col,
  .hotel-journey .system-col {
    flex: 0 0 auto;
    overflow: visible;
    padding: 0;
  }

  .hotel-journey .phone-frame {
    height: 276px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .journey-enter {
    animation: none;
  }
}
