/* ========================================
   HOW IT WORKS - extra parts
   (quick search, deposit note, included list,
   questions, closing buttons)
   ======================================== */

/* Anything marked hidden stays hidden */
.journey-details [hidden] {
  display: none !important;
}

/* The step box stays hidden until a stop is clicked */
.journey-details.is-closed {
  display: none;
}

.journey-details.is-open {
  animation: journeyCardIn 0.45s ease both;
}

@keyframes journeyCardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Quick Search (step 1) */
.quick-search {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.quick-search select,
.quick-search input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background-color: rgba(8, 20, 34, 0.55);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.quick-search select {
  padding-right: 36px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #39b8ed 50%),
    linear-gradient(-45deg, transparent 50%, #39b8ed 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.quick-search select option {
  background: #12263a;
  color: #ffffff;
}

.quick-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

/* Hide the little up/down arrows in the price boxes */
.quick-search input::-webkit-outer-spin-button,
.quick-search input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quick-search input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.quick-search select:hover,
.quick-search input:hover {
  border-color: rgba(57, 184, 237, 0.6);
}

.quick-search select:focus,
.quick-search input:focus {
  border-color: #39b8ed;
  background-color: rgba(8, 20, 34, 0.8);
  outline: none;
}

.quick-search button {
  grid-column: 1 / -1;
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #39b8ed;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 48px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.quick-search button:hover {
  background: #5cc8f2;
  transform: translateY(-1px);
}

.quick-search button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Matching cars (step 2) */
.journey-matches {
  margin-top: 20px;
}

.match-heading {
  margin: 0 0 12px;
  color: #39b8ed;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.match-list {
  display: grid;
  gap: 10px;
}

.match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(8, 20, 34, 0.45);
  transition: border-color 0.2s ease;
}

.match-card:hover {
  border-color: rgba(57, 184, 237, 0.5);
}

.match-info p {
  margin: 0;
}

.match-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

.match-price {
  margin-top: 2px !important;
  color: #c3d3e0;
  font-size: 14px;
}

.match-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

.match-button {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #39b8ed;
  border-radius: 8px;
  background: #39b8ed;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.match-button:hover {
  background: #5cc8f2;
}

.match-button-secondary {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.match-button-secondary:hover {
  background: rgba(57, 184, 237, 0.12);
  border-color: #39b8ed;
}

.match-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #c3d3e0;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.match-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.match-link {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: #39b8ed;
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.match-link:hover {
  text-decoration: underline;
}

.match-status {
  margin: 0 0 12px;
  color: #c3d3e0;
  font-size: 14px;
  line-height: 1.6;
}

.journey-matches > .match-button {
  margin-right: 14px;
}

.match-small {
  margin: 12px 0 0;
  color: #8fa6b8;
  font-size: 12px;
  line-height: 1.5;
}

/* Deposit note (step 2) */
.journey-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 168, 0, 0.45);
  border-radius: 10px;
  background: rgba(255, 168, 0, 0.1);
  color: #f3e6cc;
  font-size: 14px;
  line-height: 1.6;
}

/* Extra info (step 4) */
.journey-extra {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #c3d3e0;
  font-size: 14px;
  line-height: 1.6;
}

/* Shared heading for the parts below the box */
.journey-included h3,
.journey-faq h3,
.journey-start h3 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 24px;
  text-align: center;
}

/* What's included */
.journey-included {
  max-width: 900px;
  margin: 70px auto 0;
}

.journey-included ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-included li {
  padding: 9px 16px;
  border: 1px solid rgba(93, 193, 234, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #e6eef5;
  font-size: 14px;
}

.journey-included li::before {
  content: "✓ ";
  color: #39b8ed;
  font-weight: 700;
}

/* Common questions */
.journey-faq {
  max-width: 750px;
  margin: 70px auto 0;
  text-align: left;
}

.journey-faq details {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.journey-faq details:first-of-type {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.journey-faq summary {
  position: relative;
  padding: 18px 40px 18px 4px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.journey-faq summary::-webkit-details-marker {
  display: none;
}

.journey-faq summary::after {
  content: "+";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #39b8ed;
  font-size: 24px;
  font-weight: 400;
}

.journey-faq details[open] summary::after {
  content: "−";
}

.journey-faq summary:hover {
  color: #39b8ed;
}

.journey-faq summary:focus-visible {
  outline: 2px solid #39b8ed;
  outline-offset: 2px;
}

.journey-faq details p {
  margin: 0;
  padding: 0 4px 20px;
  color: #c3d3e0;
  font-size: 15px;
  line-height: 1.7;
}

.journey-faq details a {
  color: #39b8ed;
}

/* Closing buttons */
.journey-start {
  margin: 70px auto 0;
  text-align: center;
}

.journey-start-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.journey-start .journey-cta {
  margin-top: 0;
}

.journey-cta-secondary {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
}

.journey-cta-secondary:hover {
  border-color: #39b8ed;
  background: rgba(57, 184, 237, 0.12);
}

/* Phones */
@media (max-width: 750px) {
  .journey-stop .stop-name {
    font-size: 10px;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 650px) {
  .quick-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .match-actions {
    width: 100%;
  }

  .match-actions .match-button {
    flex: 1;
    text-align: center;
  }

  .journey-included,
  .journey-faq,
  .journey-start {
    margin-top: 50px;
  }

  .journey-included h3,
  .journey-faq h3,
  .journey-start h3 {
    font-size: 21px;
  }

  .journey-faq summary {
    font-size: 16px;
  }
}