.em-video-player {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #0f172a;
}

.em-video-player__stage {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #000;
}

.em-video-player__stage video {
    display: block;
    width: 100%;
    height: 100%;
}

.em-video-player--preview {
    height: 100%;
}

.em-video-player--preview.em-video-player[class*="inset-0"],
.em-video-player--preview.absolute {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.em-video-player--preview .em-video-player__stage {
    min-height: 100%;
    height: 100%;
}

.gallery-media-thumb .em-video-player--preview,
.em-video-player--preview.gallery-media-thumb__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.gallery-media-thumb .em-video-player--preview .em-video-player__stage video {
    object-fit: cover;
}

.mobile-highlight-card .em-video-player.mobile-highlight-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ========== INLINE (blog) — parent má aspect-video ========== */
.em-video-player--inline {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #000;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    height: 100%;
}

.em-video-player--inline .em-video-player__stage {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    cursor: pointer;
    width: 100%;
}

.em-video-player--inline .em-video-player__stage video {
    pointer-events: none;
}

.em-video-player--inline .em-video-player__controls {
    position: relative;
    z-index: 6;
    flex-shrink: 0;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

.em-video-player--inline.em-video-player--playing.em-video-player--controls-hidden .em-video-player__controls {
    opacity: 0;
    pointer-events: none;
}

/* ========== LIGHTBOX (galéria) — intrinsic výška videa ========== */
.em-video-player--lightbox {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 64rem;
    max-height: 90vh;
    border-radius: 0.75rem;
    box-shadow: 0 24px 60px rgb(0 0 0 / 0.45);
    background-color: #000;
    overflow: visible;
}

.em-video-player--lightbox:focus {
    outline: none;
}

.em-video-player--lightbox .em-video-player__loading {
    display: none !important;
}

.em-video-player--lightbox .em-video-player__big-play {
    z-index: 5;
}

.em-video-player--lightbox .em-video-player__stage {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    background-color: #000;
    cursor: pointer;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.em-video-player--lightbox .em-video-player__stage video {
    display: block;
    pointer-events: none;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    background-color: #000;
}

.em-video-player--lightbox .em-video-player__controls {
    position: relative;
    z-index: 6;
    flex-shrink: 0;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease;
    border-radius: 0 0 0.75rem 0.75rem;
}

.em-video-player--lightbox.em-video-player--playing.em-video-player--controls-hidden .em-video-player__controls {
    opacity: 0;
    pointer-events: none;
}

.em-video-player--lightbox .em-video-player__time {
    display: inline-flex;
}

/* Fullscreen — inline + lightbox */
.em-video-player--inline:fullscreen,
.em-video-player--inline:-webkit-full-screen,
.em-video-player--lightbox:fullscreen,
.em-video-player--lightbox:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background-color: #000;
    overflow: hidden;
}

.em-video-player--inline:fullscreen .em-video-player__stage,
.em-video-player--inline:-webkit-full-screen .em-video-player__stage,
.em-video-player--lightbox:fullscreen .em-video-player__stage,
.em-video-player--lightbox:-webkit-full-screen .em-video-player__stage {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: none;
}

.em-video-player--inline:fullscreen .em-video-player__stage video,
.em-video-player--inline:-webkit-full-screen .em-video-player__stage video,
.em-video-player--lightbox:fullscreen .em-video-player__stage video,
.em-video-player--lightbox:-webkit-full-screen .em-video-player__stage video {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
}

.em-video-player--lightbox:fullscreen .em-video-player__controls,
.em-video-player--lightbox:-webkit-full-screen .em-video-player__controls {
    border-radius: 0;
}

#photo-lightbox-video-shell.hidden {
    display: none !important;
}

#photo-lightbox-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.em-video-player__play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    cursor: pointer;
    z-index: 2;
}

.em-video-player__play-overlay--static {
    pointer-events: none;
    cursor: default;
}

.em-video-player__play-overlay--hidden {
    opacity: 0;
    visibility: hidden;
}

.em-video-player--preview-playing .em-video-player__play-overlay--static {
    opacity: 0;
    visibility: hidden;
}

.em-video-player__play-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background-color: rgb(30 58 138 / 0.88);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.em-video-player__play-overlay:not(.em-video-player__play-overlay--static):hover .em-video-player__play-badge,
.em-video-player:hover .em-video-player__play-overlay--static .em-video-player__play-badge {
    transform: scale(1.06);
    background-color: #facc15;
    color: #1e3a8a;
}

.em-video-player__big-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.em-video-player__big-play i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 9999px;
    background-color: rgb(30 58 138 / 0.92);
    font-size: 1.5rem;
    box-shadow: 0 10px 30px rgb(0 0 0 / 0.4);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.em-video-player__big-play:hover i {
    transform: scale(1.06);
    background-color: #facc15;
    color: #1e3a8a;
}

.em-video-player--playing .em-video-player__big-play {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.em-video-player__loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4;
    color: #facc15;
    font-size: 2rem;
    background: rgb(0 0 0 / 0.25);
}

.em-video-player--loading .em-video-player__loading {
    display: flex;
}

.em-video-player__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: linear-gradient(180deg, rgb(30 58 138 / 0.95) 0%, rgb(15 23 42 / 0.98) 100%);
    color: #fff;
}

.em-video-player__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.em-video-player__btn:hover,
.em-video-player__btn:focus-visible {
    background-color: rgb(250 204 21 / 0.2);
    color: #facc15;
    outline: none;
}

.em-video-player__progress-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0;
}

.em-video-player__progress {
    position: relative;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: rgb(255 255 255 / 0.45);
    cursor: pointer;
    overflow: hidden;
}

.em-video-player__progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #facc15 0%, #fde047 100%);
    transition: width 0.08s linear;
}

.em-video-player__error {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    text-align: center;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.4;
    background: rgb(0 0 0 / 0.75);
}

.em-video-player__error.hidden {
    display: none !important;
}

.em-video-player__time {
    display: none;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: rgb(255 255 255 / 0.9);
}

.em-video-player__time-sep {
    opacity: 0.65;
}

@media (min-width: 640px) {
    .em-video-player__time {
        display: inline-flex;
    }
}

.em-video-player:fullscreen .em-video-player__stage,
.em-video-player:fullscreen .em-video-player__stage video {
    width: 100%;
    height: 100%;
    max-height: none;
}

.em-video-player:fullscreen .em-video-player__stage video {
    object-fit: contain;
}
