:root {
    --prudent-red: #DD221B;
    --border-color: #E5E5E5;
    --text-muted: #666666;
    --radius: 5px;
}
.right-col{
    padding-top: 0px;
}
.display-page-mt { margin-top: 30px; padding-bottom: 60px; }

/* NEWS TICKER */
.news-ticker-bar { background: var(--prudent-red); color: #fff; padding: 10px 0; font-size: 13px; font-weight: 700; }
.ticker-label { background: rgba(0,0,0,0.2); padding: 4px 10px; margin-right: 15px; border-radius: 3px; }

/* IMAGES ROUNDED */
img, .main-video-wrapper, .thumb-wrap, .prog-thumb, .pl-thumb, .reco-thumb {
    border-radius: var(--radius) !important;
}

/* LEFT COLUMN */
.main-video-wrapper {
    width: 927px; height: 483px; background: #000; position: relative; overflow: hidden;
}
.main-img-rounded { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.video-center-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 70px; height: 70px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.video-center-play i { font-size: 24px; color: #111; margin-left: 4px; }

.episode-info-box { padding: 25px 0; }
.ep-date-top { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.ep-main-title { font-size: 28px; font-weight: 700; margin: 10px 0; letter-spacing: -0.5px; }
.ep-meta { font-size: 14px; color: var(--text-muted); }

.share-row-line { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.share-txt { font-weight: 700; font-size: 14px; color: #373737; }
.share-btns-group { display: flex; gap: 10px; }
.s-btn { background: #fff; color: #373737; border: 1px solid #111; border-radius: 50px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.s-btn-label { display: inline; }

.about-episode { margin: 30px 0; }
.about-episode h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.about-episode p { font-size: 16px; line-height: 22px; color: #333; }
.tag-row { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.tag { background: #F2F2F2; padding: 8px 18px; border-radius: 50px; font-size: 13px; color: #555; }

.reco-section { margin-top: 50px; }
.reco-section h3 { font-size: 18px; margin-bottom: 25px; }
.reco-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.reco-thumb { height: 160px; background: #eee; position: relative; margin-bottom: 12px; overflow: hidden; }
.reco-thumb img { width: 100%; height: 100%; object-fit: cover; }
.reco-time { font-size: 12px; color: #999; display: block; margin-bottom: 5px; }
.reco-card h4 { font-size: 16px; margin-bottom: 8px; }
.reco-card p { font-size: 13px; color: #666; line-height: 1.4; }

/* RIGHT COLUMN */
.show-sidebar-card { background: #1E1E1E; color: #fff; border-radius: var(--radius); overflow: hidden; }
.show-intro { padding: 30px; }
.show-intro h2 { font-size: 24px; margin-bottom: 10px; }
.show-intro p { font-size: 14px; color: #F6F6F6; line-height: 100%; margin-bottom: 15px; }
.show-stats { font-size: 14px; color: #7F919B; font-weight: 500; }

.playlist-container { padding: 30px; }
.playlist-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.playlist-head h3 { font-size: 16px; }
.playlist-head span { font-size: 13px; color: #666; }

.pl-item { display: flex; gap: 15px; margin-bottom: 20px; align-items: flex-start; text-decoration: none; color: inherit; }
.pl-num { display: none; } /* Episode numbers removed from All episodes sidebar */
.pl-thumb { width: 160px; height: 96px; background: #333; flex-shrink: 0; position: relative; }
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pl-txt { flex: 1; min-width: 0; }
.pl-txt h4 { font-size: 14px; line-height: 1.3; font-weight: 700; color: #fff; margin-top: 5px; }
.pl-date { font-size: 11px; color: #777; }
a.reco-card { display: block; text-decoration: none; color: inherit; }
a.pl-item:hover .pl-txt h4 { color: #fff; }
.episode-desc { font-size: 16px; line-height: 22px; color: #333; }
.episode-desc p { margin: 0 0 12px; }
.share-toast {
    position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
    background: #111; color: #fff; padding: 12px 20px; border-radius: 8px;
    font-size: 14px; z-index: 10000; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.share-toast.is-visible { opacity: 1; }

.load-more-pl { width: 100%; border: 1px solid #444; background: transparent; color: #fff; padding: 10px; border-radius: 50px; font-weight: 700; cursor: pointer; margin-top: 10px; }

.sidebar-share-box { margin-top: 30px; border: 1px solid var(--border-color); padding: 30px; border-radius: var(--radius); }
.sidebar-share-box h3 { font-size: 16px; margin-bottom: 8px; }
.sidebar-share-box p { font-size: 13px; color: #666; margin-bottom: 20px; }
.side-share-btns { display: flex; flex-direction: column; gap: 10px; }

/* MOBILE / TABLET RESPONSIVE */
@media (max-width: 991px) {
    .main-content-flex { flex-direction: column; }
    .left-col, .right-col { width: 100% !important; }
    .main-video-wrapper { width: 100%; height: auto; aspect-ratio: 16/9; }
    .ep-main-title { font-size: 24px; }
    .share-row-line { justify-content: flex-start; flex-wrap: wrap; }
    .reco-grid { grid-template-columns: 1fr; }
    .reco-thumb { height: 200px; }
}

/* Bottom Nav Styling (Floating) */
.mobile-bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; height: 75px; background: #000;
    border-radius: 30px 30px 0 0; justify-content: space-around; align-items: center; z-index: 9999;
}
@media (max-width: 768px) { .mobile-bottom-nav { display: flex; } body { padding-bottom: 80px; } }

/* --- STRICT FIX FOR PLAYLIST THUMBNAILS --- */

.pl-thumb {
    position: relative !important; /* Critical: keeps overlays inside */
    width: 160px !important;
    height: 96px !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    flex-shrink: 0;
    display: block !important;
    background: #000;
}

.pl-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 5px !important;
}

/* Fix for the timing (52:05) */
.pl-time-badge {
    position: absolute !important;
    bottom: 5px !important;
    right: 5px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 5px !important;
    border-radius: 3px !important;
    z-index: 5 !important;
    line-height: 1 !important;
    margin: 0 !important;
}

/* Fix for the play button circle */
.pl-play-sm {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 28px !important;
    height: 28px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 6 !important;
    margin: 0 !important;
}

/* Fix for the play icon triangle */
.pl-play-sm i {
    color: #000 !important;
    font-size: 10px !important;
    margin-left: 2px !important; /* Nuanced centering for triangle */
    display: block !important;
}

/* --- OVERLAY FIX FOR "YOU MIGHT ALSO LIKE" SECTION --- */
.reco-thumb {
    position: relative !important;
    display: block !important;
    overflow: hidden !important;
}

/* Fix for the playlist/bars icon in the center */
.play-sm {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 44px !important;
    height: 34px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 4px !important; /* Rectangular as per design */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    z-index: 5 !important;
}

/* Creates the three bars look if icon is missing, or styles FontAwesome bars icon */
.play-sm i, .play-sm::before {
    content: "\f0c9" !important; /* FontAwesome Bars Icon */
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    color: #111 !important;
    font-size: 14px !important;
}

/* Fix for the Episode Count badge (e.g. 80+ eps) */
.ep-count {
    position: absolute !important;
    bottom: 8px !important;
    right: 8px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 3px !important;
    z-index: 5 !important;
    display: block !important;
}

/* --- SIDEBAR SHARE BUTTONS (HORIZONTAL LINE FIX) --- */
.side-share-btns {
    display: flex !important;
    flex-direction: row !important; /* Force horizontal row */
    gap: 8px !important; /* As per Figma (10px gap) */
    flex-wrap: nowrap !important; /* Prevent wrapping to new line */
    overflow-x: auto; /* Allows scrolling if container is too small */
    padding-bottom: 5px;
}

.side-share-btns .s-btn {
    width: auto !important; /* Let text determine width */
    height: 37px !important; /* From Figma Layout */
    padding: 10px 20px !important; /* From Figma Layout */
    border-radius: 50px !important; /* From Figma Layout */
   
    color: #373737 !important;
    font-size: 13px !important;
    white-space: nowrap !important; /* Keep text on one line */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
}

.side-share-btns .s-btn i {
    margin-right: 8px !important;
}

/* --- TABLET / NARROW (no content reordering — natural left then right stack) --- */
@media (max-width: 991px) {
    .main-content-flex {
        display: flex !important;
        flex-direction: column !important;
    }

    .left-col,
    .right-col {
        width: 100% !important;
        max-width: 100% !important;
    }

    .show-sidebar-card {
        background: #111 !important;
        margin: 20px 0 !important;
        border-radius: 8px !important;
    }

    .show-intro {
        padding: 20px 15px !important;
    }

    .show-intro h2 {
        font-size: 20px !important;
        margin-bottom: 5px !important;
    }

    .pl-item {
        padding: 10px !important;
        background: #1a1a1a !important;
        border-radius: 6px !important;
        margin-bottom: 10px !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 12px !important;
    }

    .pl-num {
        display: none !important;
    }

    .pl-thumb {
        width: 120px !important;
        height: 70px !important;
    }

    .pl-txt h4 {
        font-size: 13px !important;
        line-height: 1.4 !important;
        white-space: normal !important;
    }

    .sidebar-share-box {
        margin-top: 20px !important;
        padding: 20px 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

/* Mobile ONLY: reorder + About/share responsiveness + icon-only share buttons */
@media (max-width: 768px) {
    /*
     * Root cause of sidebar-at-top bug:
     * bulletins.css sets `.bulletin-page-body .right-col { display: block !important; }`
     * which beat a weaker `display: contents` and left right-col at order:0
     * (above video at order:1). Use equal/higher specificity here.
     *
     * Desired order:
     * Video → Title/Date → Main Share → About → All episodes → Share card → Remaining
     */
    .bulletin-page-body .main-content-flex {
        display: flex !important;
        flex-direction: column !important;
    }

    .bulletin-page-body .left-col,
    .bulletin-page-body .right-col {
        display: contents !important;
    }

    .bulletin-page-body .main-video-wrapper { order: 1 !important; }
    .bulletin-page-body .episode-info-box  { order: 2 !important; }
    .bulletin-page-body .share-row-line    { order: 3 !important; }
    .bulletin-page-body .about-episode     { order: 4 !important; }
    .bulletin-page-body .show-sidebar-card {
        order: 5 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .bulletin-page-body .sidebar-share-box { order: 6 !important; }
    .bulletin-page-body .reco-section      { order: 7 !important; }

    /* --- About this episode --- */
    .about-episode {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 24px 0 !important;
        padding: 0 4px;
        box-sizing: border-box;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .about-episode h3 {
        font-size: 15px !important;
        line-height: 1.35 !important;
        margin-bottom: 10px !important;
    }

    .about-episode p,
    .about-episode .episode-desc,
    .about-episode .episode-desc p,
    .episode-desc,
    .episode-desc p,
    .episode-desc * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        font-size: 15px !important;
        line-height: 1.55 !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        white-space: normal !important;
        box-sizing: border-box;
    }

    .about-episode img,
    .about-episode iframe,
    .about-episode video,
    .about-episode embed,
    .episode-desc img,
    .episode-desc iframe,
    .episode-desc video,
    .episode-desc embed {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .about-episode .tag-row {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .about-episode .tag {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
        white-space: normal;
    }

    /* --- Main share row --- */
    .share-row-line {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
        gap: 14px;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .share-txt {
        width: 100%;
        text-align: center;
    }

    .share-btns-group {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .share-btns-group .s-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        gap: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 40px !important;
        box-sizing: border-box;
        white-space: normal !important;
        font-size: 0 !important;
    }

    .share-btns-group .s-btn .s-btn-label {
        display: none !important;
    }

    .share-btns-group .s-btn i {
        font-size: 16px !important;
        margin: 0 !important;
        line-height: 1 !important;
    }

    /* --- Share programme card --- */
    .sidebar-share-box {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-top: 20px !important;
        padding: 16px !important;
        box-sizing: border-box;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .sidebar-share-box h3 {
        font-size: 15px !important;
        line-height: 1.35 !important;
        margin-bottom: 8px !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        white-space: normal !important;
        max-width: 100%;
    }

    .sidebar-share-box p {
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin-bottom: 16px !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        white-space: normal !important;
        max-width: 100%;
    }

    /* Override desktop horizontal nowrap share buttons */
    .side-share-btns {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        overflow-x: visible !important;
        padding-bottom: 0 !important;
        box-sizing: border-box;
    }

    .side-share-btns .s-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        padding: 0 !important;
        gap: 0 !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 40px !important;
        white-space: normal !important;
        font-size: 0 !important;
        box-sizing: border-box;
    }

    .side-share-btns .s-btn .s-btn-label {
        display: none !important;
    }

    .side-share-btns .s-btn i {
        font-size: 16px !important;
        margin: 0 !important;
        margin-right: 0 !important;
        line-height: 1 !important;
    }
}

/* Extra tweak for very small screens (iPhone SE / small Android) */
@media (max-width: 480px) {
    .pl-item {
        flex-direction: row !important;
    }
    .pl-thumb {
        width: 100px !important;
        height: 60px !important;
    }
    .pl-txt h4 {
        font-size: 12px !important;
    }
}