/* Shared navigation: translated words keep their natural boundaries. */
@media (min-width: 981px) {
  body.public-body .aa-main-nav-compact a {
    overflow-wrap: normal;
    word-break: normal;
  }
}

/* The compact brand row has less room than the full-width navigation strip. */
@media (min-width: 981px) and (max-width: 1180px) {
  body.public-body .aa-main-nav-compact {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 2px 12px;
  }

  body.public-body .aa-main-nav-compact a {
    min-height: 24px;
    justify-content: center;
  }
}

/* Keep the financing control attached to the viewport edge in every language. */
body.public-body {
  --aa-rate-rail-width: 58px;
  --aa-rate-toggle-min-height: 196px;
}

html body.public-body.home-body .aa-rate-shell-floating,
html body.public-body.home-body .aa-rate-shell-floating.is-stuck,
html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell {
  position: fixed !important;
  top: calc(var(--aa-sticky-rate-top, 64px) + 8px) !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  width: var(--aa-rate-rail-width) !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  pointer-events: none !important;
  z-index: 520 !important;
}

html body.public-body.home-body .aa-rate-shell-floating .aa-rate-shell-inner,
html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell .aa-rate-shell-inner {
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  pointer-events: auto !important;
}

html body.public-body.home-body .aa-rate-shell-floating .aa-rate-toggle,
html body.public-body.home-body .aa-rate-shell-floating .aa-rate-toggle:hover,
html body.public-body.home-body .aa-rate-shell-floating .aa-rate-toggle.is-open,
html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell .aa-rate-toggle,
html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell .aa-rate-toggle:hover,
html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell .aa-rate-toggle.is-open {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  width: var(--aa-rate-rail-width) !important;
  min-width: var(--aa-rate-rail-width) !important;
  max-width: var(--aa-rate-rail-width) !important;
  height: auto !important;
  min-height: var(--aa-rate-toggle-min-height) !important;
  margin: 0 !important;
  padding: 20px 12px 10px !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  box-sizing: border-box;
}

html body.public-body.home-body .aa-rate-shell-floating .aa-rate-toggle > span:first-child,
html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell .aa-rate-toggle > span:first-child {
  position: static !important;
  writing-mode: vertical-rl;
  transform: rotate(180deg) !important;
  white-space: nowrap !important;
  flex: none;
}

html body.public-body.home-body .aa-rate-shell-floating .aa-rate-toggle-icon,
html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell .aa-rate-toggle-icon {
  position: static !important;
  transform: none !important;
  flex: none;
}

html body.public-body.home-body .aa-rate-shell-floating .aa-rate-toggle:focus-visible,
html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell .aa-rate-toggle:focus-visible {
  outline: 2px solid #142030 !important;
  outline-offset: 3px;
}

html body.public-body.home-body .aa-rate-shell-floating .rate-panel-wrap,
html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell .rate-panel-wrap {
  position: fixed !important;
  top: calc(var(--aa-sticky-rate-top, 64px) + 8px) !important;
  right: calc(var(--aa-rate-rail-width) + 10px) !important;
  left: auto !important;
  bottom: auto !important;
  width: min(980px, calc(100vw - var(--aa-rate-rail-width) - 26px)) !important;
  max-width: min(980px, calc(100vw - var(--aa-rate-rail-width) - 26px)) !important;
  max-height: calc(100dvh - var(--aa-sticky-rate-top, 64px) - 24px) !important;
  overflow-y: auto !important;
  visibility: visible;
}

html body.public-body.home-body .aa-rate-shell-floating .rate-panel-wrap.is-collapsed,
html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell .rate-panel-wrap.is-collapsed {
  max-height: 0 !important;
  visibility: hidden;
}

@media (max-width: 980px) {
  body.public-body {
    --aa-rate-rail-width: 52px;
    --aa-rate-toggle-min-height: 156px;
  }

  html body.public-body.home-body .aa-rate-shell-floating,
  html body.public-body.home-body .aa-rate-shell-floating.is-stuck,
  html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell {
    top: auto !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
    height: auto !important;
  }

  html body.public-body.home-body .aa-rate-shell-floating .rate-panel-wrap,
  html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell .rate-panel-wrap {
    top: auto !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
    max-height: min(68dvh, 620px) !important;
  }

  html body.public-body.home-body .aa-rate-shell-floating .rate-panel-wrap.is-collapsed,
  html body.public-body:not(.home-body):not(.tracking-body) .aa-rate-shell .rate-panel-wrap.is-collapsed {
    max-height: 0 !important;
  }
}

/* Equipment wraps inside its column instead of flowing beneath the price rail. */
html body.public-body main.aa-listing-page .aa-offer-card-row .aa-offer-features li {
  min-width: 0;
  white-space: normal !important;
  overflow-wrap: normal;
  word-break: normal;
}

/* At tablet widths the image, copy and fixed price rail cannot share one row. */
@media (min-width: 981px) and (max-width: 1340px) {
  html body.public-body main.aa-listing-page .aa-offer-card-row {
    grid-template-columns: minmax(220px, 36%) minmax(0, 1fr) !important;
  }

  html body.public-body main.aa-listing-page .aa-offer-card-row .aa-offer-copy {
    min-width: 0;
    padding: 20px !important;
  }

  html body.public-body main.aa-listing-page .aa-offer-card-row .aa-offer-features {
    order: 5 !important;
    padding-top: 0 !important;
  }

  html body.public-body main.aa-listing-page .aa-offer-card-row .aa-offer-prices {
    position: static !important;
    order: 6 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: end;
    width: 100% !important;
    margin-top: 8px !important;
    padding: 12px !important;
  }

  html body.public-body main.aa-listing-page .aa-offer-card-row .aa-offer-cta {
    position: static !important;
    align-self: stretch !important;
    width: 100% !important;
    margin-top: 5px !important;
    padding: 10px 20px !important;
    height: auto !important;
    white-space: normal;
    text-align: center;
  }
}

/* Both amounts in a summary row share a baseline when one label needs two lines. */
body.public-body .aa-detail-page .aa-azja-price-grid .aa-azja-price-item {
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 0;
}

body.public-body .aa-detail-page .aa-detail-summary .aa-detail-actions .button-primary,
body.public-body .aa-detail-page .aa-detail-summary .aa-detail-actions .aa-cta-secondary {
  overflow-wrap: normal;
  word-break: normal;
}

/* Horizontal process arrows end at a column edge once the steps wrap into rows. */
@media (max-width: 1180px) {
  html body.public-body.home-body .aa-section-steps .aa-steps article:not(:last-child)::after {
    content: none !important;
    display: none !important;
  }
}
