/**
 * CFRO Component — Single Show Page (Figma v3)
 * Matches the SingleShow.tsx React reference.
 *
 * @package CFRO
 * @since   4.0.0
 */

/* ── Page wrapper ───────────────────────────── */
.cfro-single-show {
    padding: 2.5rem 0 4rem;
}

/* ── Back link ──────────────────────────────── */
.cfro-show-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--cfro-forest);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    text-decoration: none;
    transition: color var(--cfro-transition);
}
.cfro-show-back:hover {
    color: var(--cfro-forest-light);
    text-decoration: none;
}

/* ── Show header card ───────────────────────── */
.cfro-show-header {
    background: var(--cfro-forest-dark);
    color: var(--cfro-white);
    border-radius: var(--cfro-radius);
    overflow: hidden;
    margin-bottom: 2.5rem;
}
.cfro-show-header__grid {
    display: grid;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .cfro-show-header__grid {
        grid-template-columns: 1fr 2fr;
    }
}
/* Square image */
.cfro-show-header__image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
@media (min-width: 768px) {
    .cfro-show-header__image {
        aspect-ratio: auto;
    }
}
.cfro-show-header__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cfro-show-header__placeholder {
    width: 100%;
    height: 100%;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
}
/* Info panel */
.cfro-show-header__info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (min-width: 768px) {
    .cfro-show-header__info {
        padding: 2.5rem;
    }
}
.cfro-show-header__title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    color: var(--cfro-white);
    letter-spacing: -0.02em;
}
.cfro-show-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}
.cfro-show-header__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Schedule meta item — icon aligns to top when multiple air times */
.cfro-show-header__meta-item--schedule {
    align-items: flex-start;
}
.cfro-show-header__meta-item--schedule > svg {
    flex-shrink: 0;
    margin-top: 0.15rem;              /* visually centre with first text line */
}
.cfro-show-header__schedule-lines {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cfro-show-header__genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* ── Genre tag (shared with shows page) ─────── */
.cfro-genre-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.75rem;
    border-radius: var(--cfro-radius);
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
}

/* ── Two-column body ────────────────────────── */
.cfro-show-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
@media (min-width: 1024px) {
    .cfro-show-body {
        grid-template-columns: 2fr 1fr;
    }
}
.cfro-show-body--full {
    grid-template-columns: 1fr;
}

/* ── Section label (small uppercase) ────────── */
.cfro-show-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cfro-charcoal-light);
    margin: 0 0 1rem;
    font-weight: 600;
    border: none;
    padding: 0;
}

/* ── About card ─────────────────────────────── */
.cfro-show-about {
    margin-bottom: 2.5rem;
}
.cfro-show-about__card {
    border: 1px solid rgba(27, 122, 90, 0.1);
    border-radius: var(--cfro-radius);
    background: var(--cfro-white);
    padding: 1.5rem;
}
.cfro-show-about__card p {
    color: var(--cfro-charcoal-light);
    line-height: 1.7;
    font-size: 1.1rem;
    margin: 0 0 1rem;
}
.cfro-show-about__card p:last-child {
    margin-bottom: 0;
}

/* ── Episodes (placeholder) ─────────────────── */
.cfro-show-episodes__subtitle {
    font-size: 0.875rem;
    color: rgba(90, 90, 90, 0.7);
    margin: -0.5rem 0 1.5rem;
}
.cfro-episodes-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.cfro-episodes-list__empty {
    color: var(--cfro-charcoal-light);
    font-size: 0.9rem;
    border: 1px solid rgba(27, 122, 90, 0.08);
    border-radius: var(--cfro-radius);
    background: var(--cfro-white);
    padding: 1rem 1.25rem;
    margin: 0;
}

/* ── Episode row ────────────────────────────── */
.cfro-episode {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(27, 122, 90, 0.08);
    border-radius: var(--cfro-radius);
    background: var(--cfro-white);
    transition: border-color var(--cfro-transition);
}
.cfro-episode:hover {
    border-color: rgba(27, 122, 90, 0.2);
}
.cfro-episode__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.cfro-episode__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--cfro-charcoal);
    line-height: 1.4;
}
.cfro-episode__date {
    display: block;
    font-size: 0.8rem;
    color: var(--cfro-charcoal-light);
}

/* ── Sidebar ────────────────────────────────── */
.cfro-show-sidebar {
    /* Sticky sidebar on desktop */
}
@media (min-width: 1024px) {
    .cfro-show-sidebar {
        position: sticky;
        top: 2rem;
        align-self: start;
    }
}

/* ── Connect card ───────────────────────────── */
.cfro-show-connect {
    border: 1px solid rgba(27, 122, 90, 0.1);
    border-radius: var(--cfro-radius);
    background: var(--cfro-white);
    overflow: hidden;
}
.cfro-show-connect__header {
    background: var(--cfro-sage-pale);
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(27, 122, 90, 0.1);
}
.cfro-show-connect__header h3 {
    margin: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cfro-forest-dark);
    font-weight: 600;
}
.cfro-show-connect__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.cfro-show-connect__item {
    font-size: 0.875rem;
}
.cfro-show-connect__label {
    color: var(--cfro-charcoal);
    margin-bottom: 0.2rem;
    font-weight: 500;
}
.cfro-show-connect__link {
    display: block;
    color: var(--cfro-forest);
    text-decoration: none;
    transition: color var(--cfro-transition);
    line-height: 1.6;
}
.cfro-show-connect__link:hover {
    color: var(--cfro-forest-light);
    text-decoration: none;
}

/* ── Episode audio player ([episode_audio_player] shortcode) ─────── */

/*
 * The <figure> resets browser default margins and acts as the
 * card-level wrapper. Sits naturally inside .cfro-episode rows or
 * standalone inside a Query Loop.
 */
.cfro-episode-player {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

/*
 * Episode title rendered as a <figcaption>.
 * Visually small; screen readers announce it before the audio control.
 */
.cfro-episode-player__title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cfro-charcoal);
    line-height: 1.4;
    margin: 0;
}

/*
 * The native <audio> element.
 * width: 100% makes it fill its container in any layout context.
 * min-height matches WCAG 2.5.5 target size for the controls.
 */
.cfro-episode-player__audio {
    width: 100%;
    min-height: 44px;
    display: block;
    border-radius: var(--cfro-radius, 4px);
    accent-color: var(--cfro-forest, #1b7a5a);
}

/* High-contrast mode — toggled by adding .high-contrast to <body>.
 * CSS custom properties alone handle the switch; no JS class logic needed. */
.high-contrast .cfro-episode-player__title {
    color: var(--cfro-hc-text, #fff);
}
.high-contrast .cfro-episode-player__audio {
    accent-color: var(--cfro-hc-accent, #fff);
    outline: 2px solid currentColor;
}

/* ── Legacy class compat (keep old hero selectors from breaking) ── */
.cfro-show-hero { display: none; }
.cfro-show-content { display: none; }
