/* Small local-only fixes for the captured markup. The main visual system remains the JamesEdition bundle. */
:root {
  --je-black: #151515;
  --je-muted: #6f6f6f;
  --je-line: #e6e6e6;
}

html {
  background: #fff;
}

body {
  min-width: 320px;
  color: var(--je-black);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

/* The captured HTML keeps lazy media transparent until the original bundle runs. */
.je2-lazy-load._loaded {
  opacity: 1 !important;
}

.local-lazy-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The captured Trending slider has no original height-initialisation module.
   Keep its fit-parent chain content-sized so listing photos use the intended
   card ratio instead of expanding to the viewport height. */
.je2-home__section._trending .je2-slider.fit-parent,
.je2-home__section._trending .je2-slider.fit-parent .je2-slider__wrapper,
.je2-home__section._trending .je2-slider.fit-parent .je2-slider__content,
.je2-home__section._trending .je2-slider__item-5,
.je2-home__section._trending .ListingCard._fit-parent {
  height: auto;
  min-height: 0;
}

.je2-home__section._trending .je2-slider__content {
  align-items: start;
}

.je2-home__section._trending .ListingCard._light .ListingCard__picture {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  padding-bottom: 117%;
}

.je2-home__section._trending .ListingCard__picture > .je-background-pixel,
.je2-home__section._trending .ListingCard__picture .je2-lazy-load,
.je2-home__section._trending .ListingCard__picture .local-lazy-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.je2-home__section._trending .ListingCard__picture .local-lazy-image {
  object-fit: cover;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .je2-home__section._trending .ListingCard._light .ListingCard__picture {
    padding-bottom: 114%;
  }
}

@media (max-width: 767px) {
  .je2-home__section._trending .ListingCard._light .ListingCard__picture {
    padding-bottom: 127%;
  }
}

.je2-sell-with-us._visible,
.je2-sell-with-us:not(._hidden) {
  display: block;
}

.je2-secondary-menu__submenu._open,
.je2-secondary-menu__submenu.is-open {
  display: block;
}

.local-toast {
  position: fixed;
  z-index: 9999;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 16px;
  background: #151515;
  color: #fff;
  font: 13px/1.35 Inter, Arial, sans-serif;
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
}

/* Local language chooser. It mirrors the captured dark selector artwork and
   stays independent from the site's native footer select popup. */
.local-language-modal[hidden] {
  display: none;
}

.local-language-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #111;
  color: #f5f3ee;
  font-family: Inter, Arial, sans-serif;
}

.local-language-modal__backdrop {
  position: absolute;
  inset: 0;
}

.local-language-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  min-height: 100%;
  box-sizing: border-box;
  padding: 68px 28px 28px;
  outline: none;
}

.local-language-modal__close {
  position: absolute;
  top: 16px;
  right: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid #4a4227;
  border-radius: 50%;
  background: transparent;
  color: #cdb63f;
  cursor: pointer;
}

.local-language-modal__close:hover,
.local-language-modal__close:focus-visible {
  border-color: #cdb63f;
  outline: none;
}

.local-language-modal__close svg {
  width: 20px;
  height: 20px;
}

.local-language-modal__title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.local-language-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.local-language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 81px;
  padding: 0 21px;
  border: 1px solid #322f24;
  border-radius: 12px;
  background: #181818;
  color: #f3f1ed;
  font: 500 22px/1.2 Inter, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}

.local-language-option strong {
  margin-left: 16px;
  color: #cdb63f;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
}

.local-language-option:hover,
.local-language-option:focus-visible,
.local-language-option[aria-selected="true"] {
  border-color: #cdb63f;
  outline: none;
}

body.local-language-modal-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .local-language-modal__panel {
    padding: 68px 20px 20px;
  }

  .local-language-modal__close {
    right: 20px;
  }

  .local-language-option {
    min-height: 70px;
    padding: 0 15px;
    border-radius: 10px;
    font-size: 18px;
  }

  .local-language-option strong {
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .local-language-modal__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .je2-secondary-menu nav ul {
    overflow-x: auto;
    justify-content: flex-start;
  }
}
