/* The hero viewer: the sheet sits just under the dashboard top bar with the page dimmed behind it,
   a media stage with its slide reel on the left and the comments rail on the right. */
body.hero-detail-open { overflow: hidden; }

.hero-detail-modal-root { position: relative; z-index: 3000; }

.hero-detail-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: calc(var(--topbar-height, 72px) + 2px) 10px 0;
  background: rgba(16, 24, 40, 0.18);
}

.hero-detail-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  background: #FFFFFF;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 18px 60px rgba(16, 24, 40, 0.16);
}

/* Header ------------------------------------------------------------------ */
.hero-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px 20px;
}

.hero-detail-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin-right: auto;
}

.hero-detail-heading h2 {
  margin: 0;
  color: #101828;
  font-family: var(--gf-font);
  font-size: var(--gf-text-title-modal);
  line-height: var(--gf-leading-title-modal);
  font-weight: var(--gf-weight-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-detail-date {
  flex: 0 0 auto;
  padding: 4px 12px;
  border-radius: 999px;
  background: #F4F5F7;
  color: #344054;
  font-family: var(--gf-font);
  font-size: var(--gf-text-caption);
  line-height: var(--gf-leading-caption);
  white-space: nowrap;
}

.hero-detail-actions { display: flex; align-items: center; gap: 8px; }

.hero-detail-action,
.hero-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #F4F5F7;
  color: #101828;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
  font-weight: var(--gf-weight-medium);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.hero-detail-action:hover,
.hero-detail-close:hover { background: #EAECF0; }

.hero-detail-action svg { width: 20px; height: 20px; }

.hero-detail-action.is-liked { background: #FDECF1; color: #D13656; }

/* Counted pills read like the journey cards: pink for likes, blue for comments. */
.hero-detail-action--like.is-counted {
  background: #D13656;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(209, 54, 86, 0.28);
}

.hero-detail-action--like.is-counted:hover { background: #B92F4B; }

.hero-detail-action--comment.is-counted {
  background: #49A4E6;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(73, 164, 230, 0.28);
}

.hero-detail-action--comment.is-counted:hover { background: #3A8BC7; }

.hero-detail-action-count {
  font-weight: var(--gf-weight-semibold);
  font-variant-numeric: tabular-nums;
}

.hero-detail-close { width: 40px; height: 40px; padding: 0; flex: 0 0 40px; }

.hero-detail-close svg { width: 18px; height: 18px; }

/* Layout ------------------------------------------------------------------ */
.hero-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(264px, 22%, 340px);
  gap: 18px;
  flex: 1;
  min-height: 0;
  padding: 0 20px 18px;
}

.hero-detail-media-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

/* Media stage ------------------------------------------------------------- */
.hero-detail-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #0B0B0C;
}

.hero-detail-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-detail-stage > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0B0B0C;
}

.hero-detail-stage-tools {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-detail-slide-count {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.45);
  color: #FFFFFF;
  font-family: var(--gf-font);
  font-size: var(--gf-text-caption);
  line-height: var(--gf-leading-caption);
  white-space: nowrap;
}

.hero-detail-tool {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 24, 40, 0.45);
  color: #FFFFFF;
  text-decoration: none;
  cursor: pointer;
}

.hero-detail-tool:hover { background: rgba(16, 24, 40, 0.62); }

.hero-detail-tool svg { width: 18px; height: 18px; }

/* Video controls ---------------------------------------------------------- */
.hero-detail-player {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 26px 16px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}

.hero-detail-player-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
}

.hero-detail-player-btn svg { width: 20px; height: 20px; }

.hero-detail-player-btn.is-muted { opacity: 0.55; }

.hero-detail-player-time {
  color: #FFFFFF;
  font-family: var(--gf-font);
  font-size: var(--gf-text-caption);
  line-height: var(--gf-leading-caption);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-detail-player-seek {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-detail-player-fill {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: #FFFFFF;
}

/* Slide reel -------------------------------------------------------------- */
/* The reel matches the Create Hero studio: 100px cards, and the next control sits on the
   right edge of the stage above it. */
.hero-detail-reel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.hero-detail-thumbnails {
  display: flex;
  flex: 0 1 auto;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.hero-detail-thumbnails::-webkit-scrollbar { display: none; }

.hero-detail-thumb {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  padding: 0;
  overflow: hidden;
  /* The selected ring is a real border inside the card, so the scrolling track never clips it. */
  border: 3px solid transparent;
  border-radius: 16px;
  background: #F2F4F7;
  cursor: pointer;
}

.hero-detail-thumb.is-active { border-color: #2966F4; }

.hero-detail-thumb img,
.hero-detail-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.hero-detail-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  background: rgba(16, 24, 40, 0.26);
  border-radius: inherit;
  pointer-events: none;
}

.hero-detail-thumb-play svg {
  width: 26px;
  height: 26px;
  margin-left: 2px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.hero-detail-reel-next {
  display: grid;
  place-items: center;
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #F2F4F7;
  color: #344054;
  cursor: pointer;
  transition: background 160ms cubic-bezier(0.2, 0, 0, 1);
}

/* Only rendered when the reel is wide enough to scroll. */
.hero-detail-reel-next[hidden] { display: none; }

.hero-detail-reel-next:hover { background: #EAECF0; color: #101828; }

.hero-detail-reel-next svg { width: 28px; height: 28px; }

/* Comments rail ----------------------------------------------------------- */
.hero-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.hero-detail-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #F7F8FA;
}

.hero-detail-tabs button {
  height: 40px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #667085;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
  font-weight: var(--gf-weight-medium);
  cursor: pointer;
}

.hero-detail-tabs button.is-active {
  background: #FFFFFF;
  color: #101828;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.hero-detail-panel-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.hero-detail-composer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-detail-composer-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #F4F5F7;
  color: #101828;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
}

.hero-detail-composer-input::placeholder { color: #98A2B3; }

.hero-detail-composer-input:focus {
  outline: none;
  border-color: #D0D5DD;
  background: #FFFFFF;
}

.hero-detail-composer-input:disabled { opacity: 0.7; }

/* Avatars ----------------------------------------------------------------- */
/* The member's achievement card frames their photo, the same badge sprite the dashboards use. */
.hero-detail-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

.hero-detail-avatar-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 135%;
  height: 135%;
  transform: translate(-50%, calc(-50% + 7%));
  pointer-events: none;
}

.hero-detail-avatar-inner {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  overflow: hidden;
  background: #EAECF0;
}

.hero-detail-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-detail-avatar-initial {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: #EAECF0;
  color: #475467;
  font-family: var(--gf-font);
  font-size: var(--gf-text-caption);
  font-weight: var(--gf-weight-semibold);
  line-height: var(--gf-leading-caption);
}

/* Likes ------------------------------------------------------------------- */
.hero-detail-like-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-detail-like {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-detail-like-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.hero-detail-like-body strong {
  color: #101828;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
  font-weight: var(--gf-weight-semibold);
}

.hero-detail-like-role {
  color: #98A2B3;
  font-family: var(--gf-font);
  font-size: var(--gf-text-caption);
  line-height: var(--gf-leading-caption);
}

/* Comments ---------------------------------------------------------------- */
.hero-detail-comment-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-detail-comment {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hero-detail-comment-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.hero-detail-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hero-detail-comment-head strong {
  color: #101828;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
  font-weight: var(--gf-weight-semibold);
}

.hero-detail-comment-more {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #98A2B3;
  cursor: pointer;
}

.hero-detail-comment-more:hover { background: #F4F5F7; color: #475467; }

.hero-detail-comment-more svg { width: 20px; height: 20px; }

.hero-detail-comment-time {
  color: #98A2B3;
  font-family: var(--gf-font);
  font-size: var(--gf-text-caption);
  line-height: var(--gf-leading-caption);
}

.hero-detail-comment-text {
  margin: 6px 0 0;
  color: #344054;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
  overflow-wrap: anywhere;
}

.hero-detail-comment-menu {
  position: absolute;
  top: 30px;
  right: 24px;
  z-index: 2;
  display: none;
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.16);
}

.hero-detail-comment.is-menu-open .hero-detail-comment-menu,
.hero-detail-like.is-menu-open .hero-detail-comment-menu { display: block; }

.hero-detail-comment-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
  text-align: left;
  cursor: pointer;
}

.hero-detail-comment-menu button:hover { background: #F4F5F7; }

.hero-detail-comment-menu button.is-danger { color: #D13656; }

.hero-detail-comment-menu svg { width: 18px; height: 18px; flex: 0 0 18px; }

/* Empty, loading and error notes ------------------------------------------ */
.hero-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 20px;
  text-align: center;
  color: #667085;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
}

.hero-detail-empty strong { color: #101828; font-weight: var(--gf-weight-semibold); }

.hero-detail-note {
  margin: 0;
  color: #667085;
  font-family: var(--gf-font);
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
}

.hero-detail-note.is-error { color: #D13656; }

/* Fullscreen viewer ------------------------------------------------------- */
.hero-detail-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: #000000;
  overflow: hidden;
}

.hero-detail-fullscreen-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000000;
}

.hero-detail-fullscreen-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-detail-fullscreen-stage > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.hero-detail-fullscreen-stage .hero-detail-stage-tools { top: 16px; right: 18px; }

.hero-detail-fullscreen-stage .hero-detail-player { padding: 30px 24px 16px; }

.hero-detail-fullscreen-nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(60, 66, 74, 0.55);
  color: #FFFFFF;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 140ms ease;
}

.hero-detail-fullscreen-nav:hover { background: rgba(60, 66, 74, 0.75); }

.hero-detail-fullscreen-nav.is-prev { left: 18px; }

.hero-detail-fullscreen-nav.is-next { right: 18px; }

.hero-detail-fullscreen-nav svg { width: 24px; height: 24px; }

@media (max-width: 1080px) {
  .hero-detail-backdrop { padding-inline: 0; }

  .hero-detail-modal { border-radius: 0; }

  .hero-detail-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "heading close"
      "actions actions";
    gap: 10px;
    padding: 14px 16px 16px;
  }

  .hero-detail-heading { grid-area: heading; gap: 10px; }

  .hero-detail-close { grid-area: close; }

  .hero-detail-actions { grid-area: actions; width: 100%; }

  .hero-detail-action { flex: 1; gap: 4px; padding: 0 8px; }

  .hero-detail-action svg { width: 18px; height: 18px; }

  .hero-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding: 0 16px 16px;
  }

  .hero-detail-media-column { flex: 0 0 auto; }

  .hero-detail-stage { flex: 0 0 auto; aspect-ratio: 16 / 10; }

  .hero-detail-panel { flex: 0 0 auto; min-height: auto; }

  .hero-detail-panel-body { overflow: visible; }
}
