/* Captain Feed for YouTube - Channel Profile card
 * Banner + avatar/name/stats bar + Subscribe button, matching a channel's
 * own YouTube "about" header at a glance.
 */
.captfyt-channel-profile {
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.captfyt-chp-banner {
    width: 100%;
    aspect-ratio: 1707 / 350;
    background: #0f0f0f;
    overflow: hidden;
}

.captfyt-chp-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.captfyt-chp-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 24px;
    background: #f8f9fa;
}

.captfyt-chp-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.captfyt-chp-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #e5e7eb;
}

/* If the avatar URL 403s/fails to load (YouTube's CDN occasionally blocks a
 * hotlinked hi-res thumbnail), hide the broken-image glyph and just show
 * the neutral placeholder circle instead - see the onerror handler above. */
.captfyt-chp-avatar--broken {
    color: transparent;
    font-size: 0;
}

.captfyt-chp-avatar--square {
    border-radius: 10px;
}

.captfyt-chp-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.captfyt-chp-name {
    font-size: 20px;
    font-weight: 600;
    color: #0f0f0f;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.captfyt-chp-stats {
    font-size: 13px;
    color: #606060;
}

.captfyt-chp-subscribe {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    background: #cc0000;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none !important;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.captfyt-chp-subscribe:hover {
    background: #a30000;
    color: #ffffff !important;
}

/* ── Dark Mode ─────────────────────────────────────────────────────────
 * Applied when the feed's Mode is set to Dark in the wizard (Step 3).
 * See render_channel_profile() in class-captfyt-shortcode.php. */
.captfyt-channel-profile--dark {
    border-color: #334155;
    background: #1e293b;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.captfyt-channel-profile--dark .captfyt-chp-bar {
    background: #0f172a;
}

.captfyt-channel-profile--dark .captfyt-chp-avatar {
    background: #334155;
}

.captfyt-channel-profile--dark .captfyt-chp-name {
    color: #f1f5f9;
}

.captfyt-channel-profile--dark .captfyt-chp-stats {
    color: #94a3b8;
}

@media (max-width: 480px) {
    .captfyt-chp-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .captfyt-chp-subscribe {
        width: 100%;
        text-align: center;
    }
    .captfyt-chp-name {
        font-size: 17px;
    }
    .captfyt-chp-avatar {
        width: 52px;
        height: 52px;
    }
}
