/* Author page (/blog/author/{slug}/): profile header, content tabs, article and breaking-news panels.
   All colors come from the theme tokens in general.css, so light and dark need no overrides. */

.arz-author {
    padding-bottom: 24px;
}

/* .arz-container is full-bleed with no gutter below 1112px; keep breadcrumb → pagination off the screen edges. */
@media (max-width: 1111px) {
    .arz-author {
        padding-inline: 16px;
    }
}

/* Profile ------------------------------------------------------------ */
.arz-author__profile {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px 24px;
    margin: 0 0 16px;
    padding: 24px;
    background: var(--arz-color-surface);
    border: 1px solid var(--arz-color-border);
    border-radius: var(--arz-radius-lg);
}

.arz-author__avatar {
    display: flex;
    flex-shrink: 0;
}

.arz-author__avatar .arz-avatar {
    width: 96px;
    height: 96px;
    background: var(--arz-color-surface-muted);
}

.arz-author__main {
    min-width: 0;
}

.arz-author__name {
    margin: 0 0 4px;
    color: var(--arz-color-text);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.667;
}

.arz-author__bio {
    max-width: 75ch;
    margin: 0;
    color: var(--arz-color-text-soft);
    font-size: 14px;
    line-height: 1.8;
    text-align: justify;
}

.arz-author__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    color: var(--arz-color-text-muted);
    font-size: 13px;
}

.arz-author__stats strong {
    color: var(--arz-color-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.arz-author__links {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.arz-author__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--arz-color-surface);
    border: 1px solid var(--arz-color-border-strong);
    border-radius: var(--arz-radius-md);
    transition: border-color var(--arz-duration-fast) var(--arz-ease-standard),
        background-color var(--arz-duration-fast) var(--arz-ease-standard);
}

.arz-author__link:hover {
    background: var(--arz-color-interactive-hover);
    border-color: var(--arz-color-primary);
}

.arz-author__link-icon {
    width: 18px;
    height: 18px;
    fill: var(--arz-color-text-soft);
}

.arz-author__link:hover .arz-author__link-icon {
    fill: var(--arz-color-primary);
}

/* Tabs (pill tabs: selected = primary / on-primary) ----------------------- */
.arz-author__tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.arz-author__tabs::-webkit-scrollbar {
    display: none;
}

.arz-author__tab {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    background: var(--arz-color-surface);
    border: 1px solid var(--arz-color-border);
    border-radius: var(--arz-radius-pill);
    color: var(--arz-color-text-soft);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color var(--arz-duration-fast) var(--arz-ease-standard),
        border-color var(--arz-duration-fast) var(--arz-ease-standard),
        color var(--arz-duration-fast) var(--arz-ease-standard);
}

.arz-author__tab:hover {
    background: var(--arz-color-interactive-hover);
    color: var(--arz-color-text);
}

.arz-author__tab--active,
.arz-author__tab--active:hover {
    background: var(--arz-color-primary);
    border-color: var(--arz-color-primary);
    color: var(--arz-color-on-primary);
}

.arz-author__tab-count {
    font-size: 12px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    opacity: .85;
}

/* Panels -------------------------------------------------------------- */
.arz-author__panel {
    background: var(--arz-color-surface);
    border: 1px solid var(--arz-color-border);
    border-radius: var(--arz-radius-lg);
}

.arz-author__panel--posts {
    padding: 0 16px;
}

.arz-author__panel--breaking {
    padding: 16px;
}

.arz-author__empty,
#author-page .arz-last-post__no-post {
    padding: 48px 16px;
    color: var(--arz-color-text-muted);
    font-size: 14px;
    text-align: center;
}

/* Article rows: replace the hard-coded last-post colors with tokens. */
#author-page .arz-last-post:not(:last-child) {
    border-bottom-color: var(--arz-color-divider, var(--arz-color-border));
}

#author-page .arz-last-post__image {
    background-color: var(--arz-color-surface-muted);
}

#author-page .arz-last-post__title,
#author-page .arz-last-post:hover .arz-last-post__title {
    color: var(--arz-color-text);
}

#author-page .arz-last-post:hover .arz-last-post__title {
    color: var(--arz-color-primary);
}

#author-page .arz-last-post__text,
#author-page .arz-last-post__author,
#author-page .arz-last-post__publish-time {
    color: var(--arz-color-text-muted);
}

/* Breaking-news cards (desktop): standalone cards in a fluid grid, no panel behind them. */
@media (min-width: 1025px) {
    .arz-author__panel--breaking {
        padding: 0;
        background: none;
        border: 0;
    }

    #author-page .breaking-items {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    #author-page .breaking-items > .eachitem {
        width: auto;
        min-width: 0;
        background: var(--arz-color-surface);
    }

    #author-page .breaking-items .eachitem .img {
        width: 100%;
        height: auto;
        aspect-ratio: 308 / 144;
        object-fit: cover;
    }
}

/* Pagination below the panel */
#author-page .arz-pagination {
    padding: 24px 0 0;
}

/* Tablet and mobile ----------------------------------------------------- */
@media (max-width: 767px) {
    .arz-author__profile {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "avatar name"
            "avatar stats"
            "bio bio"
            "links links";
        padding: 16px;
        gap: 4px 16px;
    }

    /* Let name, bio and stats take part in the profile grid directly. */
    .arz-author__main {
        display: contents;
    }

    .arz-author__avatar {
        grid-area: avatar;
        align-self: center;
    }

    .arz-author__avatar .arz-avatar {
        width: 64px;
        height: 64px;
    }

    .arz-author__name {
        grid-area: name;
        align-self: end;
        margin: 0;
        font-size: 18px;
        line-height: 1.45;
    }

    .arz-author__stats {
        grid-area: stats;
        align-self: start;
        margin: 0;
    }

    .arz-author__bio {
        grid-area: bio;
        margin-top: 8px;
        font-size: 13px;
    }

    .arz-author__links {
        grid-area: links;
        margin-top: 8px;
    }

    .arz-author__link {
        width: 44px;
        height: 44px;
    }

    .arz-author__tab {
        min-height: 44px;
    }

    .arz-author__panel--posts {
        padding: 0 12px;
    }

    /* Same as the breaking PLP on mobile: cards sit on the page, no panel box behind them. */
    .arz-author__panel--breaking {
        padding: 0;
        background: none;
        border: 0;
        border-radius: 0;
    }

    /* Keep relative time on one line; long ones ("۲ سال و ۴ ماه پیش") push the reactions
       to their own line at the end instead of clipping them off the card. */
    #author-page .breaking-items .publish-time {
        white-space: nowrap;
    }

    #author-page .breaking-items .info {
        flex-wrap: wrap;
        gap: 6px 4px;
    }

    #author-page .breaking-items .info .breakingReaction {
        margin-inline-start: auto;
    }
}
