/* Combined author + star-rating module.
   Styled to match the site's aside-box cards (assets/styles.css):
   var(--card) background, 2px ink border, var(--r) radius, var(--shadow).
   Sits at the top of the right-hand <aside>, above the "Take it with you" box. */

.author-rating-widget {
  background: var(--card, #fff);
  border: 2px solid var(--ink, #191636);
  border-radius: var(--r, 14px);
  box-shadow: var(--shadow, 0 2px 0 #e9e7f2);
  padding: 16px 18px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "avatar info"
    "rating rating";
  column-gap: 12px;
  row-gap: 12px;
  align-items: center;
}

.author-avatar {
  grid-area: avatar;
  width: 46px;
  height: 46px;
  border-radius: 50%;      /* clips the plain white square corners of the source */
  object-fit: cover;
  border: 2px solid var(--ink, #191636);
  display: block;
}

.author-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.author-name {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink, #191636);
}

.author-title {
  font-size: 12.5px;
  color: var(--ink-mute, #8A88A3);
}

.rating-row {
  grid-area: rating;
  border-top: 1px solid var(--line, #e9e7f2);
  padding-top: 12px;
}

.star-rating-stars {
  display: inline-flex;
  gap: 3px;
  line-height: 0;
}

.star-rating-stars:not(.disabled) {
  cursor: pointer;
}

.star-rating-stars .star {
  width: 22px;
  height: 22px;
  color: #e0e0e0;                 /* empty state light grey */
  transition: color 0.08s ease;
}

.star-rating-stars .star.filled {
  color: #FFC107;                 /* gold */
}

.star-rating-summary {
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--ink-soft, #4A4768);
}

.rating-row.rated .star-rating-summary {
  font-weight: 600;
  color: var(--ink, #191636);
}

/* Keep <picture> transparent to the grid so the .author-avatar img stays the grid item */
.author-rating-widget picture { display: contents; }
