/**
 * Authors Directory & Author Avatar Styles
 * Area: authors
 */

/* ==========================================================================
   1. Avatar Component
   ========================================================================== */
.ekbs-avatar {
  display: inline-grid;
  place-items: center;
  width: var(--ekbs-avatar-size, 96px);
  height: var(--ekbs-avatar-size, 96px);
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--theme-border-color);
}

.ekbs-avatar svg {
  width: 78%;
  height: 78%;
  margin-top: 22%;
  fill: currentColor;
}

.ekbs-avatar--male{background:color-mix(in srgb,var(--theme-palette-color-2) 24%,var(--theme-palette-color-8));color:var(--theme-palette-color-2)}

.ekbs-avatar--female {
  background: color-mix(in srgb, #d6336c 13%, var(--theme-palette-color-8));
  color: color-mix(in srgb, #d6336c 62%, var(--theme-text-color));
}

.ekbs-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* ==========================================================================
   2. Authors Archive Page (/writers/)
   ========================================================================== */
.ekbs-authors-intro {
  font-size: 16px;
  line-height: 1.6;
  color: var(--theme-text-color);
  margin: 0 0 24px;
}

.ekbs-authors-count {
  font-weight: 700;
  color: var(--theme-headings-color);
}

.ekbs-authors-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 32px;
}

.ekbs-authors-letters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--theme-palette-color-8);
  border: 1px solid var(--theme-border-color);
  color: var(--theme-text-color);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.ekbs-authors-letters a:hover,
.ekbs-authors-letters a:focus-visible {
  border-color: var(--theme-palette-color-1);
  color: var(--theme-palette-color-1);
  background: color-mix(in srgb, var(--theme-palette-color-1) 8%, var(--theme-palette-color-8));
}

.ekbs-authors-group {
  margin-bottom: 36px;
  scroll-margin-top: 100px;
}

.ekbs-authors-letter {
  font-size: 22px;
  font-weight: 700;
  color: var(--theme-headings-color);
  border-bottom: 2px solid var(--theme-border-color);
  padding-bottom: 8px;
  margin: 0 0 16px;
}

.ekbs-authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (max-width: 689px) {
  .ekbs-authors-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

.ekbs-authors-grid li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ekbs-author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--theme-palette-color-8);
  border: 1px solid var(--theme-border-color);
  border-radius: 12px;
  padding: 16px 10px;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
  height: 100%;
  box-sizing: border-box;
}

.ekbs-author-card:hover,
.ekbs-author-card:focus-visible {
  border-color: var(--theme-palette-color-1);
  transform: translateY(-2px);
}

.ekbs-author-card .ekbs-avatar {
  margin-bottom: 12px;
}

.ekbs-author-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--theme-headings-color);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ekbs-author-card__count {
  font-size: 12.5px;
  color: color-mix(in srgb, var(--theme-text-color) 70%, transparent);
  margin-top: auto;
}

.ekbs-authors-credit {
  font-size: 12.5px;
  color: color-mix(in srgb, var(--theme-text-color) 70%, transparent);
  margin-top: 32px;
  line-height: 1.5;
}

/* ==========================================================================
   3. Single Writer Taxonomy Archive
   ========================================================================== */
body.archive.tax-writer .hero-section[data-type="type-1"] .entry-header {
  display: flex;
  /* The template CSS forces column !important on archive heroes; avatar and name share the first row here */
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center !important;
  gap: 16px;
}

body.tax-writer .hero-section .entry-header .ekbs-avatar {
  flex-shrink: 0;
}

body.archive.tax-writer .hero-section .entry-header .page-title {
  margin: 0;
  /* take the rest of the first row so the description starts on its own line */
  flex: 1 1 calc(100% - 120px);
  min-width: 0;
}

body.tax-writer .hero-section .entry-header .page-description,
body.tax-writer .hero-section .entry-header .ekbs-avatar-credit,
body.tax-writer .hero-section .entry-header .ekrd-writer-meta-bar {
  flex-basis: 100%;
  width: 100%;
}

.ekbs-avatar-credit {
  font-size: 12px;
  color: color-mix(in srgb, var(--theme-text-color) 70%, transparent);
  margin: 6px 0 0;
}

.ekbs-avatar-credit a {
  color: inherit;
  text-decoration: underline;
}

.ekbs-avatar-credit a:hover {
  color: var(--theme-link-initial-color, var(--theme-palette-color-1));
}

/* Room between the breadcrumb and the page heading on /writers/ */
body.page-id-2720 .ekbs-bc-bar{padding-bottom:16px}
