/**
 * Webinar Replay — Penny (May 2026)
 *
 * Adds replay-specific components on top of webinar.css.
 * Class prefix: .webinar-replay-* (matches engine-refactor namespace per spec).
 *
 * Sections:
 *   1. Vimeo facade (lazy iframe)
 *   2. Chapters / timestamps
 *   3. Synthesized body
 *   4. FAQ (details/summary)
 *   5. Activation block (find Penny in your account)
 *   6. Transcript collapsible
 *   7. Past-tense announce ribbon override
 */

/* Scroll-anchor offset — accounts for fixed nav (~60px) + announce ribbon (~40px). Applied to every section that's a deep-link target so jumping never lands on cut-off content. */
.webinar-replay-video-section,
.webinar-replay-chapters,
.webinar-replay-activation,
.webinar-replay-transcript,
#speakers-justin,
#speakers-derek {
    scroll-margin-top: 110px;
}

/* 0. Hero override — replay variant: 2-column with text left, CTAs right (video lives in its own section below) */
.webinar-hero--replay {
    padding: 110px 20px 64px;
}
.webinar-hero--replay .content {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
    align-items: center;
    justify-content: center;
}
.webinar-hero__info--replay {
    text-align: left;
}
.webinar-hero--replay h1 {
    text-wrap: balance;
}
/* Speakers go horizontal on the replay hero */
.webinar-hero--replay .webinar-hero__speakers {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem 1.75rem;
    margin-bottom: 0;
}
.webinar-hero--replay .webinar-speaker {
    gap: 10px;
}
.webinar-hero--replay .webinar-speaker__details strong {
    font-size: 0.92rem;
    line-height: 1.2;
}
.webinar-hero--replay .webinar-speaker__details span {
    font-size: 0.78rem;
    line-height: 1.3;
}

/* Right-column CTA stack — sits at the inner edge of the right column, close to the left content */
.webinar-replay-hero-aside {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: stretch;
    justify-self: start;
    width: 100%;
    max-width: 280px;
}
.webinar-replay-hero-aside .webinar-replay-hero-cta__primary,
.webinar-replay-hero-aside .webinar-replay-hero-cta__secondary {
    text-align: center;
    justify-content: center;
    padding: 1.05rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.25;
    width: 100%;
    min-height: 56px;
    box-sizing: border-box;
}

/* Tablet collapse: stack to one column with CTAs below text */
@media (max-width: 900px) {
    .webinar-hero--replay .content {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
    .webinar-replay-hero-aside {
        justify-self: stretch;
        max-width: 420px;
    }
}
@media (max-width: 600px) {
    .webinar-hero--replay .webinar-hero__speakers {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem 1.25rem;
    }
    .webinar-replay-hero-aside {
        max-width: none;
    }
}

/* 1. Vimeo facade — full-width below the hero, plus shared styles */
.webinar-replay-video-section {
    background: linear-gradient(180deg, #0a1628 0%, #0f172a 100%);
    padding: 3.5rem 1.5rem 4rem;
}
.webinar-replay-video-section__inner {
    max-width: 1140px;
    margin: 0 auto;
}
.webinar-replay-video-section__caption {
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    margin: 1.5rem 0 0;
}
.webinar-replay-video-section__caption a {
    color: #FFC34D;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 195, 77, 0.5);
}
.webinar-replay-video-section__caption a:hover {
    border-bottom-color: rgba(255, 195, 77, 0.95);
}

.webinar-replay-facade {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.35);
}
.webinar-replay-facade--full {
    border-radius: 16px;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 0 100px -20px rgba(255, 195, 77, 0.22);
}
.webinar-replay-facade--full .webinar-replay-facade__play {
    width: 108px;
    height: 108px;
}
.webinar-replay-facade--full .webinar-replay-facade__play svg {
    width: 46px;
    height: 46px;
}
.webinar-replay-facade__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.webinar-replay-facade__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255, 195, 77, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}
.webinar-replay-facade__play:hover,
.webinar-replay-facade__play:focus {
    transform: translate(-50%, -50%) scale(1.06);
    background: rgba(255, 195, 77, 1);
    outline: 3px solid rgba(255, 255, 255, 0.7);
}
.webinar-replay-facade__play svg {
    width: 36px;
    height: 36px;
    fill: #0f172a;
    margin-left: 4px; /* visual centering of the play triangle */
}
.webinar-replay-facade.is-loaded .webinar-replay-facade__thumb,
.webinar-replay-facade.is-loaded .webinar-replay-facade__play {
    display: none;
}
.webinar-replay-facade iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Hero CTA buttons — both use .v2-btn classes, styled to match dimensions */
.webinar-replay-hero-cta__primary {
    /* inherits .v2-btn .v2-btn--primary (gold + shadow + hover lift) */
    letter-spacing: 0.01em;
}
.webinar-replay-hero-cta__secondary {
    /* inherits .v2-btn .v2-btn--secondary (outline + transparent on dark) */
    font-weight: 500;
    text-wrap: balance;
    color: rgba(255, 255, 255, 0.78);
    border-color: rgba(255, 255, 255, 0.22);
}
.webinar-replay-hero-cta__secondary:hover {
    color: #FFC34D;
    border-color: rgba(255, 195, 77, 0.55);
    background: rgba(255, 195, 77, 0.06);
}

/* 2. Chapters / timestamps */
.webinar-replay-chapters {
    background: #f8fafc;
    padding: 3.5rem 1.5rem 4rem;
}
.webinar-replay-chapters__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 0.875rem;
    max-width: 1080px;
    margin: 1.75rem auto 0;
    padding: 0;
    list-style: none;
}
.webinar-replay-chapters__item {
    margin: 0;
    display: flex;
}
.webinar-replay-chapters__link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 96px;
    padding: 1.05rem 1.15rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #0f172a;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.webinar-replay-chapters__link:hover {
    border-color: #FFA000;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(255, 160, 0, 0.25);
}
.webinar-replay-chapters__time {
    font-variant-numeric: tabular-nums;
    color: #FFA000;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.webinar-replay-chapters__title {
    font-weight: 600;
    line-height: 1.32;
    color: #0f172a;
    font-size: 0.97rem;
    text-wrap: balance;
}

/* 7 chapters in 3-col grid → last row has 1 item; center it */
.webinar-replay-chapters__item:last-child:nth-child(3n+1) {
    grid-column: 2;
}

/* Tablet: 2 cols */
@media (max-width: 900px) {
    .webinar-replay-chapters__list {
        grid-template-columns: repeat(2, 1fr);
    }
    .webinar-replay-chapters__item:last-child:nth-child(3n+1) {
        grid-column: auto;
    }
    .webinar-replay-chapters__item:last-child:nth-child(2n+1) {
        grid-column: 1 / -1;
    }
}
/* Mobile: 1 col */
@media (max-width: 540px) {
    .webinar-replay-chapters__list {
        grid-template-columns: 1fr;
    }
    .webinar-replay-chapters__item:last-child:nth-child(2n+1) {
        grid-column: auto;
    }
}

/* 3. Synthesized body */
.webinar-replay-body {
    background: #ffffff;
    padding: 3.5rem 0;
}
.webinar-replay-body__inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1.75rem;
}
.webinar-replay-body h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-top: 2.25rem;
    margin-bottom: 0.875rem;
    letter-spacing: -0.01em;
}
.webinar-replay-body h2:first-of-type {
    margin-top: 0;
}
.webinar-replay-body p {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #334155;
    margin: 0 0 1.125rem;
}
.webinar-replay-body blockquote {
    margin: 1.25rem 0;
    padding: 0.875rem 1.25rem;
    border-left: 3px solid #FFA000;
    background: #fffbeb;
    color: #1e293b;
    font-style: italic;
    border-radius: 0 6px 6px 0;
}
.webinar-replay-body blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    font-size: 0.85rem;
    color: #64748b;
}
.webinar-replay-body__byline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}
.webinar-replay-body__byline a {
    color: #1e40af;
    text-decoration: none;
    border-bottom: 1px solid rgba(30, 64, 175, 0.3);
}
.webinar-replay-body__byline a:hover {
    border-bottom-color: rgba(30, 64, 175, 0.7);
}

/* 4. FAQ */
.webinar-replay-faq {
    background: #f8fafc;
    padding: 3.5rem 0;
}
.webinar-replay-faq__list {
    max-width: 880px;
    margin: 1.5rem auto 0;
    padding: 0 1.75rem;
}
.webinar-replay-faq details {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.625rem;
    overflow: hidden;
}
.webinar-replay-faq details[open] {
    border-color: #FFA000;
}
.webinar-replay-faq summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #0f172a;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.webinar-replay-faq summary::-webkit-details-marker {
    display: none;
}
.webinar-replay-faq summary::after {
    content: '+';
    font-size: 1.5rem;
    color: #94a3b8;
    transition: transform 0.18s ease;
    flex-shrink: 0;
}
.webinar-replay-faq details[open] summary::after {
    transform: rotate(45deg);
}
.webinar-replay-faq__answer {
    padding: 0 1.25rem 1.25rem;
    color: #334155;
    line-height: 1.65;
}
.webinar-replay-faq__answer p {
    margin: 0 0 0.875rem;
}
.webinar-replay-faq__answer p:last-child {
    margin-bottom: 0;
}

/* 5. Activation block */
.webinar-replay-activation {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 3rem 0;
    position: relative;
}
.webinar-replay-activation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFC34D 0%, #FFA000 100%);
}
.webinar-replay-activation__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}
.webinar-replay-activation h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}
.webinar-replay-activation__lede {
    color: #475569;
    font-size: 1rem;
    margin: 0 auto 1.75rem;
    max-width: 540px;
}
.webinar-replay-activation__steps {
    text-align: left;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0 auto 1.5rem;
    max-width: 540px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    counter-reset: replay-step;
    list-style: none;
    padding-left: 1.5rem;
}
.webinar-replay-activation__steps li {
    counter-increment: replay-step;
    padding-left: 2.25rem;
    position: relative;
    margin-bottom: 0.875rem;
    line-height: 1.55;
    color: #1e293b;
}
.webinar-replay-activation__steps li::before {
    content: counter(replay-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    background: #FFA000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.webinar-replay-activation__steps li:last-child {
    margin-bottom: 0;
}
.webinar-replay-activation__training {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
}
.webinar-replay-activation__training-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #0f172a;
    color: #ffffff;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.18s ease;
}
.webinar-replay-activation__training-btn:hover {
    background: #1e293b;
}

/* 6. Transcript collapsible */
.webinar-replay-transcript {
    background: #ffffff;
    padding: 2.5rem 0;
    border-top: 1px solid #e2e8f0;
}
.webinar-replay-transcript__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.75rem;
}
.webinar-replay-transcript__header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.webinar-replay-transcript__eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #FFA000;
    margin-bottom: 0.5rem;
}
.webinar-replay-transcript__header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}
.webinar-replay-transcript__header p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.webinar-replay-transcript details {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.webinar-replay-transcript details:hover {
    border-color: #FFA000;
    box-shadow: 0 6px 18px -8px rgba(255, 160, 0, 0.25);
}
.webinar-replay-transcript details[open] {
    border-color: #FFA000;
    box-shadow: 0 6px 18px -8px rgba(255, 160, 0, 0.2);
}
.webinar-replay-transcript__summary {
    cursor: pointer;
    list-style: none;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    padding: 1.15rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #0f172a;
    transition: background 0.18s ease;
}
.webinar-replay-transcript__summary:hover {
    background: linear-gradient(180deg, #eef2f7 0%, #e2e8f0 100%);
}
.webinar-replay-transcript__summary::-webkit-details-marker {
    display: none;
}
.webinar-replay-transcript__summary-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.webinar-replay-transcript__summary-label {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
}
.webinar-replay-transcript__summary-hint {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}
.webinar-replay-transcript__chevron {
    color: #FFA000;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.webinar-replay-transcript__details[open] .webinar-replay-transcript__chevron {
    transform: rotate(180deg);
}
.webinar-replay-transcript__details[open] .webinar-replay-transcript__summary-hint::after {
    content: ' (now showing)';
    color: #FFA000;
}
.webinar-replay-transcript__body {
    padding: 1.5rem 1.25rem;
    max-height: 500px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #475569;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* 7. Past-tense announce ribbon override (gold band) */
.webinar-penny-announce--replay .webinar-penny-announce__tag {
    background: rgba(15, 23, 42, 0.85);
}
.webinar-penny-announce--replay .webinar-penny-announce__headline strong {
    font-weight: 700;
}

/* Mobile */
@media (max-width: 768px) {
    .webinar-replay-facade__play {
        width: 64px;
        height: 64px;
    }
    .webinar-replay-facade__play svg {
        width: 28px;
        height: 28px;
    }
    .webinar-replay-body__inner,
    .webinar-replay-faq__list,
    .webinar-replay-activation__inner,
    .webinar-replay-transcript__inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .webinar-replay-body h2 {
        font-size: 1.25rem;
    }
    .webinar-replay-chapters__list {
        grid-template-columns: 1fr;
    }
}

/* Chapter jump link inside .webinar-learn__item cards */
.webinar-learn__chapter-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #FFA000;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}
.webinar-learn__chapter-link:hover {
    text-decoration: underline;
}

/* Cross-links: collapse 4-card grid on mobile */
@media (max-width: 900px) {
    .webinar-deeper .hp-journey-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 600px) {
    .webinar-deeper .hp-journey-grid {
        grid-template-columns: 1fr !important;
    }
}
