/**
 * description: Styling sheet for the wbmu_media shortcode ent-v2 skin
 * author: WorkerBee.TV
 * date created: October 8, 2021
 * @package Enterprise
 */

.jwplayer.jw-flag-audio-player {
    height: 44px !important;
    width: 100% !important;
}

/** download transcript */
.wbmu-media-transcript {
    position: relative;
    display: inline-block;
    margin-right: 34px;
}
.wbmu-media-transcript i.fas.fa-file-alt {
  font-size: 24px;
  position: absolute;
  top: -5px;
  left: 0;
}
.wbmu-media-transcript > a {
    font-size: 14px;
    font-weight: 600;
    top: -3px;
    position: relative;
    padding-left: 30px;
}

/* Interactive transcript */
.player-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}


.sidebar {
	background-color: #475470;
	font-family: Arial, sans-serif;
	height: 360px;
	display: flex;
	flex-flow: column nowrap;
	margin: 30px 0;
	overflow: hidden;
	width: 360px;
	margin: 30px 0;
}

@media screen and (max-width: 1080px) {
	.sidebar {
		margin-bottom: 20px;
		width: 640px;
	}
}

.sidebar h3 {
	color: #fff;
	font-size: 14px;
	margin: 0;
	padding: 20px;
	text-align: left;
}

.searchbox {
	display: block;
	margin: 10px 20px;
	position: relative;
}

.searchbox input {
	background: #fff url("/wp-content/plugins/wb-media-uploader/assets/images/search.png") no-repeat top left;
	border-radius: 3px;
	border: none;
	color: #000;
	font-size: 16px;
	line-height: 20px;
	padding: 5px 20px 5px 30px;
	width: 100%;
}

.searchbox .match {
	color: #000;
	font-size: 14px;
	line-height: 20px;
	position: absolute;
	right: 10px;
	top: 5px;
}

.transcript {
	padding: 0 20px;
	overflow: auto;
	flex: 1 1 auto;
}

.transcript p {
	font-size: 15px;
	overflow: hidden;
	text-align: left;
	color: #fff;
	line-height: 20px;
}

.transcript p:empty {
	display: none;
}

.transcript span {
	display: inline;
	padding: 4px 2px;
	line-height: 24px;
	cursor: pointer;
	color: #fff;
}

.transcript span.current {
	background: #00f096;
	color: #000;
}

.transcript span:hover {
	color: #00f096;
}

.transcript span.current:hover {
	color: #000;
}

.transcript span em {
	background: #666;
	color: #fff;
	font-style: normal;
}

.transcript span em.current {
	background: #ff0046;
}

.transcript h4 {
	margin: 25px 0 15px;
	text-align: left;
	color: #fff;
	font-weight: bold;
}

.caption-copy {
	max-width: 640px;
	margin: 20px auto;
	text-align: left;
	padding: 10px;
}

.caption-copy div,
.caption-copy ol,
.caption-copy li {
	text-align: left;
	font-size: 20px;
}

.caption-copy div {
	font-weight: 400;
	margin: 15px 0;
}

.caption-copy ol {
	margin-left: 15px;
	margin-top: 20px;
}

.caption-copy li {
	margin-bottom: 10px;
	font-size: 13px;
	font-weight: 600;
}

/* Enteprise Styling */
.wb-ent-media-player-container.enabled-interactive-transcript .jwplayer {
	width: 70% !important;
	flex-grow: 0;
}

.wb-ent-media-player-container.enabled-interactive-transcript.wb-ent-audio-content .jwplayer {
	width: 100% !important;
}

.wb-ent-media-player-container.wb-ent-audio-content.enabled-interactive-transcript .wb-ent-media-player-sidebar {
	width: 100% !important;
	margin-top: 1rem !important;
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar {
	background: #FCFCFC;
	border: 1px solid #7A858F;
	border-radius: 4px;
	width: 28.3% !important;
	margin: 0 !important;
	resize: vertical;
	height: 422px;
}

@media screen and (min-width: 1178px) {
	.wb-ent-media-player-container .wb-ent-media-player-sidebar {
		height: 534.86px;
	}
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar .searchbox input {
	background: #fff url("/wp-content/plugins/wb-media-uploader/assets/images/search.png") no-repeat 95%;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	height: 50px;
	margin-top: 0.6rem;
    padding: 5px 42px 5px 15px;
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar .searchbox .match {
	display: none;
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar .transcript {
	margin: 0 20px 24px 20px;
    padding: 0;
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar .transcript::-webkit-scrollbar {
    width: 8px;
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar .transcript::-webkit-scrollbar-track {
    box-shadow: inset 0 0 10px #E7E7E7;
    border-radius: 4px;
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar .transcript::-webkit-scrollbar-thumb {
    background: #9C9C9C;
    border-radius: 4px;
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar .transcript span {
    color: #000;
	font-size: 14px;
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar .transcript span.current,
.wb-ent-media-player-container .wb-ent-media-player-sidebar .transcript span.current:hover {
    background: #34393F;
    color: #fff;
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar .transcript span:hover {
	color: #7A858F;
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar .transcript span em.current {
    background: #34393F;
}

/* Switch Button  */
.wb-interactive-transcript-label {
	color: #065F5D;
	font-style: normal;
	font-weight: normal;
	font-size: 14px;
	margin-right: 1.2rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 64px;
    height: 32px;
    margin-bottom: 4px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

input:checked + .slider {
    background-color: #065F5D;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 8px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

label[for=wb-ent-toggle-interactive-transcript-btn] {
    font-weight: bold;
    position: relative;
    top: 3px;
}

label[for=wb-ent-toggle-interactive-transcript-btn].off {
	color: #B4B4B4;
}

@media (max-width: 1177px) {
	.wb-ent-media-player-container.enabled-interactive-transcript .jwplayer,
	.wb-ent-media-player-container.wb-ent-audio-content.enabled-interactive-transcript .jwplayer {
		width: 100% !important;
	}

	.wb-ent-media-player-container .wb-ent-media-player-sidebar {
		width: 100% !important;
		margin-top: 1rem !important;
	}
}

.contain-resources-transcript {
	display: flex;
	flex: 1 auto;
	flex-wrap: wrap;
	justify-content: space-between !important; 
}
	.contain-resources {
		width: 50%;
	}

	.contain-transcript {
		align-self: flex-end;
		align-items: flex-end;
	}

/* Removes dark overlay on JW video player */
.jw-controls,
.jw-controls-backdrop {
	background: rgba(0, 0, 0, 0) !important;
}

/* Preview Player Style */
/* Hide slider */
.jwplayer.jw-skin-wb-preview-player .jw-controlbar .jw-slider-time {
	display: none;
}
/* Hide rewind button */
.jwplayer.jw-skin-wb-preview-player .jw-controlbar .jw-button-container .jw-icon-rewind {
	display: none;
}
/* Hide time */
.jwplayer.jw-skin-wb-preview-player .jw-controlbar .jw-button-container .jw-text-elapsed,
.jwplayer.jw-skin-wb-preview-player .jw-controlbar .jw-button-container .jw-text-countdown,
.jwplayer.jw-skin-wb-preview-player .jw-controlbar .jw-button-container .jw-text-duration {
	display: none;
}
/* Hide settings */
.jwplayer.jw-skin-wb-preview-player .jw-controlbar .jw-button-container .jw-icon-settings {
	display: none;
}
/* Hide fullscreen */
.jwplayer.jw-skin-wb-preview-player .jw-controlbar .jw-button-container .jw-icon-fullscreen {
	display: none;
}

.wb-ent-media-player-container .wb-ent-media-player-sidebar .transcript span.disabled {
	color: #8c949c;
    cursor: not-allowed;
}

.wb-lazy-placeholder {
	width: 100%;
	bottom: 0;
	background-color: rgba(255,255,255,0.7);
	z-index: 9999;
}

@-webkit-keyframes spin {
	from { -webkit-transform:rotate(0deg); }
	to { -webkit-transform:rotate(360deg); }
}

@keyframes spin {
	from { transform:rotate(0deg); }
	to { transform:rotate(360deg); }
}

.wb-lazy-placeholder::after {
	content: '';
	display: block;
	width: 55px;
	height: 55px;
	border-style: solid;
	border-color: black;
	border-top-color: transparent;
	border-width: 4px;
	border-radius: 50%;
	-webkit-animation: spin .8s linear infinite;
	animation: spin .8s linear infinite;
}

/* ==========================================================================
   Audio player card

   Custom control surface for audio media.
   JW Player remains the playback engine but runs with controls:false;
   ========================================================================== */

.wb-audio-player-card {
    /* Defaults */
    --wb-audio-player-accent: #065F5D;
    --wb-audio-player-on-accent: #FFFFFF;
    --wb-audio-player-surface: #FCFCFC;
    --wb-audio-player-border: #e2e6ef;
    --wb-audio-player-text: #34393F;
    --wb-audio-player-muted: #5A646E;
    --wb-audio-player-track: #e2e6ef;
    --wb-audio-player-radius: 16px;
    /* Drives the thumb size, the seek track height and the progress-fill calc -
       keep them as one value so the handle and bar stay the same height. */
    --wb-audio-player-thumb: 12px;
    /* Square artwork, and effectively the card's height - see the artwork rule.
       Sized to just clear the body's natural height so it fills the card. */
    --wb-audio-player-artwork-size: 148px;
    --wb-audio-player-pad: 16px;

    display: flex;
    align-items: stretch;
    /* No gap or padding here - the artwork sits flush against the edges and the
       body carries its own padding. overflow clips the artwork to the radius. */
    gap: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    background: var(--wb-audio-player-surface);
    border: 1px solid var(--wb-audio-player-border);
    border-radius: var(--wb-audio-player-radius);
    color: var(--wb-audio-player-text);
}

/* The JW container stays in the layout so JW can measure it, but is removed visually.
   display:none would leave JW in a broken sizing state. */
.wb-audio-player-card .jwplayer,
.wb-audio-player-card .jwplayer.jw-flag-audio-player {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    overflow: hidden;
    clip-path: inset(50%);
    pointer-events: none;
}

/* Artwork: fixed width, stretched so it stays flush with the card's top and
   bottom however tall the body gets (a feed adds a show-title line). min-height
   keeps the square as the floor; the img's object-fit absorbs the rest. */
.wb-audio-player-artwork {
    flex: 0 0 var(--wb-audio-player-artwork-size);
    width: var(--wb-audio-player-artwork-size);
    min-height: var(--wb-audio-player-artwork-size);
    align-self: stretch;
    position: relative;
    overflow: hidden;
    background: var(--wb-audio-player-track);
}

/* Absolute fill so the image covers the square box whatever its aspect ratio. */
.wb-audio-player-artwork img {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* min-width:0 lets long titles shrink and ellipsize instead of forcing the controls out of the card. */
.wb-audio-player-body {
    flex: 1 1 auto;
    min-width: 0;
    padding: var(--wb-audio-player-pad);
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "meta     meta     meta"
        "progress progress progress"
        "controls volume   rate";
    align-items: center;
    row-gap: 10px;
    column-gap: 16px;
}

.wb-audio-player-meta {
    grid-area: meta;
    min-width: 0;
}

.wb-audio-player-meta:empty {
    display: none;
}

.wb-audio-player-show-title,
.wb-audio-player-episode-title {
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wb-audio-player-show-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--wb-audio-player-text);
}

.wb-audio-player-episode-title {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.35;
    color: var(--wb-audio-player-muted);
}

/* With no parent feed, the single line carries the emphasis. */
.wb-audio-player-card-single-line .wb-audio-player-episode-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--wb-audio-player-text);
}

.wb-audio-player-progress {
    grid-area: progress;
    min-width: 0;
}

.wb-audio-player-time {
    margin: 4px 0 0;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: var(--wb-audio-player-muted);
}

.wb-audio-player-time-divider {
    margin: 0 4px;
}

.wb-audio-player-seek,
.wb-audio-player-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 6px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: var(--wb-audio-player-track);
    cursor: pointer;
}

/*
 * Progress fill.
 *
 * JS sets --wb-audio-player-progress-ratio as a unitless 0-1 value. The stop is
 * NOT a plain percentage of the track: a range thumb travels only across
 * (width - thumb), inset by half a thumb at each end, so a raw percentage drifts
 * from the handle by thumb * (ratio - 0.5) - visibly lagging early on and
 * overshooting near the end. Mirroring the thumb's real travel keeps them locked.
 */
.wb-audio-player-seek {
    /* Same height as the thumb, so the handle reads as a dot sitting inside the
       bar rather than straddling it. The volume slider sets its own, thinner
       track further down. */
    height: var(--wb-audio-player-thumb);

    --wb-audio-player-fill: calc(
        var(--wb-audio-player-progress-ratio, 0) * (100% - var(--wb-audio-player-thumb))
        + (var(--wb-audio-player-thumb) / 2)
    );

    background: linear-gradient(
        to right,
        var(--wb-audio-player-accent) 0 var(--wb-audio-player-fill),
        var(--wb-audio-player-track) var(--wb-audio-player-fill) 100%
    );
}

/* Sized from the same custom property the fill calc uses, so they cannot drift. */
.wb-audio-player-seek::-webkit-slider-thumb,
.wb-audio-player-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: var(--wb-audio-player-thumb);
    height: var(--wb-audio-player-thumb);
    border: 0;
    border-radius: 50%;
    background: var(--wb-audio-player-accent);
    cursor: pointer;
}

.wb-audio-player-seek::-moz-range-thumb,
.wb-audio-player-volume-slider::-moz-range-thumb {
    width: var(--wb-audio-player-thumb);
    height: var(--wb-audio-player-thumb);
    border: 0;
    border-radius: 50%;
    background: var(--wb-audio-player-accent);
    cursor: pointer;
}

.wb-audio-player-seek::-moz-range-track,
.wb-audio-player-volume-slider::-moz-range-track {
    background: transparent;
    border: 0;
}

.wb-audio-player-controls {
    grid-area: controls;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wb-audio-player-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--wb-audio-player-accent);
    cursor: pointer;
}

/* Hover / focus state layer: an overlay of the button's own foreground colour */
.wb-audio-player-btn::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: inherit;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.wb-audio-player-btn:hover::after {
    opacity: 0.1;
}

.wb-audio-player-btn:focus {
    outline: 2px solid var(--wb-audio-player-accent);
    outline-offset: 2px;
}

.wb-audio-player-btn:focus:not(:focus-visible) {
    outline: none;
}

.wb-audio-player-btn:focus-visible {
    outline: 2px solid var(--wb-audio-player-accent);
    outline-offset: 2px;
}

.wb-audio-player-btn:focus-visible::after {
    opacity: 0.14;
}

/*
 * Control sizing hierarchy: play/pause is the largest and the only filled
 * circle, the skip buttons sit just under it, and the rate pill is smallest.
 */
.wb-audio-player-toggle {
    width: 40px;
    height: 40px;
    background: var(--wb-audio-player-accent);
    color: var(--wb-audio-player-on-accent);
    transition: transform 0.15s ease;
}

/*
 * Smaller box than play/pause, but the glyph nearly fills it.
 *
 * Button backgrounds are transparent, so the spacing the eye measures is
 * icon-to-icon, not box-to-box: a small glyph in a large box reads as padding
 * and leaves the skip buttons looking marooned either side of play.
 */
.wb-audio-player-skip {
    width: 34px;
    height: 34px;
}

.wb-audio-player-skip svg {
    width: 32px;
    height: 32px;
}

/* The play button also lifts - the card's primary control, and the one bit of
   movement in it. */
.wb-audio-player-toggle:hover,
.wb-audio-player-toggle:focus-visible {
    transform: scale(1.04);
}

/* Icon swap driven by a class on the card, so no icon re-injection. */
.wb-audio-player-icon-pause,
.wb-audio-player-playing .wb-audio-player-icon-play {
    display: none;
}

.wb-audio-player-playing .wb-audio-player-icon-pause {
    display: block;
}

.wb-audio-player-icon-muted,
.wb-audio-player-muted .wb-audio-player-icon-volume {
    display: none;
}

.wb-audio-player-muted .wb-audio-player-icon-muted {
    display: block;
}

/* The seconds count sits inside the circular skip arrow. */
.wb-audio-player-skip-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.wb-audio-player-volume {
    grid-area: volume;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
    min-width: 0;
}

/* Deliberately thinner than the seek bar, so it reads as a secondary control.
   Its handle stays larger than the track - unlike the seek bar there is no fill
   to align to, so the sizes do not need to match. */
.wb-audio-player-volume-slider {
    width: 88px;
    flex: 0 0 88px;
    height: 4px;
}

.wb-audio-player-rate {
    grid-area: rate;
    justify-self: end;
    width: 32px;
    height: 32px;
    border: 1px solid var(--wb-audio-player-accent);
    font-size: 0.6875rem;
    font-weight: 700;
}

/* --- Responsive --- */

/* The volume slider goes below lg but the mute button stays */
@media (max-width: 991.98px) {
    .wb-audio-player-volume-slider {
        display: none;
    }
}

/*
 * Compact layout.
 *
 * Two triggers, deliberately kept as parallel selector lists: small viewports,
 * and the .wb-audio-player-card-compact modifier for narrow containers at wide
 * viewports (embed previews, LMS chapter columns) where media queries never
 * fire. A media query cannot be folded into a selector list, so each rule names
 * both - keep the two halves in step when editing.
 */
@media (max-width: 767.98px) {
    .wb-audio-player-card {
        /* Matches the body height below, so the square fills the card. */
        --wb-audio-player-artwork-size: 136px;
        --wb-audio-player-pad: 12px;
        --wb-audio-player-thumb: 10px;
    }

    .wb-audio-player-body {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .wb-audio-player-meta,
    .wb-audio-player-progress {
        flex: 1 1 100%;
        min-width: 0;
    }

    .wb-audio-player-controls {
        flex: 0 0 auto;
        gap: 4px;
    }

    /* Mute sits at the right-hand end of the transport row; the slider stays
       hidden from the 991.98px rule above. */
    .wb-audio-player-volume {
        flex: 0 0 auto;
        margin-left: auto;
    }

    /*
     * Control sizes, all a step down from desktop.
     */
    .wb-audio-player-btn {
        width: 32px;
        height: 32px;
    }

    .wb-audio-player-toggle {
        width: 36px;
        height: 36px;
    }

    /* Keeps the tight glyph-to-box ratio from the desktop rule: 28 in 30, plus
       the 4px gap above, leaves ~6px of visual air either side of play. */
    .wb-audio-player-skip {
        width: 30px;
        height: 30px;
    }

    .wb-audio-player-skip svg {
        width: 28px;
        height: 28px;
    }

    .wb-audio-player-rate {
        flex: 0 0 auto;
        width: 28px;
        height: 28px;
        font-size: 0.625rem;
    }
}

.wb-audio-player-card-compact {
    --wb-audio-player-artwork-size: 136px;
    --wb-audio-player-pad: 12px;
    --wb-audio-player-thumb: 10px;
}

.wb-audio-player-card-compact .wb-audio-player-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.wb-audio-player-card-compact .wb-audio-player-meta,
.wb-audio-player-card-compact .wb-audio-player-progress {
    flex: 1 1 100%;
    min-width: 0;
}

.wb-audio-player-card-compact .wb-audio-player-controls {
    flex: 0 0 auto;
    gap: 4px;
}

.wb-audio-player-card-compact .wb-audio-player-volume {
    flex: 0 0 auto;
    margin-left: auto;
}

.wb-audio-player-card-compact .wb-audio-player-volume-slider {
    display: none;
}

/* Mirrors the control sizing in the mobile block above - keep the two in step. */
.wb-audio-player-card-compact .wb-audio-player-btn {
    width: 32px;
    height: 32px;
}

.wb-audio-player-card-compact .wb-audio-player-toggle {
    width: 36px;
    height: 36px;
}

.wb-audio-player-card-compact .wb-audio-player-skip {
    width: 30px;
    height: 30px;
}

.wb-audio-player-card-compact .wb-audio-player-skip svg {
    width: 28px;
    height: 28px;
}

.wb-audio-player-card-compact .wb-audio-player-rate {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    font-size: 0.625rem;
}

/*
 * Small phones. Control sizes are already minimal from the block above; the only
 * thing that has to give here is the mute button.
 */
@media (max-width: 359.98px) {
    .wb-audio-player-card {
        /* Still clears the body height, so the square stays flush. */
        --wb-audio-player-artwork-size: 128px;
        --wb-audio-player-pad: 10px;
    }

    .wb-audio-player-volume {
        display: none;
    }
}

/* Audio stacks above the transcript sidebar. */
.wb-ent-media-player-container.wb-ent-audio-content .wb-audio-player-card {
    width: 100%;
}

/* linear-gradient backgrounds are stripped in forced-colors mode,
   so the progress fill and thumbs need system colours to stay visible. */
@media (forced-colors: active) {
    .wb-audio-player-card {
        border: 1px solid CanvasText;
    }

    .wb-audio-player-seek,
    .wb-audio-player-volume-slider {
        background: Canvas;
        border: 1px solid CanvasText;
    }

    .wb-audio-player-seek::-webkit-slider-thumb,
    .wb-audio-player-volume-slider::-webkit-slider-thumb {
        background: ButtonText;
    }

    .wb-audio-player-seek::-moz-range-thumb,
    .wb-audio-player-volume-slider::-moz-range-thumb {
        background: ButtonText;
    }

    .wb-audio-player-toggle {
        background: ButtonFace;
        color: ButtonText;
        border: 1px solid ButtonText;
    }

    /* The focus outline carries the state instead. */
    .wb-audio-player-btn::after {
        display: none;
    }
}

/* The state layer still shows hover; only the movement goes. */
@media (prefers-reduced-motion: reduce) {
    .wb-audio-player-btn::after,
    .wb-audio-player-toggle {
        transition: none;
    }

    .wb-audio-player-toggle:hover,
    .wb-audio-player-toggle:focus-visible {
        transform: none;
    }
}

/* ==========================================================================
   Resume playback: "Resuming from" notice and Watched / Played badge
   Markup: wb_mu_get_player_resume_notice_html() / wb_mu_get_player_badge_html()
   ========================================================================== */

.wb-mu-resume-notice {
    --wb-mu-resume-font-size: 15px;
    --wb-mu-resume-close-size: 28px;

    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: var(--wb-mu-resume-font-size);
    line-height: 1.35;
    text-align: left;
    opacity: 0;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.wb-mu-resume-notice[hidden] {
    display: none !important;
}

.wb-mu-resume-notice.is-visible {
    opacity: 1;
}

.wb-mu-resume-notice.is-hiding {
    opacity: 0;
    pointer-events: none;
}

.wb-mu-resume-notice-icon {
    flex: 0 0 auto;
    display: block;
}

/* Text and link wrap together on narrow players; the close button stays on the first line. */
.wb-mu-resume-notice-body {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 14px;
    min-width: 0;
}

.wb-mu-resume-notice-text {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: 700;
    color: inherit;
    white-space: nowrap;
}

/* Theme and JW button styles are reset: this reads as a link, not a filled button. */
.wb-mu-resume-notice .wb-mu-resume-notice-restart,
.wb-mu-resume-notice .wb-mu-resume-notice-close {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    min-width: 0;
    border: 0;
    box-shadow: none;
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
}

.wb-mu-resume-notice .wb-mu-resume-notice-restart {
    padding: 0;
    background: none;
    color: var(--wb-mu-resume-link);
    font-weight: 500;
    text-align: left;
}

.wb-mu-resume-notice .wb-mu-resume-notice-restart:hover {
    text-decoration: underline;
}

.wb-mu-resume-notice .wb-mu-resume-notice-close {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--wb-mu-resume-close-size);
    height: var(--wb-mu-resume-close-size);
    padding: 0;
    border-radius: 50%;
    background: var(--wb-mu-resume-close-bg);
    color: inherit;
}

.wb-mu-resume-notice .wb-mu-resume-notice-restart:focus-visible,
.wb-mu-resume-notice .wb-mu-resume-notice-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ---- Over the video player ---- */

.wb-mu-resume-notice-overlay {
    --wb-mu-resume-link: #b9d3ff;
    --wb-mu-resume-close-bg: rgba(255, 255, 255, 0.16);

    position: absolute;
    left: 16px;
    bottom: 64px; /* clears JW's control bar */
    z-index: 20;
    max-width: calc(100% - 32px);
    padding: 10px 10px 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(17, 21, 26, 0.92);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    color: #ffffff;
}

.wb-mu-resume-notice-overlay .wb-mu-resume-notice-restart {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---- Above the audio player card ---- */

.wb-mu-resume-notice-card {
    --wb-mu-resume-link: #1f5fbf;
    --wb-mu-resume-close-bg: transparent;

    max-height: 240px;
    margin: 0 0 8px;
    padding: 10px 10px 10px 16px;
    overflow: hidden;
    border: 1px solid var(--wb-audio-player-border, #e2e6ef);
    border-radius: 12px;
    background: #eef2f8;
    color: var(--wb-audio-player-text, #34393F);
}

.wb-mu-resume-notice-card .wb-mu-resume-notice-body {
    flex: 1 1 auto;
}

.wb-mu-resume-notice-card .wb-mu-resume-notice-close {
    margin-left: auto;
    opacity: 0.75;
}

.wb-mu-resume-notice-card .wb-mu-resume-notice-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

/* JS pins the current height inline first, so this collapses smoothly instead of jumping. */
.wb-mu-resume-notice-card.is-hiding {
    max-height: 0 !important;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
}

/* ---- Watched / Played badge ---- */

.wb-mu-player-badge {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    padding: 4px 10px;
    border-radius: 6px;
    background: #3d7a37;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.wb-mu-player-badge[hidden] {
    display: none !important;
}

/* Over the video, top-left. */
.wb-mu-player-badge-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Out of the way while the video plays; back when it pauses or ends. */
.jwplayer.jw-state-playing .wb-mu-player-badge-overlay,
.jwplayer.jw-state-buffering .wb-mu-player-badge-overlay {
    opacity: 0;
}

/* Over the square audio artwork, which is smaller than a video frame. */
.wb-mu-player-badge-artwork {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    padding: 3px 8px;
    font-size: 13px;
    pointer-events: none;
}

/* An audio card without artwork: above the titles instead of over them. */
.wb-mu-player-badge-inline {
    margin-bottom: 6px;
    padding: 3px 8px;
    font-size: 13px;
}

/* Announcement only. */
.wb-mu-resume-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Small screens and small players ---- */

@media (max-width: 767.98px) {
    .wb-mu-resume-notice {
        --wb-mu-resume-font-size: 14px;
        --wb-mu-resume-close-size: 32px; /* bigger touch target */
        gap: 8px;
    }

    .wb-mu-resume-notice-overlay {
        left: 10px;
        bottom: 52px;
        max-width: calc(100% - 20px);
        padding: 8px 6px 8px 10px;
    }

    .wb-mu-resume-notice-card {
        padding: 8px 6px 8px 12px;
    }

    .wb-mu-player-badge {
        font-size: 13px;
        padding: 3px 8px;
    }

    .wb-mu-player-badge-overlay {
        top: 10px;
        left: 10px;
    }
}

/* JW's own width breakpoints: a narrow player in a wide layout (sidebar, embed) gets the compact notice too. */
.jwplayer.jw-breakpoint-0 .wb-mu-resume-notice-overlay,
.jwplayer.jw-breakpoint-1 .wb-mu-resume-notice-overlay,
.jwplayer.jw-breakpoint-2 .wb-mu-resume-notice-overlay {
    --wb-mu-resume-font-size: 13px;
    left: 8px;
    bottom: 48px;
    max-width: calc(100% - 16px);
    padding: 6px 6px 6px 10px;
}

@media (max-width: 399.98px) {
    .wb-mu-resume-notice-icon {
        display: none;
    }
}

.jwplayer.jw-breakpoint-0 .wb-mu-resume-notice-icon {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .wb-mu-resume-notice,
    .wb-mu-player-badge-overlay {
        transition: none;
    }
}
