:root {
    --apbx-icon-color: #64748b;
    --apbx-icon-bg: #f1f5f9;
    --apbx-bg: #ffffff;
    --apbx-border: #e2e8f0;
    --apbx-radius: 16px;
    --apbx-padding: 32px;
    --apbx-gap: 24px;
    --apbx-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --apbx-name-size: 1.75em;
    --apbx-bio-size: 1.125em;
    --apbx-avatar-size: 100px;
}

.apbx-author-box {
    display: flex;
    gap: var(--apbx-gap);
    padding: var(--apbx-padding);
    margin: 3rem 0 2rem;
    border: 1px solid var(--apbx-border);
    border-radius: var(--apbx-radius);
    background: var(--apbx-bg);
    box-shadow: var(--apbx-shadow);
    align-items: flex-start;
    transition: background-color 0.15s ease;
}

.apbx-author-box:hover {
    background-color: #f8fafc;
}

.apbx-author-box__avatar img {
    border-radius: 50%;
    display: block;
    width: var(--apbx-avatar-size);
    height: var(--apbx-avatar-size);
    object-fit: cover;
    border: 1px solid var(--apbx-border);
}

.apbx-author-box__content {
    flex: 1;
    min-width: 0;
}

.apbx-author-box__name {
    margin: 0 0 14px;
    padding: 0;
    font-size: var(--apbx-name-size);
    font-weight: 700;
    line-height: 1.2;
    color: #1e293b;
}

.apbx-author-box__name a {
    text-decoration: none;
    color: inherit;
    transition: color 0.15s ease;
}

.apbx-author-box__name a:hover {
    color: #64748b;
}

.apbx-author-box__job {
    display: block;
    font-size: 0.85em;
    font-weight: 400;
    font-style: normal;
    color: #94a3b8;
    margin: 0 0 14px;
}

.apbx-author-box__post-count {
    display: inline-block;
    font-size: 0.78em;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    letter-spacing: 0.03em;
}

.apbx-author-box__bio {
    margin: 0 0 18px;
    font-size: var(--apbx-bio-size);
    line-height: 1.65;
    color: #475569;
}

.apbx-author-box__socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 18px;
}

.apbx-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--apbx-icon-bg);
    color: var(--apbx-icon-color);
    text-decoration: none;
    border: 1px solid transparent;
    overflow: hidden;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.apbx-social-link:hover {
    opacity: .8;
}

.apbx-social-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.apbx-social-link__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.apbx-social-link__icon svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px;
    max-height: 18px;
    display: block;
    flex-shrink: 0;
}

/* Tooltip */
.apbx-social-link[data-tooltip] {
    position: relative;
}

.apbx-social-link[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: #1e293b;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.apbx-social-link[data-tooltip]:hover::after {
    opacity: 1;
}

.apbx-author-box__all-posts {
    display: inline-block;
    font-size: 0.78em;
    font-weight: 400;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.apbx-author-box__all-posts:hover {
    color: #1e293b;
}

/* Style: Card */
.apbx-style--card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 20px;
    background: #fff;
    padding: 0;
    overflow: hidden;
}

.apbx-style--card::before {
    content: '';
    display: block;
    height: 6px;
    background: linear-gradient(90deg, #1e293b, #64748b);
    width: 100%;
}

.apbx-style--card .apbx-author-box__avatar {
    margin-top: 24px;
}

.apbx-style--card .apbx-author-box__avatar img {
    width: 110px;
    height: 110px;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.apbx-style--card .apbx-author-box__content {
    padding: 0 28px 28px;
}

.apbx-style--card .apbx-author-box__socials {
    justify-content: center;
}

.apbx-style--card .apbx-author-box__all-posts {
    display: inline-block;
    margin-top: 4px;
    padding: 6px 18px;
    border-radius: 20px;
    background: #f1f5f9;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.apbx-style--card .apbx-author-box__all-posts:hover {
    background: #1e293b;
    color: #fff;
}

/* Style: Minimal */
.apbx-style--minimal {
    border: none;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 20px 0;
    gap: 16px;
}

.apbx-style--minimal:hover {
    background-color: transparent;
}

.apbx-style--minimal .apbx-author-box__avatar img {
    width: 48px;
    height: 48px;
}

.apbx-style--minimal .apbx-author-box__name {
    font-size: 1em;
    font-weight: 600;
}

.apbx-style--minimal .apbx-author-box__job {
    font-size: 0.8em;
    margin-bottom: 6px;
}

.apbx-style--minimal .apbx-author-box__bio {
    font-size: 0.85em;
    line-height: 1.55;
    color: #64748b;
    margin-bottom: 8px;
}

.apbx-style--minimal .apbx-author-box__socials {
    gap: 4px;
    margin-bottom: 4px;
}

.apbx-style--minimal .apbx-social-link {
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    color: #94a3b8;
}

.apbx-style--minimal .apbx-social-link:hover {
    background: transparent;
    color: #1e293b;
    border: none;
}

.apbx-style--minimal .apbx-social-link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

.apbx-style--minimal .apbx-social-link__icon svg {
    width: 14px;
    height: 14px;
}

.apbx-style--minimal .apbx-author-box__all-posts {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

/* Style: Banner */
.apbx-style--banner {
    position: relative;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 32px 32px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #f8fafc;
    border: none;
}

.apbx-style--banner .apbx-author-box__avatar {
    margin-top: -20px;
}

.apbx-style--banner .apbx-author-box__avatar img {
    width: 100px;
    height: 100px;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.apbx-style--banner .apbx-author-box__name {
    color: #fff;
}

.apbx-style--banner .apbx-author-box__job {
    color: #94a3b8;
}

.apbx-style--banner .apbx-author-box__bio {
    color: #cbd5e1;
}

.apbx-style--banner .apbx-author-box__socials {
    justify-content: center;
}

.apbx-style--banner .apbx-social-link {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.apbx-style--banner .apbx-social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.apbx-style--banner .apbx-author-box__all-posts {
    color: #93c5fd;
}

.apbx-style--banner .apbx-author-box__all-posts:hover {
    color: #bfdbfe;
}

/* Multi-author grid */
.apbx-author-grid {
    display: grid;
    gap: 0;
    margin: 2rem 0;
}

.apbx-author-grid .apbx-author-box {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.apbx-author-grid--2 {
    grid-template-columns: 1fr 1fr;
}

.apbx-author-grid--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.apbx-author-grid--4 {
    grid-template-columns: 1fr 1fr;
}

/* Shared border & radius for grid */
.apbx-author-grid {
    border: 1px solid var(--apbx-border);
    border-radius: var(--apbx-radius);
    overflow: hidden;
    box-shadow: var(--apbx-shadow);
}

.apbx-author-grid .apbx-author-box {
    border: none;
    border-right: 1px solid var(--apbx-border);
}

.apbx-author-grid .apbx-author-box:last-child {
    border-right: none;
}

.apbx-author-grid--4 .apbx-author-box:nth-child(2) {
    border-right: none;
}

.apbx-author-grid--4 .apbx-author-box:nth-child(-n+2) {
    border-bottom: 1px solid var(--apbx-border);
}

/* Stack boxes vertically in grid (avatar on top) */
.apbx-author-grid .apbx-author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    gap: 16px;
}

.apbx-author-grid .apbx-author-box:hover {
    background: #f8fafc;
}

.apbx-author-grid .apbx-author-box__avatar img {
    width: 96px;
    height: 96px;
}

.apbx-author-grid .apbx-author-box__name {
    font-size: 1.05em;
    margin-bottom: 6px;
}

.apbx-author-grid .apbx-author-box__job {
    margin-bottom: 2px;
    font-size: 0.82em;
}

.apbx-author-grid .apbx-author-box__bio {
    font-size: 0.75em;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 8px;
    margin-bottom: 16px;
}

.apbx-author-grid .apbx-author-box__socials {
    justify-content: center;
    gap: 6px;
    margin-bottom: 0;
}

.apbx-author-grid .apbx-social-link {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.apbx-author-grid .apbx-social-link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

.apbx-author-grid .apbx-social-link__icon svg {
    width: 14px;
    height: 14px;
}

.apbx-author-grid .apbx-author-box__all-posts {
    display: none;
}

/* Responsive */
@media (max-width: 600px) {
    .apbx-author-grid--2,
    .apbx-author-grid--3 {
        grid-template-columns: 1fr;
    }

    .apbx-author-grid--4 {
        grid-template-columns: 1fr;
    }

    .apbx-author-grid .apbx-author-box {
        border-right: none !important;
        border-bottom: 1px solid var(--apbx-border);
    }

    .apbx-author-grid .apbx-author-box:last-child {
        border-bottom: none;
    }
}

@media (max-width: 600px) {
    .apbx-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
        gap: 16px;
    }

    .apbx-author-box__socials {
        justify-content: center;
    }
}
