/* YouTube-style player for self-hosted videos (michael::widgets.video_player) */
.short-embed-card { position: relative; }

.mj-player {
    position: absolute; inset: 0;
    background: #000; overflow: hidden; color: #fff;
    font-family: 'Roboto', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent; user-select: none; outline: none;
}
.mj-player__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.mj-player svg { display: block; }

/* ---- Cover / thumbnail ---- */
.mj-player__cover { position: absolute; inset: 0; z-index: 3; cursor: pointer; }
.mj-player__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mj-player__shade { position: absolute; inset: 0 0 auto; height: 90px; background: linear-gradient(180deg, rgba(0,0,0,.65), transparent); pointer-events: none; }
.mj-player__head { position: absolute; top: 0; left: 0; right: 0; padding: 12px 16px; pointer-events: none; }
.mj-player__title {
    display: block; font-size: 18px; font-weight: 500; line-height: 1.3; text-shadow: 0 0 2px rgba(0,0,0,.5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mj-player__big {
    position: absolute; top: 50%; left: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px;
    padding: 0; border: 0; background: none; cursor: pointer;
}
.mj-player__big svg { width: 100%; height: 100%; }
.mj-player__big-bg { fill: #212121; fill-opacity: .8; transition: fill .1s, fill-opacity .1s; }
.mj-player__cover:hover .mj-player__big-bg, .mj-player__big:focus-visible .mj-player__big-bg { fill: #f00; fill-opacity: 1; }
.mj-player .mj-player__replay { display: none; position: absolute; inset: 0; margin: auto; width: 30px !important; height: 30px !important; }
.mj-player__badge {
    position: absolute; right: 10px; bottom: 10px; padding: 1px 5px; border-radius: 4px;
    background: rgba(0,0,0,.8); font-size: 12px; font-weight: 500; line-height: 18px;
}
.mj-player__yt-cta {
    position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 8px; background: rgba(23,23,23,.8); color: #fff !important;
    font-size: 14px; font-weight: 500; text-decoration: none !important; transition: background .1s;
}
.mj-player__yt-cta:hover { background: #000; }
.mj-player__yt-cta svg { width: 72px; height: 16px; }

.mj-player.is-started .mj-player__cover { display: none; }
.mj-player.is-ended .mj-player__cover { display: block; }
.mj-player.is-ended .mj-player__badge { display: none; }
.mj-player.is-ended .mj-player__big path { display: none; }
.mj-player.is-ended .mj-player__replay { display: block; }
.mj-player .mj-player__btn .i-pause, .mj-player .mj-player__btn .i-mute, .mj-player .mj-player__btn .i-fs-exit { display: none; }

/* ---- Chrome (controls) ---- */
.mj-player__chrome { position: absolute; inset: 0; z-index: 2; opacity: 0; transition: opacity .25s cubic-bezier(0,0,.2,1); pointer-events: none; }
.mj-player__chrome::before, .mj-player__chrome::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; }
.mj-player__chrome::before { top: 0; height: 90px; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); }
.mj-player__chrome::after { bottom: 0; height: 110px; background: linear-gradient(0deg, rgba(0,0,0,.7), transparent); }
.mj-player.is-started:not(.is-playing) .mj-player__chrome,
.mj-player.is-active .mj-player__chrome { opacity: 1; }
.mj-player.is-started:not(.is-playing) .mj-player__chrome *,
.mj-player.is-active .mj-player__chrome * { pointer-events: auto; }
.mj-player.is-started.is-playing:not(.is-active) { cursor: none; }
.mj-player__head--live, .mj-player__head--live * { z-index: 1; pointer-events: none !important; }

.mj-player__controls { position: absolute; left: 12px; right: 12px; bottom: 0; z-index: 1; }
.mj-player__progress { position: relative; height: 16px; display: flex; align-items: flex-end; padding-bottom: 5px; cursor: pointer; touch-action: none; outline: none; }
.mj-player__rail { position: relative; width: 100%; height: 3px; background: rgba(255,255,255,.2); transition: height .1s; }
.mj-player__buffered, .mj-player__played { position: absolute; top: 0; left: 0; bottom: 0; width: 0; }
.mj-player__buffered { background: rgba(255,255,255,.4); }
.mj-player__played { background: #f00; }
.mj-player__scrub {
    position: absolute; left: 0; bottom: 1px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%;
    background: #f00; transform: scale(0); transition: transform .1s;
}
.mj-player__progress:hover .mj-player__rail, .mj-player__progress.is-drag .mj-player__rail, .mj-player__progress:focus-visible .mj-player__rail { height: 5px; }
.mj-player__progress:hover .mj-player__scrub, .mj-player__progress.is-drag .mj-player__scrub, .mj-player__progress:focus-visible .mj-player__scrub { transform: scale(1); }
.mj-player__tip {
    position: absolute; bottom: 22px; left: 0; transform: translateX(-50%); padding: 2px 6px; border-radius: 3px;
    background: rgba(28,28,28,.9); font-size: 12px; font-weight: 500; opacity: 0; transition: opacity .1s; pointer-events: none !important;
}
.mj-player__progress:hover .mj-player__tip, .mj-player__progress.is-drag .mj-player__tip { opacity: 1; }

.mj-player__bar { display: flex; align-items: center; height: 44px; }
.mj-player__btn {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; opacity: .9;
}
.mj-player__btn:hover, .mj-player__btn:focus-visible { opacity: 1; }
.mj-player__btn svg { width: 26px; height: 26px; fill: currentColor; }
.mj-player.is-playing .mj-player__btn .i-play { display: none; }
.mj-player.is-playing .mj-player__btn .i-pause { display: block; }
.mj-player.is-muted .mj-player__btn .i-vol { display: none; }
.mj-player.is-muted .mj-player__btn .i-mute { display: block; }
.mj-player.is-fullscreen .mj-player__btn .i-fs { display: none; }
.mj-player.is-fullscreen .mj-player__btn .i-fs-exit { display: block; }

.mj-player__vol { display: flex; align-items: center; }
.mj-player__vol-range {
    width: 0; opacity: 0; margin: 0; height: 3px; accent-color: #fff; cursor: pointer;
    transition: width .2s cubic-bezier(.4,0,1,1), opacity .2s, margin .2s;
}
.mj-player__vol:hover .mj-player__vol-range, .mj-player__vol-range:focus-visible { width: 60px; opacity: 1; margin-right: 8px; }
.mj-player__time { font-size: 13px; padding: 0 8px; white-space: nowrap; text-shadow: 0 0 2px rgba(0,0,0,.5); }
.mj-player__spacer { flex: 1; }
.mj-player__yt { width: auto; padding: 0 8px; text-decoration: none !important; }
.mj-player__yt svg { width: 67px; height: 15px; }

/* ---- Spinner / play-pause flash ---- */
.mj-player__spinner {
    display: none; position: absolute; top: 50%; left: 50%; z-index: 1; width: 48px; height: 48px; margin: -24px 0 0 -24px;
    border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: mj-spin .8s linear infinite; pointer-events: none;
}
.mj-player.is-buffering .mj-player__spinner { display: block; }
@keyframes mj-spin { to { transform: rotate(360deg); } }
.mj-player__flash {
    position: absolute; top: 50%; left: 50%; z-index: 1; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
    background: rgba(0,0,0,.5) center / 30px no-repeat; opacity: 0; pointer-events: none;
}
.mj-player__flash.is-on { animation: mj-flash .5s ease-out; }
.mj-player__flash[data-icon="play"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E"); }
.mj-player__flash[data-icon="pause"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M6 5h4v14H6zm8 0h4v14h-4z'/%3E%3C/svg%3E"); }
@keyframes mj-flash { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(2); } }

/* ---- Small players (3-column shorts grid, phones) ---- */
@media (max-width: 991px), (hover: none) {
    .mj-player__vol-range { display: none; }
}
.mj-player.is-compact .mj-player__title { font-size: 14px; }
.mj-player.is-compact .mj-player__yt-cta { left: 8px; bottom: 8px; padding: 6px 8px; font-size: 12px; }
.mj-player.is-compact .mj-player__yt-cta svg { width: 58px; height: 13px; }
.mj-player.is-compact .mj-player__big { transform: scale(.85); }
.mj-player.is-compact .mj-player__btn { width: 36px; height: 36px; }
.mj-player.is-compact .mj-player__btn svg { width: 22px; height: 22px; }
.mj-player.is-compact .mj-player__time { font-size: 12px; padding: 0 4px; }
.mj-player.is-compact .mj-player__yt { display: none; }
.mj-player.is-compact .mj-player__bar { height: 36px; }
.mj-player.is-tiny .mj-player__yt-cta, .mj-player.is-tiny .mj-player__time { display: none; }

.mj-player.is-fullscreen { position: fixed; }
.mj-player.is-fullscreen .mj-player__title { font-size: 22px; }

/* ---- Rich-text description below the player (collapsed like YouTube) ---- */
.mj-desc {
    margin-top: 12px; padding: 12px 14px; border-radius: 12px;
    background: rgba(127,127,127,.12); color: inherit; font-size: 14px; line-height: 1.5; text-align: left;
}
.mj-desc__body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.mj-desc.is-open .mj-desc__body { display: block; -webkit-line-clamp: unset; }
.mj-desc__body > :first-child { margin-top: 0; }
.mj-desc__body > :last-child { margin-bottom: 0; }
.mj-desc__body p, .mj-desc__body ul, .mj-desc__body ol { margin: 0 0 .6em; }
.mj-desc__body ul, .mj-desc__body ol { padding-left: 1.3em; }
.mj-desc__body a { color: inherit; text-decoration: underline; }
.mj-desc__body img { max-width: 100%; height: auto; }
.mj-desc__toggle { margin-top: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.mj-desc__less, .mj-desc.is-open .mj-desc__more { display: none; }
.mj-desc.is-open .mj-desc__less { display: inline; }
