/* Booking Journey page template - Hero Banner, Booking Steps, Appointment Cards */

.ch-booking-journey {
  color: #111827;
}

.ch-booking-container {
  max-width: 1248px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero Banner */
.ch-booking-hero {
  background-color: #66c3d3;
  padding: 48px 0;
}

.ch-booking-hero__title {
  margin: 0 0 12px;
  font-size: 53px;
  line-height: 1.1;
  font-weight: 400;
  color: #ffffff;
}

.ch-booking-hero__intro {
  margin: 0;
  max-width: 720px;
  font-size: 18px;
  line-height: 1.4;
  color: #ffffff;
}

/* Shared content section */
.ch-booking-main {
  background-color: #eff1f3;
  padding: 36px 0 60px 0;
}

.ch-booking-content {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.ch-booking-section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 24px;
}

.ch-booking-section-title {
  font-size: 24px;
  font-weight: 500;
  color: #000000;
  margin: 0;
}

.ch-booking-section-description {
  margin: 0;
  max-width: 720px;

  p {
    margin: 0;
  }
}

.ch-booking-progress {
  background-color: #eff1f3;
  padding: 48px 0 24px 0;
  position: sticky;
  top: -24px;
  z-index: 10;
}

/* Progress bar */
.ch-progress-wrap {
  position: relative;
}

/* Track sits behind the circles, inset by the circle radius so its ends land on the outer circle centres */
.ch-progress__track {
  position: absolute;
  z-index: 0;
  top: 13px;
  left: 16px;
  right: 16px;
  height: 6px;
  display: flex;
}

.ch-progress__track-segment--complete {
  background-color: #66c3d3;
  transition: width 0.3s ease-in-out;
}

.ch-progress__track-segment--incomplete {
  background-color: #aadae3;
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.ch-progress {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ch-progress__step {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 180px;
  cursor: pointer;
}

.ch-progress__step:focus-visible {
  outline: 2px solid #66c3d3;
  outline-offset: 4px;
}

/* Pin the outer steps to the container edges to line up with the content below */
.ch-progress__step:first-child {
  align-items: flex-start;
}

.ch-progress__step:last-child {
  align-items: flex-end;
}

.ch-progress__step:first-child .ch-progress__label {
  text-align: left;
}

.ch-progress__step:last-child .ch-progress__label {
  text-align: right;
}

.ch-progress__circle {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border-radius: 999px;
  background-color: #aadae3;
}

.ch-progress__step--complete .ch-progress__circle {
  background-color: #66c3d3;
}

.ch-progress__step--current .ch-progress__circle {
  background-color: #ffffff;
  border: 2px solid #66c3d3;
}

.ch-progress__icon {
  width: 24px;
  height: 24px;
  display: block;
}

.ch-progress__label {
  max-width: 180px;
  font-size: 18px;
  line-height: 1.3;
  color: #000000;
  text-align: center;
}

/* Booking Steps */
.ch-booking-steps {
  position: relative;
}

.ch-booking-steps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.ch-booking-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ch-booking-step--1 {
  background-color: #b6e4eb;
}

.ch-booking-step--2 {
  background-color: #d8f2f5;
}

.ch-booking-step--3 {
  background-color: #f0fafb;
}

.ch-booking-step p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  color: #000000;
}

/* Appointment Cards */
.ch-booking-appointments__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.ch-appointment-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  background-color: #ffffff;
  border: 3px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease;
}

.ch-appointment-card.is-active {
  border-color: #66c3d3;
}

.ch-appointment-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ch-appointment-card__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.ch-appointment-card__title {
  margin: 0;
  flex: 1 0 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.ch-appointment-card__body {
  margin: 0;
  flex-grow: 1;
  font-size: 14px;
  line-height: 1.5;
  color: #111827;
  padding-right: 14%;
}

.ch-appointment-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.ch-appointment-card__meta {
  font-size: 14px;
  color: #6b7280;
  white-space: nowrap;
}

.ch-appointment-card__button {
  border: none;
  display: inline-block;
  flex-shrink: 0;
  padding: 8px 20px;
  border-radius: 999px;
  background-color: #d84e00;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.ch-appointment-card__button:hover,
.ch-appointment-card__button:active,
.ch-appointment-card__button:focus {
  border: none;
  background-color: #b34200;
  color: #ffffff;
  text-decoration: none;
}

.ch-booking-appointments__note {
  margin: 0;
  max-width: 720px;
  font-size: 14px;
  font-style: italic;
  font-weight: 300;
  line-height: 1.4;
  color: #000000;
}

.ch-booking-doctors__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;

  .item {
    background-color: #f5f7fe;
    border-radius: 12px;
  }
}

/* Hidden until an appointment type is selected */
.is-hidden {
  display: none;
}

/* Booking Form */
.ch-booking-form__iframe {
  width: 100%;
}

.ch-booking-form__iframe iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* Small Desktop */
@media (max-width: 1535px) {
  .ch-booking-doctors__grid {
    gap: 8px;
  }
}

/* Laptop */
@media (max-width: 1199px) {
  .ch-booking-doctors__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ch-booking-content {
    gap: 40px;
  }
}

/* Tablet */
@media (max-width: 991px) {
  .ch-booking-progress {
    padding: 32px 0 16px 0;
    top: -16px;
  }

  .ch-booking-steps__grid {
    grid-template-columns: 1fr;
  }

  .ch-booking-appointments__grid {
    grid-template-columns: 1fr;
  }

  .ch-booking-hero__title {
    font-size: 42px;
  }

  .ch-booking-hero__intro {
    font-size: 16px;
  }

  .ch-progress__label {
    font-size: 16px;
  }

  .ch-booking-section-header {
    margin: 0 0 20px;
  }

  .ch-booking-section-title {
    font-size: 20px;
  }

  .ch-appointment-card__body {
    padding-right: 0;
  }

  .ch-appointment-card__button {
    font-size: 14px !important;
  }

  .ch-booking-doctors__grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Mobile */
@media (max-width: 600px) {
  .ch-booking-container {
    padding: 0 16px;
  }

  .ch-booking-hero {
    padding: 32px 0;
  }

  .ch-booking-hero__title {
    font-size: 32px;
  }

  .ch-booking-main {
    padding: 24px 0 40px 0;
  }

  .ch-booking-content {
    gap: 32px;
  }

  .ch-appointment-card__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .ch-appointment-card__button {
    width: 100%;
    text-align: center;
  }

  .ch-progress__label {
    font-size: 13px;
    max-width: 90px;
  }

  .ch-progress__circle {
    width: 24px;
    height: 24px;
  }

  .ch-progress__icon {
    width: 18px;
    height: 18px;
  }

  .ch-progress__track {
    top: 9px;
    left: 12px;
    right: 12px;
    height: 4px;
  }

  .ch-booking-section-title {
    font-size: 18px;
  }

  .ch-booking-section-header {
    margin: 0 0 12px;
  }

  .ch-booking-step p {
    font-size: 14px;
  }

  .ch-booking-steps__grid {
    gap: 10px;
  }

  .ch-booking-appointments__grid {
    gap: 8px;
  }

  .ch-appointment-card__icon {
    width: 24px;
    height: 24px;
  }

  .ch-appointment-card__title {
    font-size: 16px;
  }
}
