/* Trip/result page — structural mobile layout only (≤699px). */

/* Beat `.app-layout main` padding-inline so trip spacing is consistent */
.app-layout main.trip-page,
main.trip-page,
.trip-page {
  padding: 1rem 0.75rem 5.5rem;
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow-x: clip;
}

.trip-page__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: stretch;
  gap: 0.5rem;
  block-size: auto;
  min-block-size: 0;
  margin-block-end: 0.5rem;
  padding-block: 0.55rem;
  padding-inline: 0.75rem;
}

.trip-page__toolbar-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  inline-size: 100%;
  min-inline-size: 0;
}

.trip-page__toolbar-actions > .button--primary {
  inline-size: 100%;
  justify-content: center;
}

.trip-save-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  inline-size: 100%;
}

.trip-save-actions__button {
  justify-content: center;
  min-inline-size: 0;
  inline-size: 100%;
}

.trip-page__grid {
  gap: 1rem;
  min-inline-size: 0;
}

.trip-page__card {
  min-inline-size: 0;
  max-inline-size: 100%;
  padding: 0.9rem;
  overflow-x: clip;
}

.trip-page__card-title {
  min-inline-size: 0;
  gap: 0.45rem;
}

.trip-page__hero-title-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.trip-page__hero-title-line {
  flex-wrap: wrap;
  gap: 0.65rem;
  min-inline-size: 0;
}

.trip-page__hero-destination,
.trip-page__hero-destination h1 {
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}

.trip-page__hero-price {
  align-items: flex-start;
}

.trip-page__hero-main {
  flex-direction: column;
  gap: 1rem;
  min-inline-size: 0;
}

.trip-page__hero-details,
.trip-page__hero-media {
  min-inline-size: 0;
  max-inline-size: 100%;
  inline-size: 100%;
}

.trip-page__hero-media-frame {
  block-size: 11rem;
}

.trip-page__estimate-dates {
  flex-wrap: wrap;
}

.trip-page__estimate-date {
  flex: 1 1 8rem;
  padding: 0.55rem 0.65rem;
  min-inline-size: 0;
}

.trip-page__estimate-weather {
  flex-basis: 100%;
  padding: 0 0.65rem 0.55rem;
}

.trip-page__estimate-date-divider {
  display: none;
}

.trip-page__estimate-title,
.trip-page__estimate-row {
  padding-inline: 0.65rem;
}

.trip-page__estimate-row {
  gap: 0.5rem;
  min-inline-size: 0;
}

.trip-page__estimate-label {
  flex: 1 1 auto;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.trip-page__estimate-value {
  flex-shrink: 0;
}

.trip-page__hero-description {
  min-inline-size: 0;
  overflow-wrap: anywhere;
  padding-inline: 0;
}

/* Flights — prevent horizontal clip of arrival times/cities */
.trip-flight__card,
.trip-flight__body,
.trip-flight__offer,
.trip-flight__pair,
.trip-flight__leg {
  min-inline-size: 0;
  max-inline-size: 100%;
}

.trip-flight__pair {
  flex-direction: column;
}

.trip-flight__divider {
  inline-size: 100%;
  block-size: 1px;
  margin-block: 0.25rem;
}

.trip-flight__leg {
  align-items: stretch;
  padding-inline: 0;
}

.trip-flight__route {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 0.35rem;
  min-inline-size: 0;
  inline-size: 100%;
}

.trip-flight__time {
  min-inline-size: 0;
  max-inline-size: none;
}

.trip-flight__time-city {
  max-inline-size: 5.5rem;
  overflow-wrap: anywhere;
  white-space: normal;
  text-overflow: clip;
  overflow: visible;
}

.trip-flight__line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.2rem;
  min-inline-size: 0;
  max-inline-size: none;
  inline-size: 100%;
}

.trip-flight__dash {
  inline-size: 100%;
  min-inline-size: 0;
}

.trip-flight__code {
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.trip-flight__meta {
  overflow-wrap: anywhere;
}

.trip-flight__airline {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.trip-flight__details {
  flex-wrap: wrap;
  gap: 0.75rem;
}

.trip-flight__footer {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.trip-flight__price,
.trip-flight__price-note {
  white-space: normal;
}

/* Hotels */
.trip-hotel__media img,
.trip-hotel__media-placeholder {
  block-size: min(42vh, 16rem);
}

.trip-hotel__title-row {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trip-hotel__name {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: anywhere;
}

.trip-hotel__score {
  align-items: flex-start;
  text-align: start;
}

.trip-hotel__date-row {
  gap: 0.5rem;
}

.trip-hotel__date-value {
  white-space: normal;
  text-align: end;
  overflow-wrap: anywhere;
}

.trip-hotel__footer {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.trip-hotel__footer .trip-hotel__price {
  white-space: normal;
}

/* Content grids / lists */
.trip-restaurant__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.trip-restaurant__body {
  padding: 0.65rem;
}

.trip-restaurant__name,
.trip-activity__name,
.trip-event__name,
.trip-sight__name {
  overflow-wrap: anywhere;
}

.trip-activity__item,
.trip-event__item {
  gap: 0.55rem;
  min-inline-size: 0;
}

.trip-activity__main,
.trip-event__main,
.trip-sight__main {
  min-inline-size: 0;
}

.trip-event__aside,
.trip-sight__aside {
  max-inline-size: 40%;
  min-inline-size: 0;
}

/* Chat widget — fit narrow viewports */
.trip-page__chat-widget {
  inset-inline-end: 0.75rem;
  inset-block-end: 0.75rem;
}

.trip-page__chat-popup {
  inline-size: min(calc(100vw - 1.5rem), 22rem);
  max-block-size: min(70dvh, 32rem);
}

.trip-page__chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.trip-page__chat-actions button {
  flex: 1 1 auto;
  min-inline-size: 0;
}
