/**
 * Copyright © 2026 Living Legacy LLC d/b/a Legacy Health and Fitness. All Rights Reserved.
 * Proprietary and confidential. Unauthorized use, copying, or distribution
 * is prohibited. See LICENSE file in project root.
 */

/**
 * Author byline + medical-review line.
 * Paired with assets/js/author-byline.js. See docs/aeo/strategy.md §5.
 *
 * Deliberately restrained: inherits the host page's type and colour via
 * currentColor and color-mix so it sits inside both the dark wellness pages and
 * the lighter gym pages without a per-page override. No new brand colours.
 *
 * Unstyled until .author-byline--active is added by the renderer, so a
 * placeholder (inert) author leaves no empty box behind.
 */

.author-byline {
    display: none;
}

.author-byline--active {
    display: block;
    margin: 1.5rem 0;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
    background: color-mix(in srgb, currentColor 4%, transparent);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.author-byline__inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-byline__avatar {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}

.author-byline__text {
    min-width: 0;
}

.author-byline__label {
    opacity: 0.7;
}

.author-byline__name {
    font-weight: 700;
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.author-byline__name:hover,
.author-byline__name:focus-visible {
    text-decoration-thickness: 2px;
}

.author-byline__role {
    opacity: 0.85;
}

.author-byline__creds {
    font-weight: 600;
    opacity: 0.95;
    /* Credentials are the E-E-A-T payload — keep them legible, not decorative. */
    white-space: nowrap;
}

.author-byline__review,
.author-byline__updated {
    margin: 0.625rem 0 0;
    padding-top: 0.625rem;
    border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent);
    font-size: 0.875rem;
    opacity: 0.8;
}

.author-byline__inner + .author-byline__review,
.author-byline__inner + .author-byline__updated {
    /* Only draw the divider when there's a byline above it. */
    margin-top: 0.75rem;
}

.author-byline__review:only-child,
.author-byline__updated:only-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

/* The generic (no named reviewer) variant is a responsibility statement rather
   than a credential, so it reads as fine print. */
.author-byline__review--generic {
    font-size: 0.8125rem;
    opacity: 0.72;
}

@media (max-width: 480px) {
    .author-byline__creds {
        white-space: normal;
    }
    .author-byline__inner {
        align-items: flex-start;
    }
}
