.latest-video-popup[hidden] { display: none; }

body > .latest-video-popup {
    position: fixed !important;
    inset: auto max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) auto;
    z-index: 1000 !important;
    margin: 0;
    width: min(420px, calc(100vw - 36px));
    overflow: hidden;
    border: 1px solid rgba(76, 229, 128, .58);
    border-radius: 17px;
    color: #f1fff5;
    background: rgba(5, 17, 10, .97);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .62), 0 0 35px rgba(76, 229, 128, .12);
    font-family: var(--font-ui);
    animation: latestVideoEnter .35s ease both;
}

.latest-video-popup__topbar {
    min-height: 54px;
    padding: 9px 10px 9px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, #1caa60, #43db78);
}

.latest-video-popup__label {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #031108;
    font-size: 13px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .04em;
}

.latest-video-popup__label svg { width: 19px; height: 19px; fill: currentColor; flex: 0 0 auto; }
.latest-video-popup__actions { display: flex; align-items: center; gap: 6px; }
.latest-video-popup__actions a,
.latest-video-popup__actions button {
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f3fff7;
    background: rgba(3, 17, 8, .22);
    font: 800 12px/1 var(--font-ui);
    text-decoration: none;
    cursor: pointer;
}
.latest-video-popup__actions a { padding: 0 10px; }
.latest-video-popup__actions button { width: 34px; padding: 0; font-size: 20px; }
.latest-video-popup__actions a:hover,
.latest-video-popup__actions button:hover { background: rgba(3, 17, 8, .38); }
.latest-video-popup__actions a:focus-visible,
.latest-video-popup__actions button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.latest-video-popup__player { width: 100%; aspect-ratio: 16 / 9; background: #020503; }
.latest-video-popup__player iframe { width: 100%; height: 100%; display: block; border: 0; }
.latest-video-popup__title {
    padding: 13px 15px 15px;
    display: block;
    overflow: hidden;
    color: #eefef3;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.latest-video-popup__title:hover { color: #80f5a5; }
.latest-video-popup.is-minimized { width: min(360px, calc(100vw - 36px)); }
.latest-video-popup.is-minimized .latest-video-popup__player,
.latest-video-popup.is-minimized .latest-video-popup__title { display: none; }

@keyframes latestVideoEnter {
    from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.98); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@media (max-width: 600px) {
    body > .latest-video-popup {
        inset: auto max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) auto;
        width: calc(100vw - 20px);
        border-radius: 14px;
    }
    .latest-video-popup.is-minimized { width: calc(100vw - 20px); }
    .latest-video-popup__topbar { min-height: 50px; padding-left: 12px; }
    .latest-video-popup__label { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .latest-video-popup { animation: none; }
}
