/* Listing door. Loaded only on /l/ pages, after articles.css. */

.listing-carousel {
  background: var(--code-bg, #121212);
  border: 1px solid var(--border, #3a3a3a);
}

.listing-slide {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  color: inherit;
  text-decoration: none;
}

a.listing-slide {
  cursor: pointer;
}

.listing-source {
  color: var(--text-mute, #7a7a7a);
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
}

.listing-source a {
  color: inherit;
}

.listing-carousel .carousel-item img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: var(--code-bg, #121212);
}

.listing-carousel .carousel-control-prev,
.listing-carousel .carousel-control-next {
  width: 3rem;
}

.listing-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.listing-thumbs button {
  padding: 0;
  border: 1px solid var(--border, #3a3a3a);
  background: transparent;
  line-height: 0;
  min-width: 44px;
  min-height: 44px;
}

.listing-thumbs button[aria-current="true"] {
  border-color: var(--accent, #6f9e88);
}

.listing-thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
}

.listing-price,
.listing-sold,
.listing-card-price {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-style: normal;
}

.listing-price {
  color: var(--heading, #f0f0f0);
  font-size: 1.15rem;
  margin: 0.25rem 0 0.75rem;
}

.listing-sold {
  color: var(--heading, #f0f0f0);
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

.listing-card-title,
.listing-card-price {
  display: block;
}

.listing-card-price {
  color: var(--text-mute, #7a7a7a);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

/* Same-page lightbox. The dim margin stays visible around the photo. */
body.listing-light-open .modal-backdrop.show {
  opacity: 1;
  background-color: rgba(0, 0, 0, .85);
}

.listing-light .modal-dialog {
  max-width: none;
  width: 100%;
  height: 100%;
  margin: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-light .modal-content {
  background: transparent;
  border: 0;
  box-shadow: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-light-stage {
  pointer-events: auto;
  width: 90vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.listing-light-stage img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
}

.listing-light-stage.is-native {
  overflow: auto;
  cursor: grab;
}

.listing-light-stage.is-native img {
  max-width: none;
  max-height: none;
  cursor: grab;
}

.listing-light-close,
.listing-light-prev,
.listing-light-next {
  position: fixed;
  z-index: 1080;
  pointer-events: auto;
  min-width: 48px;
  min-height: 48px;
}

.listing-light-close {
  top: 12px;
  right: 12px;
  padding: 0 0.9rem;
  border: 0;
  background: #f0f0f0;
  color: #1c1c1c;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 650;
}

.listing-light-prev,
.listing-light-next {
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #f0f0f0;
  background: rgba(28, 28, 28, .82);
  color: #f0f0f0;
  font-size: 2rem;
  line-height: 1;
}

.listing-light-prev { left: 8px; }
.listing-light-next { right: 8px; }

.listing-light-count {
  position: fixed;
  z-index: 1080;
  left: 0;
  right: 0;
  bottom: 12px;
  margin: 0;
  text-align: center;
  pointer-events: none;
  color: #f0f0f0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-style: normal;
  font-size: 0.95rem;
}
