/**
 * Reserve space below in-flow content so fixed bar + iOS safe-area never cover
 * primary actions (e.g. ROI calculator). JS sets --crt-journey-reserve; this max()
 * floors underestimates from first-paint layout on iPad.
 */
:root {
  --crt-journey-reserve: 0px;
}

body.crt-journey-pad {
  padding-bottom: max(
    var(--crt-journey-reserve),
    calc(5.5rem + env(safe-area-inset-bottom, 0px))
  );
}

/* Fixed footer: Prev / step / Next — CRT guided path (calculator last). */
.crt-journey-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  background: linear-gradient(180deg, rgba(5, 30, 51, 0.97), rgba(2, 21, 39, 0.99));
  border-top: 1px solid rgba(122, 168, 206, 0.25);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  font-family: Outfit, system-ui, sans-serif;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}

.crt-journey-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.crt-journey-bar-step {
  font-size: 15px;
  font-weight: 600;
  color: #c8ddf0;
  letter-spacing: 0.02em;
  flex: 1 1 auto;
  min-width: 140px;
  text-align: center;
  order: 2;
}

.crt-journey-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crt-journey-bar-actions--prev {
  order: 1;
}

.crt-journey-bar-actions--next {
  order: 3;
}

.crt-journey-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(122, 168, 206, 0.35);
  color: #e8f2fc;
  background: #0a2d4a;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.crt-journey-bar-btn:hover:not(.is-disabled) {
  background: #0d3a5c;
  border-color: rgba(245, 167, 0, 0.45);
  color: #fff;
}

.crt-journey-bar-btn.is-disabled {
  opacity: 0.38;
  pointer-events: none;
  cursor: default;
}

.crt-journey-bar-btn-next:not(.is-disabled) {
  background: #f5a700;
  border-color: #ffbe40;
  color: #021527;
}

.crt-journey-bar-btn-next:not(.is-disabled):hover {
  background: #ffbe40;
  color: #021527;
}

@media (max-width: 640px) {
  .crt-journey-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .crt-journey-bar-step {
    order: 1;
    text-align: center;
  }
  .crt-journey-bar-actions--prev {
    order: 2;
  }
  .crt-journey-bar-actions--next {
    order: 3;
  }
  .crt-journey-bar-actions {
    justify-content: space-between;
  }
}
