/* Entry affordances — the footer on every trip entry (timeline card and detail
   page): comment count, a way into the thread, and "tag someone".
   Touch targets stay at 44px; the picker is a bottom sheet on phones and an
   anchored popover from tablet up. */

.entry-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--color-neutral-fog, #e5e2dc);
}

.entry-actions__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-neutral-slate, #5a564f);
  font-family: var(--font-sans, inherit);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.entry-actions__btn:hover,
.entry-actions__btn:focus-visible {
  background: var(--color-neutral-linen, #f4f1ea);
  color: var(--color-neutral-ink, #151413);
}

/* An entry that already has conversation says so at a glance. */
.entry-actions__btn--discuss.is-active {
  color: var(--color-brand-primary, #4a6fa5);
}

.entry-actions__count {
  font-family: var(--font-mono, monospace);
  font-size: 0.8125rem;
  font-weight: 800;
}

.entry-actions__label { white-space: nowrap; }

/* ── Picker ─────────────────────────────────────────────────────────────── */

/* One picker serves the whole page, so it is positioned in document
   coordinates by the controller rather than anchored to a containing card. */
.entry-tag-picker { position: static; }

.entry-tag-picker__scrim {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(21, 20, 19, 0.28);
}

.entry-tag-picker__scrim[hidden] { display: none; }

/* Fixed, in viewport coordinates: the timeline's day columns scroll and clip,
   and page-level ancestors may be positioned, so anchoring to the document
   would put the panel in the wrong place or behind an overflow edge. */
.entry-actions__panel {
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  width: min(300px, calc(100vw - 32px));
  max-height: 360px;
  overflow-y: auto;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--color-neutral-fog, #e5e2dc);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(21, 20, 19, 0.14);
  text-align: left;
}

.entry-actions__panel[hidden] { display: none; }

.entry-actions__panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.entry-actions__panel-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neutral-stone, #8a857c);
}

.entry-actions__panel-hint {
  margin-top: 3px;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--color-neutral-slate, #5a564f);
}

.entry-actions__panel-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -4px -4px 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-neutral-stone, #8a857c);
  cursor: pointer;
}

.entry-actions__panel-close:hover { background: var(--color-neutral-linen, #f4f1ea); }

.entry-actions__search {
  width: 100%;
  min-height: 40px;
  margin-bottom: 8px;
  padding: 0 10px;
  border: 1.5px solid var(--color-neutral-fog, #e5e2dc);
  border-radius: 10px;
  font-family: var(--font-sans, inherit);
  font-size: 0.875rem;
  background: #fff;
}

.entry-actions__search:focus {
  outline: none;
  border-color: var(--color-brand-primary, #4a6fa5);
}

.entry-actions__people {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.entry-actions__person {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-sans, inherit);
  text-align: left;
  cursor: pointer;
}

.entry-actions__person[hidden] { display: none; }
.entry-actions__person:hover,
.entry-actions__person:focus-visible { background: var(--color-neutral-cream, #faf9f6); }

.entry-actions__avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
}

.entry-actions__person-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-neutral-ink, #151413);
}

.entry-actions__person-cue {
  flex-shrink: 0;
  font-family: var(--font-mono, monospace);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-brand-primary, #4a6fa5);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.entry-actions__person:hover .entry-actions__person-cue,
.entry-actions__person:focus-visible .entry-actions__person-cue { opacity: 1; }

.entry-actions__empty {
  margin: 10px 2px 2px;
  font-size: 0.8125rem;
  color: var(--color-neutral-slate, #5a564f);
}

.entry-actions__panel-link {
  display: inline-block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-neutral-fog, #e5e2dc);
  width: 100%;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-brand-primary, #4a6fa5);
  text-decoration: none;
}

/* Confirmation after tagging — names who was notified and what to do next. */
.entry-actions__confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--color-brand-primary-light, #eaf0f8);
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-brand-primary, #4a6fa5);
}

.entry-actions__confirm a {
  margin-left: auto;
  color: inherit;
  font-weight: 800;
  white-space: nowrap;
}

.entry-actions__confirm--error {
  background: var(--color-semantic-negative-light, #fee2e2);
  color: var(--color-semantic-negative, #991b1b);
}

/* An anchored popover doesn't dim the page; the bottom sheet does. */
@media (min-width: 641px) {
  .entry-tag-picker__scrim { display: none; }
}

/* ── Phones: the picker becomes a bottom sheet ──────────────────────────── */
@media (max-width: 640px) {
  .entry-actions__panel {
    position: fixed;
    z-index: 200;
    inset: auto 0 0 0;
    top: auto !important;
    left: 0 !important;
    width: 100%;
    max-height: 70vh;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--color-neutral-fog, #e5e2dc);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 40px rgba(21, 20, 19, 0.22);
  }

  .entry-actions__panel-hint { font-size: 0.8125rem; }
  .entry-actions__person { min-height: 48px; }
  .entry-actions__person-cue { opacity: 1; }
}
