/* Keep every saved carousel card accessible without the remote application. */
.uitk-carousel-container {
  overflow-x: auto !important;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.uitk-carousel-item { scroll-snap-align: start; }
html, body { overflow-y: auto; }

/* Preserve the original logo boxes when a different image is configured. */
[data-site-logo] { object-fit: contain; object-position: left center; }
.uitk-header-brand-logo [data-site-logo] {
  inline-size: calc(var(--global_navigation__header_brand_logo__default__sizing_height) * 4.4893617021);
}
@media (max-width: 35.938rem) {
  .uitk-header-brand-logo [data-site-logo] {
    inline-size: calc(var(--global_navigation__header_brand_logo__small__sizing_height) * 4.4893617021);
  }
}
#homepage-footer [data-site-logo] { inline-size: 150px; block-size: 22px; max-inline-size: 100%; }

/* The saved homepage is rendered in full, with content-sized placement regions. */
[data-home-placement-id][data-testid="mojo"] {
  height: auto !important;
}
[data-home-placement-id][data-testid="mojo"] > section > .uitk-layout-grid {
  --uitk-layoutgrid-block-size: auto;
}
[data-local-tabs="travel-links"] [role="tabpanel"][hidden] {
  display: none;
}
[data-local-tabs="travel-links"] [role="tablist"] {
  overflow-x: auto;
  scrollbar-width: thin;
}
[data-local-tabs="travel-links"] [role="tab"] {
  white-space: nowrap;
}
[data-local-tabs="travel-links"] [role="tab"][aria-selected="true"] {
  box-shadow: inset 0 -2px #1668e3;
}

:root { --homepage-download-height: calc(80px + env(safe-area-inset-bottom, 0px)); }
body { padding-block-end: var(--homepage-download-height); }
.homepage-download-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #191e3b;
  color: #fff;
  box-shadow: 0 -4px 20px rgb(25 30 59 / 15%);
}
.homepage-download-inner {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  max-inline-size: 1200px;
  min-block-size: 80px;
  margin-inline: auto;
  padding: 12px 24px;
}
.homepage-download-icon {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 12px;
  background: #ffdf00;
  color: #191e3b;
}
.homepage-download-icon svg { inline-size: 24px; block-size: 24px; }
.homepage-download-copy { flex: 1 1 auto; min-inline-size: 0; }
.homepage-download-copy h2 { margin: 0 0 4px; font-size: 18px; line-height: 1.25; color: #fff; }
.homepage-download-copy > span { font-size: 14px; line-height: 1.4; }
.homepage-download-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: 48px;
  padding: 10px 20px;
  border: 0;
  border-radius: 24px;
  background: #ffdf00;
  color: #191e3b;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
.homepage-download-button:hover { background: #ffe94d; }
.homepage-download-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.homepage-download-button svg { flex-shrink: 0; }
#app-lotus-home-ui [data-download-help] {
  bottom: calc(var(--homepage-download-height) + 16px);
  inset-block-end: calc(var(--homepage-download-height) + 16px);
}
@media (max-width: 47.938rem) {
  :root { --homepage-download-height: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .homepage-download-inner { min-block-size: 72px; gap: 12px; padding: 12px 16px; }
  .homepage-download-icon, .homepage-download-copy > span { display: none; }
  .homepage-download-copy h2 { margin: 0; font-size: 14px; line-height: 20px; }
  .homepage-download-button { min-block-size: 44px; padding: 10px 12px; font-size: 14px; }
}

/* The original app changes its header markup at this breakpoint. The static
   copy keeps one accessible menu and presents it compactly instead. */
@media (max-width: 61.938rem) {
  .global-navigation-row-container > .uitk-layout-flex {
    padding-inline: 24px;
    min-block-size: 64px;
  }
  .global-navigation-row-container > .uitk-layout-flex > ul { display: none; }
  #primary-navigation {
    flex-grow: 0;
    margin-inline-start: auto;
    padding-inline-start: 0;
  }
  #primary-navigation > .uitk-menu { position: relative; }
  #primary-navigation button[data-testid="header-menu-button"] {
    min-inline-size: 44px;
    min-block-size: 44px;
    padding: 0;
  }
  #primary-navigation button[data-testid="header-menu-button"] > * { display: none; }
  #primary-navigation button[data-testid="header-menu-button"]::before {
    content: "\2630";
    font-size: 24px;
    line-height: 1;
  }
  #primary-navigation .uitk-menu-container {
    inset-inline-start: auto;
    inset-inline-end: 0;
    max-inline-size: calc(100vw - 48px);
  }
}

@media (max-width: 35.938rem) {
  /* Match the source site's mobile presentation; keep the hero on desktop. */
  .searchFormAndDealsBannerSection .hero-image,
  .search-form-container > h1,
  .search-form-container > .uitk-text { display: none; }
  .searchFormAndDealsBannerSection { background: #fff; }
  .search-form-container {
    margin: 0;
    row-gap: 0;
    min-inline-size: 0;
  }
  .homepage-search-card {
    border: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
  }
  .homepage-product-tabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .homepage-product-tabs::-webkit-scrollbar { display: none; }
  .homepage-product-tabs > li:not(.egds-tab-custom-highlighter) {
    flex: 0 0 96px;
    min-inline-size: 0;
  }
  .homepage-product-tabs .egds-tab-custom-highlighter { display: none; }
  .homepage-product-tabs a.egds-tab-custom-anchor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    min-block-size: 96px;
    font-size: 14px;
    white-space: nowrap;
  }
  .homepage-product-tabs .egds-tab-custom-anchor-selected {
    box-shadow: inset 0 -2px #1668e3;
  }
  .homepage-product-tabs .egds-tab-custom-text { margin: 0; font-size: 14px; line-height: 20px; }
  .homepage-product-tabs .egds-tab-custom-graphic-content > div { margin: 0; padding: 0; }
  .homepage-product-tabs img {
    inline-size: 40px;
    block-size: 40px;
    object-fit: contain;
  }
  #search_form_product_selector_lodging { padding: 24px; }

  /* Flatten only the desktop grid wrapper, so all controls participate in
     normal flow and the package option appears before the search button. */
  #lodging_search_form > div {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  #lodging_search_form [data-mobile-search-grid] { display: contents; }
  .homepage-search-field {
    min-inline-size: 0;
    inline-size: 100%;
    margin: 0;
  }
  [data-mobile-search-field="destination"] { order: 1; }
  [data-mobile-search-field="dates"] { order: 2; display: block; }
  [data-mobile-search-field="travelers"] { order: 3; }
  [data-mobile-search-options] { order: 4; margin-block-start: 0; }
  [data-mobile-search-field="submit"] { order: 5; }
  .homepage-search-field:not([data-mobile-search-field="submit"]) {
    border: 1px solid #818494;
    border-radius: 8px;
  }
  .homepage-search-field > div { min-inline-size: 0; inline-size: 100%; }
  .homepage-search-field .uitk-field {
    inline-size: 100%;
    min-inline-size: 0;
    block-size: 48px;
  }
  #lodging_search_form .search-form-field-separator-left,
  #lodging_search_form .search-form-field-separator-right { display: none; }
  #lodging_search_form .homepage-search-field input.uitk-field-input,
  #lodging_search_form .homepage-search-field button.uitk-field-fake-input {
    inline-size: 100%;
    block-size: 48px;
    min-block-size: 48px;
    padding: 18px 12px 6px 44px;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #lodging_search_form [data-mobile-search-field="destination"] input.uitk-field-input { padding-block: 12px; }
  #lodging_search_form .homepage-search-field .uitk-field-icon {
    inset-inline-start: 12px;
    inset-block-start: 12px;
    transform: none;
  }
  #lodging_search_form [data-mobile-search-field="dates"] .uitk-field-label,
  #lodging_search_form [data-mobile-search-field="travelers"] .uitk-field-label {
    clip: auto;
    clip-path: none;
    block-size: auto;
    inline-size: auto;
    margin: 0;
    overflow: visible;
    inset-inline-start: 44px;
    inset-block-start: 4px;
    font-size: 12px;
    line-height: 14px;
    transform: none;
  }
  #lodging_search_form .uitk-menu-container { max-inline-size: calc(100vw - 48px); }
  [data-mobile-search-options] .uitk-checkbox-label-content {
    font-size: 14px;
    line-height: 20px;
    white-space: normal;
  }
  #search_button {
    width: 100%;
    min-block-size: 48px;
    margin: 0;
    font-size: 16px;
  }

  /* Give the long German heading the full text column, without squeezing
     it between an illustration and a desktop-sized call to action. */
  .homepage-sale-layout {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
    row-gap: 8px;
  }
  .homepage-sale-layout > :first-child { grid-row: 1 / span 2; }
  .homepage-sale-layout > :nth-child(2) { min-width: 0; }
  .homepage-sale-layout > :last-child { grid-column: 2; }
  .homepage-sale-layout img { inline-size: 40px; block-size: 40px; }
  [data-home-placement-id="sale-banner"] .homepage-sale-layout h1 {
    font-size: 26px;
    line-height: 1.2;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
  }
  .homepage-sale-layout [data-testid="mojo-text"] { font-size: 14px; line-height: 1.4; }
  .homepage-sale-layout a.uitk-button {
    display: inline-flex;
    min-block-size: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 14px;
    text-decoration: underline;
  }
  [data-home-placement-id] .homepage-mobile-stack { grid-template-columns: minmax(0, 1fr); }
}
