/* Themed exhibitions (D-030): a strip of small walls on the room page, the
   exhibition in the room's own look, and the owner's editor. */

/* ---------- The strip on the room ---------- */
.expo-strip { margin: calc(clamp(2rem, 5vw, 4rem) * -0.5) 0 clamp(2rem, 4vw, 3rem); }
.expo-strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.expo-strip-head .eyebrow { margin: 0; }
.expo-strip > .muted { margin: 0; max-width: 36rem; }
.expo-cards {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.75rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(11rem, 14rem);
  gap: 1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.expo-cards li { scroll-snap-align: start; min-width: 0; }
.expo-card { display: grid; gap: 0.15rem; color: inherit; }
.expo-card:hover { text-decoration: none; }
.expo-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 12%;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  transition: transform 0.25s var(--ease);
}
.expo-card:hover .expo-cover { transform: translateY(-2px); }
.expo-cover .mini-mat { width: 62%; flex: none; }
.expo-cover-blank { color: var(--faint); }
.expo-cover-blank .icon { width: 2rem; height: 2rem; }
.expo-card-title {
  margin-top: 0.6rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.expo-card-count { font-size: 0.85rem; color: var(--muted); }

/* ---------- One exhibition, on the room's wall ---------- */
.expo-room .back-link { margin-bottom: 0.25rem; }
.expo-room .room-head { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.expo-text {
  max-width: 38rem;
  margin: 0.9rem 0 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.35;
  white-space: pre-line;
}
.expo-count { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--muted); }
.expo-actions { margin: calc(clamp(1.5rem, 4vw, 3rem) * -0.5) 0 clamp(1.5rem, 4vw, 3rem); }
/* An exhibition is read in its order: the works hang row by row, left to
   right, on a common centre line, not down masonry columns. */
.expo-room .salon {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  column-gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.expo-room[data-density="salon"] .salon { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); column-gap: clamp(1rem, 2.4vw, 2rem); }
@media (max-width: 40rem) {
  .expo-room .salon { grid-template-columns: minmax(0, 1fr); }
  .expo-room[data-density="salon"] .salon { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0.9rem; }
}
.expo-position { align-self: center; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- The editor ---------- */
form.expo-form { gap: 0; }
.expo-save { display: flex; justify-content: flex-start; }
.expo-order { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; counter-reset: none; }
.expo-item {
  display: grid;
  grid-template-columns: auto auto 3.5rem minmax(0, 1fr) auto;
  grid-template-areas: "handle pos pic text act";
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.5rem 0.5rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s, opacity 0.2s;
}
.expo-item .mini-mat { grid-area: pic; padding: 8%; }
.expo-item .expo-handle { grid-area: handle; }
.expo-item .expo-pos { grid-area: pos; }
.expo-item .expo-item-text { grid-area: text; }
.expo-item .expo-item-actions { grid-area: act; }
.expo-item .mini-mat img { aspect-ratio: 1; }
.expo-handle { display: grid; color: var(--faint); cursor: grab; }
.expo-handle .icon { width: 1.1rem; height: 1.1rem; }
.expo-pos { min-width: 1.4rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.85rem; }
.expo-item-text { display: grid; min-width: 0; }
.expo-item-text strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.15rem; line-height: 1.2; overflow-wrap: anywhere; }
.expo-item-text .muted { font-size: 0.8rem; }
.expo-item-actions { display: flex; gap: 0.25rem; }
button.expo-step { min-height: 2.75rem; min-width: 2.75rem; padding: 0; justify-content: center; border-radius: 999px; }
button.expo-step .icon { width: 1.1rem; height: 1.1rem; }
button.expo-step:disabled { opacity: 0.35; cursor: default; }
.expo-item[draggable="true"] { cursor: grab; }
.expo-item.is-dragging { opacity: 0.45; }
.expo-item.is-over { border-color: var(--ink); box-shadow: 0 -3px 0 -1px var(--ink); }
.expo-status { margin: 0; min-height: 1.2em; font-size: 0.85rem; color: var(--muted); }

.expo-shortcuts { display: grid; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.expo-shortcut { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; }
.expo-shortcut label { flex: 1 1 10rem; }
.expo-shortcut button { flex: none; min-height: 2.9rem; }
fieldset.expo-pool { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.expo-pool legend { padding: 0; margin-bottom: 0.6rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.expo-pool-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr));
  gap: 0.75rem;
}
label.expo-pick {
  position: relative;
  display: grid;
  gap: 0.15rem;
  align-content: start;
  height: 100%;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 400;
  color: var(--ink);
  cursor: pointer;
}
label.expo-pick input { position: absolute; top: 0.6rem; left: 0.6rem; width: 1.3rem; height: 1.3rem; margin: 0; accent-color: var(--ink); z-index: 1; }
label.expo-pick .mini-mat { padding: 8%; }
label.expo-pick .mini-mat img { aspect-ratio: 1; }
label.expo-pick:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.expo-pick-title { margin-top: 0.4rem; font-family: var(--serif); font-style: italic; font-size: 1.05rem; line-height: 1.2; overflow-wrap: anywhere; }
label.expo-pick .muted { font-size: 0.75rem; font-weight: 400; }
#expo-add > button { justify-self: start; }
.expo-delete .button, .expo-delete button { justify-self: start; }

@media (max-width: 40rem) {
  .expo-item { grid-template-columns: 3rem minmax(0, 1fr); grid-template-areas: "pic text" "act act"; padding: 0.5rem; }
  .expo-item .expo-handle, .expo-item .expo-pos { display: none; }
  .expo-item .expo-item-actions { justify-content: flex-end; }
  .expo-cards { grid-auto-columns: minmax(9rem, 46%); }
  .expo-card-title { font-size: 1.15rem; }
}
@media (pointer: coarse) {
  .expo-handle { display: none; }
}
