/*
 * Orbiting card and Who's around styles.
 * Built on the pastel-consumer visual system tokens.
 */

/* 8 person hues: each ink reaches at least 4.5:1 WCAG contrast on its pale fill */
.person-0 { --person-fill: #dcf1ff; --person-ink: #0a3a80; }
.person-1 { --person-fill: #fef0d2; --person-ink: #7c4a03; }
.person-2 { --person-fill: #e6eaff; --person-ink: #1e295f; }
.person-3 { --person-fill: #d5f5ee; --person-ink: #0a5647; }
.person-4 { --person-fill: #fce2ec; --person-ink: #831948; }
.person-5 { --person-fill: #def5dc; --person-ink: #1d5c18; }
.person-6 { --person-fill: #f3e5f5; --person-ink: #511c5e; }
.person-7 { --person-fill: #ffe8e0; --person-ink: #8c2e14; }

/* Tabular figures for counts */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Avatar disc with person tone */
.avatar-disc {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--fs-small);
  background: var(--person-fill, var(--pill-neutral-bg));
  color: var(--person-ink, var(--pill-neutral-ink));
  flex-shrink: 0;
  overflow: hidden;
}

/* Who's around horizontal strip */
.whos-around {
  display: flex;
  flex: none;
  flex-shrink: 0;
  min-height: auto;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px;
  margin-bottom: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.person-chip-wrapper {
  position: relative;
  flex-shrink: 0;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font);
  font-size: var(--fs-small);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  min-height: 34px;
  box-sizing: border-box;
}

.person-chip:hover {
  background: var(--raised);
}

.person-chip .person-name {
  font-weight: 600;
  color: var(--person-ink, var(--text));
}

.person-chip .person-status {
  color: var(--muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

/* Menus for Who's around and Card actions */
.whos-around-menu,
.reaction-picker-menu,
.card-more-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 4px;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-more-menu {
  left: auto;
  right: 0;
}

.reaction-picker-menu {
  min-width: 180px;
  padding: 6px;
}

.whos-around-menu .menu-item,
.card-more-menu .menu-item {
  background: none;
  border: none;
  text-align: left;
  padding: 6px 10px;
  font-family: var(--font);
  font-size: var(--fs-small);
  color: var(--text);
  border-radius: calc(var(--radius-control) - 4px);
  cursor: pointer;
}

.whos-around-menu .menu-item:hover,
.card-more-menu .menu-item:hover {
  background: var(--active);
}

.card-more-menu .menu-item-danger {
  color: var(--negative);
}

.reaction-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.emoji-pick-btn {
  background: none;
  border: none;
  font-size: 18px;
  padding: 4px 6px;
  border-radius: var(--radius-chip);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.emoji-pick-btn:hover {
  background: var(--active);
}

/* Cards on the pastel-consumer system */
.deck-col .card {
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
  margin-bottom: 12px;
  color: var(--text);
  font-family: var(--font);
}

.circle-note {
  font-size: var(--fs-small);
  color: var(--muted);
  font-weight: 500;
}

.feed-source-line {
  font-size: var(--fs-small);
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.card-title {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text);
  margin: 4px 0 6px 0;
  cursor: pointer;
  line-height: 1.35;
}

.card-title:hover {
  color: var(--accent);
}

.card-summary {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.45;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Author line on post cards */
.card-top .author-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.author-name {
  font-weight: 600;
  font-size: var(--fs-body);
  color: var(--text);
}

.author-time {
  font-size: 12px;
  color: var(--muted);
}

/* Reaction bar and reaction pills */
.reaction-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Post cards keep chips and actions in one row: the chips wrap among themselves first, so the
   React, Reply and ⋯ buttons never drop to a line of their own. */
.reaction-bar:has(.reaction-actions) { flex-wrap: nowrap; align-items: flex-start; }
.reaction-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.reaction-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.reaction-chips:empty { display: none; }

.react-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font);
  font-size: var(--fs-small);
  cursor: pointer;
}

.react-pill:hover {
  background: var(--raised);
  color: var(--text);
}

.react-pill.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: transparent;
}

.reaction-picker-wrapper,
.card-more-wrapper {
  position: relative;
}

/* Column controls ◀ ▶ ✕ hidden unless customizing-columns */
.col-controls {
  display: none;
}

body.customizing-columns .col-controls {
  display: flex;
}

/* Photos on a post: one wide picture, or a small grid for an album. */
.post-media { display: grid; gap: 6px; margin: 8px 0; }
.post-media img,
.post-media .card-video-wrap {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--ground);
}
.post-media-1 img,
.post-media-1 .card-video-wrap { max-height: 360px; aspect-ratio: 3 / 2; }
.post-media-2 { grid-template-columns: 1fr 1fr; }
.post-media-2 img,
.post-media-2 .card-video-wrap { aspect-ratio: 1 / 1; }
.post-media-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 3 / 2; max-height: 360px; }
.post-media-3 img:first-child,
.post-media-3 .card-video-wrap:first-child { grid-row: 1 / span 2; }

/* Inline video in group cards */
.card-video-wrap {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  background: var(--raised);
}

.card-video-wrap .orbit-video {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--radius-card);
  object-fit: cover;
}

.card-video-wrap .orbit-video-sound {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

/* An article's lead picture on a feed card. */
.feed-lead-image {
  display: block;
  width: 100%;
  max-height: 240px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 8px 0;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--ground);
}

/* Inline reply form on deck cards */
.card-reply-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border); /* taste-skill-ignore: hairline */
}

.card-reply-form[hidden] {
  display: none;
}

.card-reply-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border); /* taste-skill-ignore: outlined-box */
  border-radius: var(--radius-control);
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.card-reply-input:focus {
  border-color: var(--accent);
}

.card-reply-submit {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-control);
  background: var(--primary);
  color: var(--surface);
  border: 0;
  cursor: pointer;
}

/* Floating "N new posts" pill for live updates in deck columns */
.deck-pill-wrap {
  position: sticky;
  top: 6px;
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;
  margin-bottom: 4px;
}

.deck-pill-wrap[hidden] {
  display: none;
}

.deck-pill {
  pointer-events: auto;
  background: var(--primary);
  color: var(--surface);
  border: 0;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* taste-skill-ignore: shadow */
}

/* Cards container inside a deck column */
.deck-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
