/*!
 * Better Author Box — Frontend Stylesheet
 * Compiled from assets/src/scss/main.scss
 * To rebuild: npm run build
 */

/* ------------------------------------------------------------------ */
/* Author Box Wrapper                                                   */
/* ------------------------------------------------------------------ */

.bab-author-box-wrapper {
  margin: 2em 0;
  clear: both;
}

/* ------------------------------------------------------------------ */
/* Author Box Layout                                                    */
/* ------------------------------------------------------------------ */

.bab-author-box {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  background: var(--bab-box-bg, #ffffff);
  border: 1px solid var(--bab-box-border-color, #e0e0e0);
  border-radius: var(--bab-box-border-radius, 8px);
  padding: var(--bab-box-padding, 20px);
  box-sizing: border-box;
}

.bab-author-box .bab-avatar-col {
  flex-shrink: 0;
}

.bab-author-box .bab-content-col {
  flex: 1;
  min-width: 0;
}

/* ------------------------------------------------------------------ */
/* Avatar                                                               */
/* ------------------------------------------------------------------ */

.bab-author-box .bab-avatar img,
.bab-author-box .bab-avatar amp-img {
  display: block;
  width: var(--bab-avatar-size, 80px);
  height: var(--bab-avatar-size, 80px);
  object-fit: cover;
  transition: transform 0.35s ease;
}

/* Shape variants */
.bab-author-box.bab-shape-circle .bab-avatar img,
.bab-author-box.bab-shape-circle .bab-avatar amp-img {
  border-radius: 50%;
}

.bab-author-box.bab-shape-square .bab-avatar img,
.bab-author-box.bab-shape-square .bab-avatar amp-img {
  border-radius: 0;
}

.bab-author-box.bab-shape-rounded-square .bab-avatar img,
.bab-author-box.bab-shape-rounded-square .bab-avatar amp-img {
  border-radius: 12px;
}

/* Hover rotate — only after JS adds .bab-loaded to prevent flash */
.bab-author-box.bab-avatar-hover-rotate.bab-loaded .bab-avatar:hover img,
.bab-author-box.bab-avatar-hover-rotate.bab-loaded .bab-avatar.bab-touch-active img {
  transform: rotate(360deg);
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* ------------------------------------------------------------------ */
/* Typography                                                           */
/* ------------------------------------------------------------------ */

.bab-author-box .bab-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.bab-author-box .bab-author-name {
  margin: 0;
  padding: 0;
  font-size: var(--bab-name-size, 18px);
  font-weight: var(--bab-name-weight, 700);
  color: var(--bab-name-color, #111111);
  font-family: var(--bab-name-font, inherit);
  line-height: 1.3;
}

.bab-author-box .bab-author-name a {
  color: inherit;
  text-decoration: none;
}

.bab-author-box .bab-author-name a:hover {
  text-decoration: underline;
}

.bab-author-box .bab-job-title {
  margin: 0 0 6px;
  padding: 0;
  font-size: var(--bab-job-title-size, 13px);
  color: var(--bab-job-title-color, #555555);
  font-family: var(--bab-job-title-font, inherit);
  line-height: 1.4;
}

.bab-author-box .bab-bio {
  font-size: var(--bab-bio-size, 14px);
  color: var(--bab-bio-color, #333333);
  font-family: var(--bab-bio-font, inherit);
  line-height: 1.6;
  margin: 0 0 10px;
}

.bab-author-box .bab-bio p {
  margin: 0 0 8px;
}

.bab-author-box .bab-bio p:last-child {
  margin-bottom: 0;
}

.bab-author-box .bab-website-link {
  font-size: var(--bab-website-size, 14px);
  color: var(--bab-website-color, #0073aa);
  font-family: var(--bab-website-font, inherit);
  text-decoration: none;
  word-break: break-all;
}

.bab-author-box .bab-website-link:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Social Icons                                                         */
/* ------------------------------------------------------------------ */

.bab-social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.bab-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--bab-icon-size, 24px);
  height: var(--bab-icon-size, 24px);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}

.bab-social-icon svg {
  width: 60%;
  height: 60%;
  display: block;
  fill: currentColor;
}

.bab-social-icon:hover {
  opacity: 0.85;
}

.bab-social-icon.bab-icon-shadow {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.bab-social-icon.bab-icon-thin-border {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.bab-social-icon.bab-icon-shadow.bab-icon-thin-border {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.bab-social-icon.bab-icon-hover-rotate:hover {
  transform: rotate(360deg);
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Icon styles */
.bab-icon-filled-circle {
  border-radius: 50%;
  color: #fff;
}

.bab-icon-filled-circle svg {
  fill: #fff;
}

.bab-icon-filled-square {
  border-radius: 0;
  color: #fff;
}

.bab-icon-filled-square svg {
  fill: #fff;
}

.bab-icon-rounded-square {
  border-radius: 6px;
  color: #fff;
}

.bab-icon-rounded-square svg {
  fill: #fff;
}

.bab-icon-outline {
  background: transparent !important;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.bab-icon-outline svg {
  width: 55%;
  height: 55%;
}

.bab-icon-plain {
  background: transparent !important;
  width: auto !important;
  height: auto !important;
  padding: 2px;
}

.bab-icon-plain svg {
  width: var(--bab-icon-size, 24px);
  height: var(--bab-icon-size, 24px);
}

/* ------------------------------------------------------------------ */
/* Widgets                                                              */
/* ------------------------------------------------------------------ */

.widget .bab-top-authors-list,
.bab-top-authors-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bab-top-authors-list .bab-top-author-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

.bab-top-authors-list .bab-top-author-item:last-child {
  margin-bottom: 0;
}

.bab-top-authors-list .bab-top-author-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.bab-top-authors-list .bab-top-author-link:hover .bab-top-author-name {
  text-decoration: underline;
}

.bab-top-authors-list .bab-widget-avatar {
  display: block;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.bab-top-authors-list .bab-top-author-name {
  font-size: 0.9em;
  font-weight: 600;
  line-height: 1.3;
}

.widget .bab-author-box-wrapper {
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */

@media screen and (max-width: 480px) {
  .bab-author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bab-author-box .bab-name-row {
    justify-content: center;
  }

  .bab-author-box .bab-social-icons {
    justify-content: center;
  }
}
