/* Integrated podcast and PDF experiences.
 * Kept separate from crc.css so media can evolve without changing shared cards.
 */
.crc-media-card,
.crc-pdf-reader {
    margin: 22px 0 26px;
    overflow: hidden;
    border: 1px solid rgba(15, 27, 58, 0.14);
    border-top: 4px solid var(--crc-gold, #d4af37);
    border-radius: 14px;
    background: var(--crc-white, #fff);
    box-shadow: 0 12px 32px rgba(15, 27, 58, 0.09);
}

.crc-media-card {
    padding: 22px;
}

.crc-media-card__heading,
.crc-pdf-reader__header {
    display: flex;
    align-items: center;
    gap: 13px;
}

.crc-pdf-reader__header {
    justify-content: space-between;
    padding: 18px 20px;
}

.crc-media-card__heading h2,
.crc-pdf-reader__header h2 {
    margin: 1px 0 0;
    color: var(--crc-navy, #0f1b3a);
    font-size: 1.25rem;
    line-height: 1.2;
}

.crc-media-card__eyebrow {
    margin: 0;
    color: var(--crc-text-light, #56647a);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.crc-media-card__icon {
    position: relative;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.18);
}

.crc-media-card__icon--audio::before {
    content: '';
    position: absolute;
    top: 11px;
    left: 13px;
    width: 6px;
    height: 18px;
    border: 3px solid var(--crc-navy, #0f1b3a);
    border-right: 0;
    border-radius: 8px 0 0 8px;
}

.crc-media-card__icon--audio::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 10px;
    width: 10px;
    height: 10px;
    border-top: 3px solid var(--crc-navy, #0f1b3a);
    border-right: 3px solid var(--crc-navy, #0f1b3a);
    transform: rotate(45deg);
}

.crc-media-card__icon--document::before {
    content: '';
    position: absolute;
    inset: 9px 11px;
    border: 2px solid var(--crc-navy, #0f1b3a);
    border-radius: 2px;
    background: #fff;
}

.crc-media-card__icon--document::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 16px;
    width: 10px;
    height: 2px;
    background: var(--crc-gold, #d4af37);
    box-shadow: 0 5px 0 var(--crc-gold, #d4af37), 0 10px 0 var(--crc-gold, #d4af37);
}

.crc-media-launch {
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #b89000;
    border-radius: 9px;
    background: var(--crc-gold, #d4af37);
    color: var(--crc-navy, #0f1b3a);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 4px 10px rgba(184, 144, 0, 0.18);
}

.crc-media-launch:hover,
.crc-media-launch:focus-visible {
    background: #f1c400;
    outline: 3px solid rgba(212, 175, 55, 0.3);
    outline-offset: 2px;
}

.crc-media-consent {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 27, 58, 0.12);
    border-radius: 10px;
    background: #f7f8fb;
    color: var(--crc-text-light, #56647a);
    line-height: 1.5;
}

.crc-media-consent p,
.crc-media-card__note {
    margin: 0;
}

.crc-media-card__note {
    padding-top: 9px;
    color: var(--crc-text-light, #56647a);
    font-size: 0.82rem;
    line-height: 1.45;
}

.crc-podcast-audio {
    display: block;
    width: 100%;
    height: 54px;
    margin-top: 18px;
    color-scheme: light;
}

.crc-podcast-embed {
    margin-top: 14px;
}

.crc-podcast-embed:empty {
    display: none;
}

.crc-podcast-embed .crc-resource-media__podcast-frame {
    display: block;
    width: 100%;
    min-height: 175px;
    border: 0;
    border-radius: 10px;
    background: #f7f8fb;
}

.crc-media-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 27, 58, 0.11);
    color: var(--crc-text-light, #56647a);
    font-size: 0.85rem;
    line-height: 1.45;
}

.crc-media-card__footer p {
    margin: 0;
}

.crc-media-source-link {
    flex: 0 0 auto;
    color: var(--crc-navy, #0f1b3a);
    font-weight: 800;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.crc-pdf-reader__viewer[hidden],
.crc-media-launch[hidden],
.crc-pdf-reader__status[hidden] {
    display: none !important;
}

.crc-pdf-reader__viewer {
    border-top: 1px solid rgba(15, 27, 58, 0.12);
}

.crc-pdf-reader__toolbar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(15, 27, 58, 0.16);
    background: #f7f8fb;
}

.crc-pdf-reader__page-controls,
.crc-pdf-reader__zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.crc-pdf-reader__toolbar button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #c8ced8;
    border-radius: 8px;
    background: #fff;
    color: var(--crc-navy, #0f1b3a);
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
}

.crc-pdf-reader__toolbar button:hover:not(:disabled),
.crc-pdf-reader__toolbar button:focus-visible {
    border-color: var(--crc-gold, #d4af37);
    outline: 3px solid rgba(212, 175, 55, 0.25);
    outline-offset: 1px;
}

.crc-pdf-reader__toolbar button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.crc-pdf-reader__toolbar span {
    min-width: 74px;
    color: var(--crc-navy, #0f1b3a);
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.crc-pdf-reader__viewport {
    position: relative;
    max-height: 78vh;
    min-height: 360px;
    overflow: auto;
    padding: 18px;
    background:
        linear-gradient(45deg, rgba(15, 27, 58, 0.025) 25%, transparent 25%) 0 0 / 18px 18px,
        linear-gradient(-45deg, rgba(15, 27, 58, 0.025) 25%, transparent 25%) 0 9px / 18px 18px,
        #e7eaf0;
    text-align: center;
    overscroll-behavior: contain;
}

.crc-pdf-reader__viewport:focus-visible {
    outline: 3px solid var(--crc-gold, #d4af37);
    outline-offset: -3px;
}

.crc-pdf-reader__page-shell {
    display: inline-block;
    min-width: 1px;
    max-width: none;
    vertical-align: top;
    background: #fff;
    box-shadow: 0 8px 26px rgba(15, 27, 58, 0.22);
}

.crc-pdf-reader canvas {
    display: block;
    max-width: none;
    background: #fff;
}

.crc-pdf-reader__status {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(80%, 420px);
    margin: 0;
    padding: 14px 18px;
    border: 1px solid rgba(15, 27, 58, 0.13);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--crc-navy, #0f1b3a);
    font-weight: 700;
    line-height: 1.45;
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 22px rgba(15, 27, 58, 0.13);
}

.crc-pdf-reader__status--error {
    color: #7a1f1f;
}

.crc-pdf-reader > .crc-media-consent {
    margin: 0 20px;
}

.crc-pdf-reader > .crc-media-card__footer {
    justify-content: flex-end;
    margin: 0;
    padding: 14px 20px 16px;
}

@media screen and (max-width: 600px) {
    .crc-media-card,
    .crc-pdf-reader {
        margin: 18px 0 22px;
        border-radius: 12px;
    }

    .crc-media-card {
        padding: 17px;
    }

    .crc-pdf-reader__header {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .crc-pdf-reader__header .crc-media-launch {
        width: 100%;
    }

    .crc-media-card__footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .crc-pdf-reader__toolbar {
        padding: 8px;
    }

    .crc-pdf-reader__toolbar button {
        width: 42px;
        height: 42px;
    }

    .crc-pdf-reader__toolbar span {
        min-width: 64px;
        font-size: 0.76rem;
    }

    .crc-pdf-reader__viewport {
        min-height: 320px;
        max-height: 72vh;
        padding: 10px;
    }

    .crc-pdf-reader > .crc-media-consent {
        margin: 0 16px;
    }

    .crc-pdf-reader > .crc-media-card__footer {
        padding: 13px 16px 16px;
    }
}
