/* Compass Sermon Transcripts — transcript section on message pages.
   Uses the site's design tokens when present (child theme site.css). */

.cbctx-transcript {
    position: relative;
    max-width: 920px;
    margin: 36px auto 8px;
    padding: clamp(22px, 3vw, 36px);
    border: 1px solid var(--cbc-line, #e2e7ec);
    border-radius: var(--cbc-radius, 16px);
    background: #fff;
    box-shadow: 0 1px 2px rgba(14, 34, 51, 0.05);
    text-align: left;
    /* Series Engine sets line-height: 0 on its container */
    line-height: 1.5;
}

.cbctx-transcript__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cbc-line, #e2e7ec);
}

html body #seriesengine .cbctx-transcript__title,
.cbctx-transcript__title {
    margin: 0 0 4px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
    text-transform: none !important;
    color: var(--cbc-ink, #101820) !important;
}

html body #seriesengine .cbctx-transcript__note,
.cbctx-transcript__note {
    margin: 0 !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    color: var(--cbc-muted, #5d6a77) !important;
}

.cbctx-transcript__body {
    position: relative;
}

html body #seriesengine .cbctx-transcript__body p,
.cbctx-transcript__body p {
    margin: 0 0 18px !important;
    font-family: var(--cbc-serif, Georgia, serif);
    font-size: 17.5px !important;
    line-height: 1.8 !important;
    color: var(--cbc-body, #3a4550) !important;
    text-align: left !important;
}

.cbctx-transcript__time {
    display: inline-block;
    margin-right: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--cbc-accent-soft, #e8f1f8);
    font-family: var(--wpex-body-font-family, system-ui, sans-serif);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
    vertical-align: 2px;
    color: var(--cbc-accent, #1468a2);
}

/* Collapsed preview (added by JS) */
.cbctx-transcript.is-collapsed .cbctx-transcript__body {
    max-height: 340px;
    overflow: hidden;
}

.cbctx-transcript.is-collapsed .cbctx-transcript__body::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 140px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 85%);
    pointer-events: none;
}

.cbctx-transcript__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin: 8px auto 0;
    padding: 0 26px;
    border: 2px solid var(--cbc-line, #e2e7ec);
    border-radius: 999px;
    background: #fff;
    color: var(--cbc-ink, #101820);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.cbctx-transcript__toggle:hover {
    border-color: var(--cbc-accent, #1468a2);
    background: var(--cbc-accent-soft, #e8f1f8);
    color: var(--cbc-ink, #101820);
}

.cbctx-transcript__toggle[hidden] {
    display: none;
}

/* Series Engine title promoted to the page H1 (when the theme doesn't provide one) */
#seriesengine h1.enmse-modern-message-title {
    margin: 0 0 16px;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.2;
}

@media (max-width: 600px) {
    html body #seriesengine .cbctx-transcript__body p,
    .cbctx-transcript__body p {
        font-size: 16.5px !important;
    }
}

@media print {
    .cbctx-transcript.is-collapsed .cbctx-transcript__body {
        max-height: none;
        overflow: visible;
    }

    .cbctx-transcript__toggle,
    .cbctx-transcript.is-collapsed .cbctx-transcript__body::after {
        display: none;
    }
}
