/*
 * The selected listing's photos, headed by its price and what the agency says.
 *
 * The declared facts sat under the reel, which on a listing with thirty photos
 * put the construction year a screen and a half below the fold — the fact that
 * decides whether the house is worth opening at all. They now share the header
 * with the price, on the opposite edge.
 *
 * When the photos have not been read, the panel says so rather than showing an
 * empty set of verdicts, which would read as "nothing found".
 */

/* A column that fills its pane: the header and the facts take what they need,
 * the reel of thumbnails scrolls in whatever is left. Sized the other way round
 * — content first — a single photo grew to twice the height of the pane and
 * pushed the facts off screen. */
.photo-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.photo-panel__reel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.photo-panel__header {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--line);
}

.photo-panel__header b {
  display: block;
}

/* The declared facts hold the right edge, as prices do in the list: two things
 * of different natures, each on its own margin, rather than one paragraph the
 * eye has to divide. */
.photo-panel__declared {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
  text-align: right;
}

.photo-panel__identity b {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.photo-panel__identity span {
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.photo-panel__grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  align-content: start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
}

/* A thumbnail is a button, not a decoration: it opens the photo full size. The
 * reset leaves nothing of the browser's button chrome around the image. */
.photo-panel__thumb {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: block;
}

.photo-panel__thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.photo-panel__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
}

/* One line, separated by middots — the same way a listing row prints its
 * rooms and its surface, so the two read as the same kind of statement. */
.photo-panel__facts {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.photo-panel__facts span + span::before {
  content: " · ";
  color: var(--ink-faint);
}

/* Missing, not false. Kept in the line rather than dropped from it: a listing
 * that states no year and one that states 1875 are different situations, and
 * an absent item would leave them looking alike. */
.photo-panel__unknown {
  font-style: italic;
  color: var(--ink-faint);
}

.photo-panel__label {
  font-size: var(--label-size);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: var(--label-weight);
}

.photo-panel__pending {
  flex: none;
  margin: 0;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--ink-faint);
}

.photo-panel__empty {
  padding: var(--space-4);
  color: var(--ink-faint);
}

/* The way out to the original advert. It used to sit on every row in the list;
 * one listing is selected at a time, so once is enough. */
.photo-panel__source {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.photo-panel__source:hover {
  text-decoration: underline;
}

/* Sold, beside the price it no longer applies to. */
.photo-panel__sold {
  margin-left: var(--space-2);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  border: 1px solid var(--line-strong);
  font-family: var(--font-sans);
  font-size: var(--label-size);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  font-weight: var(--label-weight);
  color: var(--ink-muted);
  vertical-align: middle;
}

/* The advert is gone. The only place in this application that offers to delete
 * anything, so it says what it knows and how it knows it — "404", not "erreur"
 * — and puts the action next to the evidence rather than in a menu. */
.photo-panel__gone {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-sunken);
}

.photo-panel__gone p {
  margin: 0;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--ink-muted);
}

.photo-panel__gone b {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  letter-spacing: normal;
  color: var(--ink);
}

.photo-panel__remove {
  flex: none;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .photo-panel__remove:hover {
    border-color: var(--ink-muted);
  }
}
