/*
 * 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%;
}

.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) {
  .post-card .post-author {
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 12px;
    padding: 13px 14px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border, #e4ddd7);
  }

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

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

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

  .post-card .post-author__details {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 14px;
    margin-top: 12px;
  }

  .post-card .post-author__details div {
    display: block;
    padding-top: 6px;
  }

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

  .post-card .post-author__details dt,
  .post-card .post-author__details dd {
    display: block;
  }

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

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

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

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