/*
 * CricketWindies post author identity block
 *
 * This is intentionally limited to the existing post-card author region.
 * It does not recreate the removed userbar and does not style the post body,
 * thread shell, masthead, navigation, footer, or unscoped profile elements.
 */

.post-card .post-author {
  position: relative;
  min-width: 0;
  padding: 18px 16px 16px;
  background: var(--surface-alt, #f7f5f2);
  border-right: 1px solid var(--border, #e4ddd7);
  color: var(--muted, #5f6877);
}

.post-card .post-author .avatar {
  display: inline-grid;
  width: 68px;
  height: 68px;
  margin: 0 0 11px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid var(--gold, #edc268);
  border-radius: 50%;
  background: var(--maroon, #54102b);
  color: var(--ivory, #fff9f0);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

/* Preserve the existing username-to-color avatar assignment. */
.post-card .post-author .avatar.avatar--maroon { background: #830f39; }
.post-card .post-author .avatar.avatar--teal { background: #1d6c70; }
.post-card .post-author .avatar.avatar--purple { background: #713783; }
.post-card .post-author .avatar.avatar--blue { background: #386baa; }
.post-card .post-author .avatar.avatar--orange { background: #c86d24; }

.post-card .post-author .avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Flag badge (windies_flag_badge plugin) — sits as a corner badge on the
   avatar itself rather than an extra text row, so it costs no vertical
   space in the already-compacted mobile author block. The wrap just gives
   the badge a positioning context around whatever useravatar HTML actually
   is (real image vs. generated initials circle), and the badge itself uses
   a stacked drop-shadow (not a border/background ring) so the outline
   traces the flag glyph's own shape instead of boxing it. */
.post-card .post-author .windies-flag-badge-wrap {
  position: relative;
  display: inline-block;
  margin: 0 0 11px;
}

.post-card .post-author .windies-flag-badge-wrap .avatar {
  margin: 0;
}

.post-card .post-author .windies-flag-badge {
  position: absolute;
  right: -5px;
  bottom: 0px;
  font-size: 24px;
  line-height: 1;
  filter:
    drop-shadow(1px 0px 0px white)
    drop-shadow(-1px 0px 0px white)
    drop-shadow(0px 1px 0px white)
    drop-shadow(0px -1px 0px white);
}

.post-card .post-author__name {
  display: block;
  margin: 0;
  color: var(--blue-link, #07588c);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
}

.post-card .post-author__name a {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.post-card .post-author__role {
  display: block;
  margin-top: 4px;
  color: var(--maroon-mid, #6c1234);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

/* Added on integration, not part of the original handoff file: the
   per-post "like" control (thumbs-up button + count) moved here from
   post-content__footer, per the user's request. First cut put it as its
   own standalone line under the role label — but MyBB only renders the
   clickable thumbs-up icon when you have permission to rep that post (not
   your own, not as a guest, etc.); with no icon, the count alone
   ({$post['replink']}, MyBB's own postbit_reputation template — a bare
   .reaction-count span) sat there unlabeled, reading like a stray "0".
   Fixed by making it a proper labeled row instead: it's now the dt/dd
   pair "Reputation" inside .post-author__details (see the postbit
   template), styled below to sit inline within the existing dt/dd rhythm
   rather than as a separate block. .post-reaction/.reaction-count
   themselves are still theme.css's generic rules, unmodified here. */
.post-card .post-author__details dd.post-reaction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-card .post-author__details dd.post-reaction .icon {
  width: 13px;
  height: 13px;
}

/* Own-post state: MyBB never lets you rate your own posts, so
   build_postbit() leaves button_rep empty rather than rendering a
   disabled-looking button — windies_reputation.php's postbit hook fills
   that gap with this instead of leaving a blank space where the icon
   would otherwise sit. Muted color + not-allowed cursor, same icon size
   as the real button, no hover treatment since it isn't interactive. */
.post-card .post-author__details dd.post-reaction .post-reaction-disabled {
  display: inline-flex;
  color: var(--soft-muted, #7d8592);
  cursor: not-allowed;
}

.post-card .post-author__details dd.post-reaction .post-reaction-disabled .icon {
  width: 13px;
  height: 13px;
}

/* .reaction-count is theme.css's generic pill-chip treatment
   (padding + background + radius) for its original spot next to
   Quote/Reply — 2px top+bottom padding there added 4px onto this row's
   height that Joined/Posts don't have (measured live: 39.25px vs
   35.25px), breaking the divider rhythm between rows. Stripped back to
   plain colored text here so it matches the other dd values exactly. */
.post-card .post-author__details dd.post-reaction .reaction-count {
  padding: 0;
  background: none;
  color: inherit;
}

.post-card .post-author__details {
  display: grid;
  gap: 5px;
  margin: 15px 0 0;
  font-size: 12px;
  line-height: 1.2;
}

.post-card .post-author__details div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 7px;
  padding-top: 5px;
  border-top: 1px solid var(--border, #e4ddd7);
}

.post-card .post-author__details dt {
  color: var(--muted, #5f6877);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25px;
  line-height: 1.25;
  white-space: nowrap;
  text-transform: uppercase;
}

.post-card .post-author__details dd {
  margin: 0;
  color: var(--ink, #152033);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.post-card .post-author .online_status,
.post-card .post-author .user_online,
.post-card .post-author .user_status {
  color: var(--online, #4fc49c);
  font-size: 11px;
  font-weight: 700;
}

/* Keep the compact cards aligned with the lead post's metadata rhythm. */
.post-card:not(:first-child) .post-author__details {
  gap: 5px;
  margin-top: 15px;
}

@media (min-width: 701px) {
  .post-card {
    grid-template-columns: 156px minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  /* This block used to render Joined/Posts/Reputation as three full-width,
     individually-bordered stat rows (each with its own top divider) under
     a 54px avatar — taller, on its own, than a typical one-line reply's
     actual content (measured live: a post reading just "hahhhhaaaa ;D"
     had more author-card above it than message below it). Condensed to a
     small byline: shrunk avatar, and the three stats collapsed into one
     wrapping inline row with no per-item borders, so a short reply reads
     as mostly its own content again. */
  .post-card .post-author {
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border, #e4ddd7);
  }

  .post-card .post-author .avatar {
    grid-row: 1 / span 2;
    width: 36px;
    height: 36px;
    margin: 0;
    border-width: 2px;
    font-size: 13px;
  }

  /* Avatar sits in the grid's first column/both rows — the badge wrap has
     to follow it there, same as the plain .avatar rule above. */
  .post-card .post-author .windies-flag-badge-wrap {
    grid-row: 1 / span 2;
    margin: 0;
  }

  .post-card .post-author .windies-flag-badge {
    right: -3px;
    bottom: 0px;
    font-size: 13px;
  }

  .post-card .post-author__name {
    align-self: end;
    font-size: 15px;
  }

  .post-card .post-author__role {
    align-self: start;
    margin-top: 2px;
    font-size: 12px;
  }

  /* grid-column: 2 (not 1/-1) — sits under the name/role text rather than
     spanning under the avatar too, same left-alignment trick used on
     .thread-row's mobile fix (Replies/Views under the thread title). */
  .post-card .post-author__details {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    column-gap: 9px;
    row-gap: 1px;
    margin-top: 3px;
    font-size: 11px;
  }

  .post-card .post-author__details div {
    display: inline-flex;
    gap: 3px;
    padding-top: 0;
    border-top: none;
  }

  .post-card:not(:first-child) .post-author__details {
    margin-top: 3px;
  }

  .post-card .post-author__details dt,
  .post-card .post-author__details dd {
    display: inline;
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
  }

  .post-card .post-author__details dt::after {
    content: ":";
  }

  .post-card .post-author__details dd {
    margin-top: 0;
  }
}

@media (max-width: 370px) {
  .post-card .post-author {
    grid-template-columns: 32px minmax(0, 1fr);
    column-gap: 8px;
  }

  .post-card .post-author .avatar {
    width: 32px;
    height: 32px;
    border-width: 2px;
    font-size: 11px;
  }

  .post-card .post-author .windies-flag-badge {
    right: -2px;
    bottom: 0px;
    font-size: 12px;
  }

  .post-card .post-author__name {
    font-size: 14px;
  }
}
