/* YouTube overlay player (public/js/video-player.js) */

.vp-open,
.vp-open body {
    overflow: hidden;
}

.vp {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity .2s ease;
}

.vp.is-visible {
    opacity: 1;
}

.vp[hidden] {
    display: none;
}

.vp__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 45, .88);
}

.vp__dialog {
    position: relative;
    width: 100%;
    max-width: 1100px;
    transform: scale(.97);
    transition: transform .2s ease;
}

.vp.is-visible .vp__dialog {
    transform: none;
}

.vp__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 160px);
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

.vp__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.vp__frame > div:not(.vp__blocked):not(.vp__loader),
.vp__frame > div > iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.vp__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border: 4px solid rgba(255, 255, 255, .2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vp-spin .8s linear infinite;
}

@keyframes vp-spin {
    to { transform: rotate(360deg); }
}

.vp__blocked {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0e1f45 center / cover no-repeat;
}

.vp__blocked::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(19, 40, 86, .82) 0%, rgba(10, 20, 45, .94) 100%);
    backdrop-filter: blur(4px);
}

.vp__blocked-inner {
    position: relative;
    max-width: 520px;
    padding: 24px;
    text-align: center;
    color: #fff;
    animation: vp-fade .3s ease both;
}

@keyframes vp-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.vp__blocked-inner h3 {
    margin: 16px 0 8px;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.vp__blocked-inner p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .75);
    font-size: 14px;
    line-height: 1.6;
}

.vp__watch--big {
    padding: 12px 22px;
    font-size: 16px;
}

.vp__close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 26px;
    line-height: 38px;
    cursor: pointer;
    transition: background-color .2s ease;
}

.vp__close:hover,
.vp__close:focus {
    background: rgba(255, 255, 255, .3);
    outline: 0;
}

.vp__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.vp__title {
    color: #fff;
    font-weight: 500;
    font-size: 16px;
}

.vp__watch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: #ff0000;
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    transition: background-color .2s ease;
}

.vp__watch:hover {
    background: #d90000;
}

.vp__hint {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
}

@media (max-width: 575.98px) {
    .vp {
        padding: 12px;
    }

    .vp__close {
        top: -44px;
    }
}
