/* =========================================================================
   place.css: /r/{slug} for a place that is not on BiteOut
   (resources/views/web/directory-place.blade.php).

   Loaded after site.css, which owns the tokens and every component the page
   uses (.bo-display, .bo-headline, .bo-btn, .bo-card, .bo-deal-pill). Layout
   only: no colours, type sizes or corners of its own. Breakpoints: 480, 768.

   The column is the partner page's (720), since both live at /r/{slug}.
   ========================================================================= */

.place {
  max-width: calc(720px + 2 * var(--gutter));
  padding-block: var(--space-32) var(--space-48);
}

.place__name {
  margin: var(--space-12) 0 var(--space-8);
  overflow-wrap: anywhere;
}

.place__where {
  margin: 0;
  color: var(--text-2);
}

/* Directions and the phone. On a phone: two equal buttons, the second
   saying Call. From 480: their own widths, the second showing the number. */
.place__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  margin: var(--space-24) 0 0;
}
.place__actions .bo-btn {
  flex: 1 1 0;
  min-width: max-content;
  padding-inline: var(--space-16);
}
.place__number { display: none; }

.place__deals { margin-top: var(--space-48); }
.place__deals h2 { margin: 0 0 var(--space-16); }

/* The partners nearby. Phone: rows, the photo at the card's left edge, so
   all three deals are on the first screen. From 768: three across, the
   photo on top. */
.near {
  display: grid;
  gap: var(--space-12);
  margin: 0;
  padding: 0;
  list-style: none;
}

.near__card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  height: 100%;
}

/* The photo fills its box whatever its own shape (the img is absolute, so a
   portrait can never stretch the card). */
.near__photo {
  position: relative;
  min-height: 96px;
  background: var(--raised);
}
.near__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.near__body {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-12) var(--space-16);
}

.near__name {
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.near__where {
  margin-bottom: var(--space-4);
  color: var(--text-2);
  font-size: var(--fs-caption);
  line-height: 1.35;
}

/* The owner's way in. The link carries 8px above and below, so a thumb has
   36px to land on. */
/* The last line: the owner's way in, and the terms (where the data comes
   from, and how an owner has the page corrected or removed). */
.place__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 var(--space-16);
  margin: var(--space-48) 0 0;
  padding-top: var(--space-16);
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: var(--fs-caption);
}
.place__foot a {
  display: inline-block;
  padding-block: var(--space-8);
  font-weight: 600;
}

@media (min-width: 480px) {
  .place__actions .bo-btn {
    flex: 0 0 auto;
    padding-inline: var(--space-24);
  }
  .place__call { display: none; }
  .place__number { display: inline; }
}

@media (min-width: 768px) {
  .place { padding-block: var(--space-48) 64px; }

  .near {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-16);
  }
  .near__card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .near__photo {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
  .near__body {
    align-content: start;
    padding: var(--space-16);
  }
}
