/* Place detail panel ("single"), sliding in from the right
   (components/places.js, site/snippets/place-detail.php). */

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
  overflow-y: auto;

  transform: translateX(100%);
  transition: transform var(--duration-panel) var(--ease-panel);
}

.app.is-place-open .detail-panel {
  transform: none;
}

.detail-panel__back {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 50;
  color: var(--color-text-primary);
}

.detail-panel__back-hit {
  position: absolute;
  cursor: pointer;
  z-index: 40;
  top: 0;
  left: 0;
  width: 100%;
  height: 85px;
}

@media (min-width: 1024px) {
  .detail-panel__back-hit {
    height: 100%;
    width: 150px;
  }
}

.place-detail {
  display: none;
  height: 100%;
}

.place-detail.is-active {
  display: block;
}

.detail-panel__layout {
  display: flex;
  flex-direction: column;
  width: 100%;
}

@media (min-width: 1024px) {
  .detail-panel__layout {
    flex-direction: row;
    height: 100vh;
  }
}

.detail-panel__spacer {
  height: 85px;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .detail-panel__spacer {
    height: auto;
    width: 150px;
  }
}

.detail-panel__text {
  width: 100%;
  background: #fff;
  color: var(--color-text-primary);
  padding: 2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Phones: narrower sides, more width for the text. */
@media (max-width: 639px) {
  .detail-panel__text {
    padding: 2rem;
  }
}

.detail-panel__media {
  width: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2.5rem 0;
  /* Fixed on mobile (unlike the min-height it had before) so the box
     doesn't grow to match a tall/portrait photo's natural size -- with
     an indefinite height here, `.slide-image img { height: 100% }` has
     nothing to resolve against and falls back to the image's own
     intrinsic height, so the whole box grew or shrank per-slide, leaving
     leftover black space whenever a shorter slide followed a tall one.
     object-fit: contain (below) still letterboxes every photo correctly
     within this fixed box. */
  height: 60vh;
  min-height: 400px;
}

@media (min-width: 1024px) {
  .detail-panel__text,
  .detail-panel__media {
    width: 50%;
    height: 100vh;
  }
  .detail-panel__text {
    overflow-y: auto;
  }
}

.detail-panel__title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  margin: 0 0 18px 0;
}

.detail-panel__paragraph {
  line-height: 1.6;
}

.detail-panel__paragraph--small {
  font-size: 0.875rem;
}

.detail-panel__bio {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.95rem;
}

.detail-panel__bio h3 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  margin: 0 0 0.5rem;
}

.detail-panel__extra h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.detail-panel__audio {
  padding-top: 40px;
}

.divider {
  border: none;
  border-top: 2px dashed #9ca3af;
  margin: 1rem 0;
}
