.itinerary-builder {
  background: #f7f8fb;
  color: #111322;
  padding: calc(var(--navbar-height, 73px) + 28px) 0 72px;
}

.itinerary-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
}

.builder-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
}

.builder-hero-copy,
.builder-hero-media,
.builder-panel,
.summary-card {
  background: #ffffff;
  border: 1px solid rgba(30, 29, 73, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(30, 29, 73, 0.08);
}

.builder-hero-copy {
  min-height: 390px;
  padding: clamp(32px, 5vw, 74px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.builder-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  color: #b50061;
  font-weight: 800;
  margin-bottom: 18px;
}

.builder-hero h1 {
  color: #1e1d49;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.96;
  max-width: 760px;
  text-transform: none;
}

.builder-hero p {
  color: #4b5268;
  font-size: 20px;
  line-height: 1.65;
  max-width: 720px;
  margin-top: 22px;
}

.builder-hero-media {
  position: relative;
  min-height: 390px;
  overflow: hidden;
}

.builder-hero-media img,
.summary-hero img,
.choice-card.image-card img,
.experience-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-floating-card {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.hero-floating-card strong,
.hero-floating-card span {
  display: block;
}

.hero-floating-card strong {
  color: #1e1d49;
  font-size: 18px;
}

.hero-floating-card span {
  color: #4b5268;
  margin-top: 4px;
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: start;
}

.builder-panel {
  padding: clamp(18px, 3vw, 34px);
  min-width: 0;
}

.builder-progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 30px;
}

.progress-step {
  border: 0;
  border-radius: 999px;
  background: #eef1f7;
  color: #555c70;
  min-height: 42px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 13px;
  transition: background 0.2s ease, color 0.2s ease;
}

.progress-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  border-radius: 50%;
  background: #ffffff;
  color: #1e1d49;
}

.progress-step.active {
  background: #1e1d49;
  color: #ffffff;
}

.builder-step {
  display: none;
}

.builder-step.active {
  display: block;
}

.step-heading {
  margin-bottom: 22px;
}

.step-heading > span {
  color: #b50061;
  font-weight: 800;
}

.step-heading h2 {
  color: #1e1d49;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  margin-top: 6px;
  text-transform: none;
}

.step-heading p {
  color: #596073;
  line-height: 1.65;
  margin-top: 10px;
}

.choice-grid,
.experience-grid,
.date-grid,
.form-grid {
  display: grid;
  gap: 16px;
}

.choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trip-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card,
.experience-card,
.field-card,
.counter-row,
.toggle-list label {
  border: 1px solid rgba(30, 29, 73, 0.12);
  border-radius: 14px;
  background: #ffffff;
}

.choice-card,
.experience-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  color: #1e1d49;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.choice-card {
  min-height: 154px;
  padding: 18px;
}

.choice-card.image-card {
  min-height: 270px;
  padding: 0;
}

.choice-card.image-card img {
  aspect-ratio: 4 / 3;
  height: auto;
}

.choice-card.image-card span,
.choice-card.image-card small {
  padding-left: 16px;
  padding-right: 16px;
}

.choice-card.image-card span {
  padding-top: 16px;
}

.choice-card.image-card small {
  padding-bottom: 16px;
}

.choice-card i {
  color: #e45b01;
  font-size: 26px;
  margin-bottom: 18px;
}

.choice-card span,
.experience-card span {
  font-weight: 900;
  font-size: 18px;
}

.choice-card small,
.experience-card small,
.counter-row span {
  color: #5c6375;
  line-height: 1.45;
  margin-top: 6px;
}

.choice-card:hover,
.experience-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(30, 29, 73, 0.12);
}

.choice-card.selected,
.experience-card.selected {
  border-color: #b50061;
  box-shadow: 0 0 0 3px rgba(181, 0, 97, 0.12);
}

.date-grid,
.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.field-card,
.builder-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-card {
  padding: 18px;
}

.field-card span,
.builder-form label span {
  color: #1e1d49;
  font-weight: 800;
}

.field-card input {
  height: 50px;
  border: 1px solid #cdd5e5;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  cursor: pointer;
}

.counter-grid,
.toggle-list {
  display: grid;
  gap: 12px;
}

.counter-grid {
  margin-bottom: 18px;
}

.counter-row,
.toggle-list label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px;
}

.counter-row strong {
  display: block;
  color: #1e1d49;
  font-size: 18px;
}

.counter-row span {
  display: block;
}

.counter-controls {
  display: grid;
  grid-template-columns: 42px 48px 42px;
  align-items: center;
  gap: 8px;
}

.counter-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #eef1f7;
  color: #1e1d49;
}

.counter-controls output {
  color: #1e1d49;
  font-weight: 900;
  text-align: center;
  font-size: 20px;
}

/* Flatpickr theme overrides, aligned with the hotel booking picker. */
.flatpickr-input[readonly] {
  background: #ffffff;
  cursor: pointer;
}

.flatpickr-calendar {
  font-family: "Open Sans", Arial, sans-serif !important;
  border: 1px solid #c7d1e5 !important;
  box-shadow: 0 4px 20px rgba(30, 29, 73, 0.08) !important;
  border-radius: 8px !important;
  padding: 6px !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
  border-bottom-color: #c7d1e5;
}

.flatpickr-months .flatpickr-month {
  height: 44px;
  color: #1e1d49;
}

.flatpickr-current-month {
  font-family: "Quicksand", sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  padding-top: 6px !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  font-family: "Quicksand", sans-serif !important;
  font-weight: 600 !important;
  font-size: 1.05rem !important;
}

.flatpickr-weekdays {
  background: transparent;
}

.dayContainer {
  justify-content: flex-start;
}

span.flatpickr-weekday {
  color: #727d98;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: transparent;
}

.flatpickr-day {
  border-radius: 8px;
  color: #1e1d49;
  font-weight: 500;
  height: 40px;
  line-height: 40px;
  max-width: none;
  width: 14.2857%;
  flex-basis: 14.2857%;
}

.flatpickr-day:hover {
  background: #eef3ff;
  border-color: transparent;
}

.flatpickr-day.today {
  border-color: #b50061;
  color: #b50061;
}

.flatpickr-day.today:hover {
  background: #fff0f7;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  background: #b50061 !important;
  border-color: #b50061 !important;
  color: #ffffff !important;
}

.flatpickr-day.inRange,
.flatpickr-day.inRange:hover,
.flatpickr-day.prevMonthDay.inRange,
.flatpickr-day.nextMonthDay.inRange {
  background: #eef3ff !important;
  color: #1e1d49 !important;
  border-color: #eef3ff !important;
  box-shadow: -5px 0 0 #eef3ff, 5px 0 0 #eef3ff !important;
}

.flatpickr-day.startRange.endRange {
  border-radius: 8px !important;
}

.flatpickr-day.startRange {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.flatpickr-day.endRange {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: #c8ccd4;
  background: transparent;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
  fill: #4b5572;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
  fill: #b50061;
}

.toggle-list {
  margin-top: 18px;
}

.toggle-list label {
  justify-content: flex-start;
  color: #1e1d49;
  font-weight: 800;
}

.toggle-list input {
  width: 22px;
  height: 22px;
  accent-color: #b50061;
}

.experience-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-chip {
  border: 1px solid rgba(30, 29, 73, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: #1e1d49;
  min-height: 38px;
  padding: 0 16px;
  font-weight: 800;
}

.filter-chip.active {
  background: #1e1d49;
  color: #ffffff;
}

.experience-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.experience-card {
  min-height: 210px;
  padding: 0 0 14px;
}

.experience-card img {
  aspect-ratio: 4 / 3;
  height: auto;
}

.experience-card span,
.experience-card small {
  padding-left: 14px;
  padding-right: 14px;
}

.experience-card span {
  padding-top: 12px;
}

.builder-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
}

.builder-back,
.builder-next,
.builder-submit {
  min-height: 50px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.builder-back {
  border: 1px solid rgba(30, 29, 73, 0.18);
  background: #ffffff;
  color: #1e1d49;
}

.builder-next {
  border: 0;
  background: #b50061;
  color: #ffffff;
  margin-left: auto;
}

.builder-form b {
  color: #b50061;
}

.wide-field {
  margin-bottom: 18px;
}

.builder-submit {
  border-radius: 999px !important;
  width: auto !important;
  padding: 0 24px !important;
  text-transform: none !important;
}

.builder-summary {
  position: sticky;
  top: calc(var(--navbar-height, 73px) + 18px);
}

.summary-card {
  padding: 18px;
}

.summary-header,
.summary-hero,
.summary-stats,
.summary-section {
  margin-bottom: 18px;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.summary-header span,
.summary-label {
  color: #6a7080;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-header strong {
  color: #b50061;
}

.summary-hero {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.summary-hero img {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}

.summary-hero strong,
.summary-hero span {
  display: block;
}

.summary-hero strong {
  color: #1e1d49;
  font-size: 20px;
  line-height: 1.15;
}

.summary-hero span {
  color: #5c6375;
  margin-top: 6px;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.summary-stats div {
  background: #f5f8ff;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}

.summary-stats strong,
.summary-stats span {
  display: block;
}

.summary-stats strong {
  color: #1e1d49;
  font-size: 20px;
}

.summary-stats span {
  color: #5c6375;
  font-size: 12px;
  font-weight: 800;
}

.summary-section ul,
.summary-section ol {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 0;
}

.summary-section li {
  color: #30364a;
  line-height: 1.35;
}

.summary-section ul li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.summary-section ul li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e45b01;
  margin-top: 8px;
  flex: 0 0 auto;
}

.day-preview ol {
  list-style: none;
  counter-reset: days;
}

.day-preview li {
  counter-increment: days;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
}

.day-preview li::before {
  content: counter(days);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e1d49;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

@media (max-width: 1199px) {
  .builder-hero,
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .builder-summary {
    position: static;
  }

  .trip-grid,
  .experience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .itinerary-builder {
    padding-top: calc(var(--navbar-height, 73px) + 16px);
  }

  .itinerary-shell {
    width: min(100% - 24px, 720px);
  }

  .builder-hero-copy {
    min-height: 0;
    padding: 28px;
  }

  .builder-hero-media {
    min-height: 260px;
  }

  .builder-progress {
    grid-template-columns: repeat(3, 1fr);
  }

  .progress-step {
    font-size: 12px;
  }

  .trip-grid,
  .choice-grid,
  .choice-grid.compact,
  .experience-grid,
  .date-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .choice-card.image-card {
    min-height: 0;
  }

  .counter-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .counter-controls {
    width: 100%;
    grid-template-columns: 42px 1fr 42px;
  }

  .flatpickr-calendar.open {
    left: 50% !important;
    right: auto !important;
    width: calc(100vw - 62px) !important;
    max-width: 328px !important;
    min-width: 0 !important;
    transform: translateX(-50%) !important;
    animation: none !important;
    opacity: 1 !important;
  }

  .flatpickr-calendar.inline {
    width: calc(100vw - 62px) !important;
    max-width: 328px !important;
    min-width: 0 !important;
  }

  .flatpickr-calendar.arrowTop:before,
  .flatpickr-calendar.arrowTop:after {
    display: none;
  }

  .flatpickr-days,
  .flatpickr-rContainer {
    width: auto !important;
    max-width: 100% !important;
  }

  .dayContainer {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .builder-back,
  .builder-next {
    flex: 1;
    padding: 0 14px;
  }
}
