/* GENERATED FILE - DO NOT EDIT.
   Source: shared/trip-presence.css - run `npm run sync:shared` after editing. */

/* Live trip presence (shared/trip-presence.js): who else from the crew is in
   this trip right now. Sits in the workbook header's top row on web and app.
   Fixed size, no animation — it never moves the header around. */

.tp-slot {
  position: relative;
  /* Never squeezed: the faces keep their size and a clear gap before the header buttons
     (the trip title is what shortens). */
  flex: 0 0 auto;
  min-width: 0;
  margin-right: 0.2rem;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.tp-slot[hidden] {
  display: none;
}

/* Web workbook: two slots, one shown per layout. Desktop puts presence with
   the header tools top-right (left of the account, like a doc editor);
   phone puts it on the back-arrow row. The app has one slot (its top row). */
.tp-slot--tray {
  margin-left: 0;
}

@media (min-width: 48rem) {
  .tp-slot--mast {
    display: none !important;
  }
}

@media (max-width: 47.99rem) {
  .tp-slot--tray {
    display: none !important;
  }
}

/* App: the top row is tight on a phone. While crew are shown, the status
   pill steps aside (same fallback as .is-compact — the status is still in the
   Publish label). "Draft" stays until it's published (Run 7 sim 2026-10-18 A-8:
   the badge left once the crew showed up); a too-narrow row still drops it
   (.is-compact). `tp-on` is set from JS (trip-presence.js paint + the app
   header template) rather than a parent selector, which older Android
   WebViews lack. */
.mw-mast-top.tp-on .mw-status:not(.is-draft),
.mw-mast-top.tp-on .mw-mast-badge {
  /* The collapsed header's countdown pill ("172d 1h") steps aside too: title, faces and the
     header buttons each keep their own room instead of colliding. */
  display: none;
}

/* The header's tool row already pushes itself right; with the slot showing,
   the slot does the pushing and the tools sit right after it. */
.tp-slot:not([hidden]) + .mast-actions,
.tp-slot:not([hidden]) + .mw-mast-actions {
  margin-left: 0;
}

.tp {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.tp-av {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c, #e6c98e);
  color: #1f3a2d;
  font-style: normal;
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.tp-av img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* A broken photo shows the initial underneath instead of an icon. */
  color: transparent;
  font-size: 0;
}

.tp-av.is-editing {
  box-shadow: 0 0 0 2px #3e8a5f;
}

/* "Aya is editing" — the landing page chip. */
.tp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  max-width: 13rem;
  padding: 0.2rem 0.65rem 0.2rem 0.2rem;
  border-radius: 999px;
  background: #f3ecd9;
  color: #3b4a40;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.tp-chip .tp-av {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.66rem;
  box-shadow: 0 0 0 2px #3e8a5f;
}

.tp-chip-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-faces {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  padding: 0.15rem 0.2rem 0.15rem 0.45rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.tp-faces > .tp-av {
  margin-left: -0.45rem;
}

.has-chip .tp-faces {
  padding-left: 0.2rem;
}

.has-chip .tp-chip {
  margin-right: 0.5rem;
}

.tp-faces:focus-visible {
  outline: 2px solid #e6c98e;
  outline-offset: 2px;
}

.tp-count {
  display: none;
}

.tp-more,
.tp-count {
  flex-shrink: 0;
  margin-left: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.85;
}

.tp-list {
  /* Placed by trip-presence.js (placeList): fixed to the screen under the faces, sized to
     its names, never past the screen edges. */
  position: fixed;
  top: var(--tp-top, 5.5rem);
  left: var(--tp-left, auto);
  right: auto;
  z-index: 1000;
  box-sizing: border-box;
  width: max-content;
  min-width: 13.5rem;
  max-width: min(18rem, calc(100vw - 1.5rem));
  max-height: min(20rem, calc(100dvh - var(--tp-top, 5.5rem) - 1rem));
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0.3rem 0.4rem 0.4rem;
  list-style: none;
  border-radius: 0.95rem;
  background: #fffaf0;
  color: #22342a;
  box-shadow: 0 12px 30px rgba(10, 30, 20, 0.24), 0 1px 4px rgba(10, 30, 20, 0.08);
  visibility: hidden;
}

/* Shown once placed (never a flash at the wrong spot). */
.tp-list.is-placed {
  visibility: visible;
}

/* Arrow pointing up at the faces (outside the list: the list scrolls and would clip it). */
.tp-caret {
  position: fixed;
  top: calc(var(--tp-top, 5.5rem) - 5px);
  left: calc(var(--tp-caret-x, 90vw) - 6px);
  z-index: 1001;
  width: 12px;
  height: 12px;
  border-radius: 3px 0 0 0;
  background: #fffaf0;
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(10, 30, 20, 0.06);
  pointer-events: none;
  visibility: hidden;
}

.tp-caret.is-placed {
  visibility: visible;
}

.tp-caret[hidden] {
  display: none;
}

.tp-list[hidden] {
  display: none;
}

/* "Here now · 2" header row. */
.tp-list .tp-list-head {
  display: block;
  padding: 0.35rem 0.45rem 0.2rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a7a5c;
}

.tp-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.45rem;
  border-radius: 0.65rem;
}

.tp-list li > .tp-av {
  width: 2rem;
  height: 2rem;
  margin: 0;
  font-size: 0.8rem;
  overflow: visible;
  box-shadow: none;
}

.tp-list li > .tp-av img {
  border-radius: 50%;
}

/* Green "here now" dot on the photo. */
.tp-list li > .tp-av::after {
  content: "";
  position: absolute;
  right: -0.08rem;
  bottom: -0.08rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #3e8a5f;
  box-shadow: 0 0 0 2px #fffaf0;
}

.tp-list li > span {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.tp-list b {
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-list small {
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0.72;
}

/* Phone: the chip plus one "+N" (faces would squeeze the chip to nothing). */
@media (max-width: 30rem) {
  .tp-chip {
    max-width: 9rem;
  }

  .has-chip .tp-faces > .tp-av,
  .has-chip .tp-more {
    display: none;
  }

  .has-chip .tp-count {
    display: inline;
    margin-left: 0;
  }
}

/* The day planner covers the header (Europe sim EB-21: "Sheshe is editing" was hidden): on its map, under the
   search, only the "… is editing" chip shows — never the faces of people just looking. Web + app. */
.tp-plan-host {
  position: absolute;
  top: calc(0.7rem + var(--safe-top, 0px) + 52px);
  left: 50%;
  z-index: 480;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  pointer-events: none;
}
.tp-plan-host .tp:not(.has-chip),
.tp-plan-host .tp-faces > .tp-av,
.tp-plan-host :is(.tp-more, .tp-count, .tp-list, .tp-caret) {
  display: none !important;
}
.tp-plan-host .tp-faces {
  padding: 0;
  pointer-events: auto;
}
.tp-plan-host .tp-chip {
  margin: 0;
  background: #fff;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.35);
}

/* Small phones (Europe sim L-2: "LakbayBook is …" cut at 360 px): the chip says "✎ LakbayBook". */
.tp-short {
  display: none;
}
@media (max-width: 380px) {
  .tp-chip .tp-long {
    display: none;
  }
  .tp-chip .tp-short {
    display: inline;
  }
}

/* On the planner map there's room: the whole "Sheshe is editing", never "LakbayBook is …" (USA sim 2026-10-17 B-11). */
.tp-plan-host .tp-chip {
  max-width: none;
}
.tp-plan-host .tp-chip .tp-long {
  display: inline !important;
}
.tp-plan-host .tp-chip .tp-short {
  display: none !important;
}

/* A phone's header (Run 16 sim A-1: "Mark is editing +1" pushed ⚙ off the right edge at 360 / 412 px): the chip says
   "✎ Mark +1" and gives way first — it shrinks and ends in "…", the header's buttons always fit. Web + app. */
@media (max-width: 30rem) {
  .tp-slot {
    flex: 0 1 auto;
    min-width: 2rem;
    overflow: hidden;
  }
  .tp,
  .tp-faces {
    min-width: 0;
    max-width: 100%;
  }
  .tp-chip {
    max-width: 7.5rem;
    flex: 0 1 auto;
  }
  .tp-chip .tp-long {
    display: none;
  }
  .tp-chip .tp-short {
    display: inline;
  }
  /* Room for the name: the ✎ says who edits (no face in the chip), and the viewers count is in the list it opens. */
  .has-chip .tp-chip {
    padding: 0.25rem 0.4rem;
    font-size: 0.74rem;
  }
  .has-chip .tp-faces {
    padding: 0;
  }
  .tp-chip .tp-av,
  .has-chip .tp-count {
    display: none;
  }
  .has-chip .tp-chip {
    margin-right: 0;
  }
}

/* Never over the map's own bar (Run 16 sim A-7: "Sheshe is editing" sat on "Tap the map to drop the pin…" while
   changing a stop's place): while the planner picks a place, the chip on the map steps aside. Web + app. */
body.lm-picking .tp-plan-host,
.is-picking .tp-plan-host {
  display: none !important;
}

/* …nor over a window on the map (Run 17 sim A-3: "Sheshe is editing" floated over the stop window's fields): a stop /
   New event window or any sheet over the planner hides it. Phone widths, where those windows cover the map. Web + app.
   `has-plan-window` is set from JS (trip-presence.js watchPlanWindow) — not a has-selector, which older Android WebViews lack. */
@media (max-width: 63.99rem) {
  html.has-plan-window .tp-plan-host,
  body.is-sheet-open .tp-plan-host {
    display: none !important;
  }
}
