/* ==========================================================
   Author card — clickable byline name opens this popup.
   Drop this file in your theme's /assets/ folder.
   Enqueued from functions.php on every single post view.
   ========================================================== */

.author-trigger {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.author-trigger:hover,
.author-trigger:focus-visible {
    color: #0b1f4d;
}

/* Plain-text byline on the single-article template only
   ("by NAME on Date") — no box, stays on one line, matches
   the rest of the article's body copy. */
.single-byline {
    margin: 6px 0 18px;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    overflow-x: auto;
}

.single-byline .author-trigger {
    display: inline !important;
    font-weight: 700;
    text-transform: uppercase;
    color: #0b1f4d;
    white-space: nowrap;
}

.single-byline .author-trigger:hover,
.single-byline .author-trigger:focus-visible {
    color: #0b1f4d;
}

.single-byline em {
    font-style: italic;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .single-byline {
        font-size: 13px;
    }
}

.author-card-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
}

.author-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: min(90vw, 340px);
    max-height: 85vh;
    overflow-y: auto;
    background: #0b1f4d;
    color: #ffffff;
    padding: 28px 24px 24px;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    /* Reset inherited text styling — the byline this card is
       triggered from may set white-space: nowrap or
       text-transform: uppercase on itself, and both properties
       inherit down through the DOM by default. Without this
       reset, the card content (especially the bio) picks up
       whatever the surrounding byline is doing. */
    white-space: normal;
    text-transform: none;
}

.author-card[hidden] {
    display: none;
}

.author-card-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
}

.author-card-close:hover {
    opacity: 1;
}

.author-card-photo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 14px;
    border: 3px solid rgba(255, 255, 255, 0.25);
}

.author-card-name {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}

.author-card-twitter,
.author-card-email {
    display: block;
    color: #9ecbff;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 6px;
}

.author-card-twitter:hover,
.author-card-email:hover {
    text-decoration: underline;
}

.author-card-bio {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 14px 0 0;
    text-align: left;
}

.author-card-bio p {
    margin: 0 0 10px;
}

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

.author-card-more {
    display: inline-block;
    margin-top: 16px;
    font-size: 12px;
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 2px;
}

.author-card-more:hover {
    border-color: #ffffff;
}

/* ==========================================================
   Boxed byline — used everywhere EXCEPT the single-article
   template (which uses .single-byline above instead). Matches
   the reference two-tone design: dark blue date panel, light
   panel with an UPPERCASE bold author name.
   ========================================================== */

.byline-box {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border-radius: 3px;
    font-size: 12px;
}

.byline-box .date {
    background: #0b1f4d !important;
    color: #ffffff !important;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    white-space: nowrap;
}

.byline-box .author {
    background: #e9e9e9;
    color: #333333;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.byline-box .author .author-trigger {
    text-transform: uppercase !important;
    font-weight: 700;
    color: inherit !important;
    text-decoration: none;
}

.byline-box .author .author-trigger:hover,
.byline-box .author .author-trigger:focus-visible {
    color: #0b1f4d !important;
}