/* Office tour annotated image
 * Used by _drafts/2026-04-10-nicos-office-tour.md (and any future office-tour pages).
 * Pairs with /assets/js/office-tour.js
 */

.office-tour {
  margin: 2rem 0 3rem;
}

.office-tour__figure {
  position: relative;
  display: block;
  margin: 0 0 1.5rem;
  line-height: 0; /* eliminate baseline gap below img */
}

.office-tour__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Hotspot layer sits on top of the image, scales with it. */
.office-tour__hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none; /* let clicks fall through except on actual hotspots */
}

.office-tour__hotspot {
  position: absolute;
  /* left/top set inline, then translate centres the dot on the coord */
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c05713; /* Deltastring orange — matches site theme-color */
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.office-tour__hotspot:hover,
.office-tour__hotspot:focus-visible {
  transform: translate(-50%, -50%) scale(1.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  outline: none;
}

.office-tour__hotspot:focus-visible {
  background: #f0c000; /* yellow flash for keyboard focus */
  color: #000;
}

.office-tour__hotspot.is-active {
  background: #f0c000;
  color: #000;
  transform: translate(-50%, -50%) scale(1.4);
}

/* Tooltip — shown on hover for desktop, suppressed on touch via JS */
.office-tour__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
}

.office-tour__hotspot:hover .office-tour__tooltip,
.office-tour__hotspot:focus-visible .office-tour__tooltip {
  opacity: 1;
}

/* Item list below the image — the source of truth */
.office-tour__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem 1.5rem;
}

.office-tour__list-item {
  position: relative;
  padding: 0.6rem 0.6rem 0.6rem 2.4rem;
  border-left: 3px solid transparent;
  border-radius: 3px;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.office-tour__list-item::before {
  content: attr(data-number);
  position: absolute;
  left: 0.4rem;
  top: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #c05713;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.office-tour__list-item.is-active {
  background: rgba(240, 192, 0, 0.18);
  border-left-color: #f0c000;
}

.office-tour__list-item .office-tour__item-name {
  font-weight: 700;
}

.office-tour__list-item .office-tour__item-note {
  display: block;
  font-size: 0.9em;
  color: #555;
  margin-top: 0.15rem;
}

/* Group headings within the list */
.office-tour__group-heading {
  grid-column: 1 / -1;
  margin: 1.5rem 0 0.25rem;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}

.office-tour__group-heading:first-child {
  margin-top: 0;
}

/* Mobile: shrink hotspots so they don't dominate the small image */
@media (max-width: 640px) {
  .office-tour__hotspot {
    width: 22px;
    height: 22px;
    font-size: 11px;
    border-width: 2px;
  }
  .office-tour__tooltip {
    display: none; /* tooltip on touch is awkward; the list below is the truth */
  }
  .office-tour__list {
    grid-template-columns: 1fr;
  }
}

/* Inline figures used elsewhere in the post body (e.g. business cards) */
.office-tour__inline-figure {
  margin: 1.5rem auto;
  max-width: 480px;
  text-align: center;
}

.office-tour__inline-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.office-tour__inline-figure figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
}

/* Coord-placing mode (?placing in URL) — see office-tour.js */
.office-tour.is-placing .office-tour__figure {
  cursor: crosshair;
}

.office-tour.is-placing .office-tour__hotspots {
  pointer-events: none;
}
