/**
 * Author Box — renders below plugin-generated posts for E-E-A-T.
 *
 * alpha45 (2026-04-18). Schema.org JSON-LD gives Google the structured
 * author data; this stylesheet renders the visible counterpart readers
 * (and Google Quality Raters) see in the HTML. Both layers read from
 * the same AuthorPersona row, guaranteeing consistency.
 *
 * Design notes
 * - Card uses neutral border/background so it sits naturally in most
 *   themes without clashing with brand accent colours.
 * - Avatar is 96px on desktop, 72px on mobile. Round, subtle shadow.
 * - Layout is flex row on desktop; stacks vertically on <640px.
 * - Expertise tags are pill-shaped, wrap naturally.
 * - All colours use CSS custom properties so theme overrides are trivial.
 */

.aiseo-author-box {
  /* alpha46 — fixed light palette. Originally alpha45 respected
   * `prefers-color-scheme: dark` and flipped to a dark card variant
   * when the reader's OS preferred dark. That created a visual
   * mismatch on light themes like maxepro where the surrounding
   * page stayed light while the box went dark. Themes that actually
   * support dark mode will supply their own overrides; operators
   * who want a dark card can override the six custom properties
   * below via child stylesheet. */
  --aiseo-ab-bg:        #f8fafc;
  --aiseo-ab-border:    #e2e8f0;
  --aiseo-ab-text:      #1e293b;
  --aiseo-ab-muted:     #64748b;
  --aiseo-ab-accent:    #3b82f6;
  --aiseo-ab-tag-bg:    #e0e7ff;
  --aiseo-ab-tag-text:  #4338ca;

  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--aiseo-ab-bg);
  border: 1px solid var(--aiseo-ab-border);
  border-radius: 12px;
  padding: 24px;
  margin: 48px 0 24px;
  color: var(--aiseo-ab-text);
  line-height: 1.6;
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.aiseo-author-box__avatar {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.aiseo-author-box__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aiseo-author-box__body {
  flex: 1;
  min-width: 0;
}

.aiseo-author-box__name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}

.aiseo-author-box__name a {
  color: var(--aiseo-ab-text);
  text-decoration: none;
}

.aiseo-author-box__name a:hover {
  color: var(--aiseo-ab-accent);
  text-decoration: underline;
}

.aiseo-author-box__credentials {
  font-size: 14px;
  color: var(--aiseo-ab-muted);
  margin: 0 0 12px;
  font-weight: 500;
}

.aiseo-author-box__bio {
  font-size: 15px;
  color: var(--aiseo-ab-text);
  margin: 0 0 14px;
}

.aiseo-author-box__expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.aiseo-author-box__tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--aiseo-ab-tag-bg);
  color: var(--aiseo-ab-tag-text);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.aiseo-author-box__archive {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--aiseo-ab-accent);
  text-decoration: none;
  font-weight: 500;
}

.aiseo-author-box__archive:hover {
  text-decoration: underline;
}

.aiseo-author-box__archive::after {
  content: " →";
}

/* Mobile: stack vertically, smaller avatar */
@media (max-width: 640px) {
  .aiseo-author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 20px;
  }

  .aiseo-author-box__avatar {
    width: 72px;
    height: 72px;
  }

  .aiseo-author-box__expertise {
    justify-content: center;
  }
}

/* Print styles — keep author info in printed pages for credibility */
@media print {
  .aiseo-author-box {
    background: transparent;
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
  }
}
