.hm-pvi-block {
    margin-top: 12px;
    max-width: 100%;
}

.hm-pvi-tile {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    color: #fff;
}

.hm-pvi-poster-img {
    width: 100%;
    height: auto;
    display: block;
}

.hm-pvi-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    color: #fff;
    background: linear-gradient(135deg, #0d0d0d, #1f1f1f);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hm-pvi-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    z-index: 2;
    padding: 0;
}

.hm-pvi-play:focus-visible,
.hm-pvi-cta:focus-visible,
.hm-pvi-modal__close:focus-visible {
    outline: 2px solid #4af;
    outline-offset: 2px;
}

.hm-pvi-play-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hm-pvi-play-icon::before {
    content: '';
    display: block;
    margin-left: 6px;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #fff;
}

.hm-pvi-actions {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 3;
}

.hm-pvi-cta {
    background: #fff;
    color: #000;
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
}

.hm-pvi-tile video,
.hm-pvi-tile iframe {
    width: 100%;
    height: auto;
    display: block;
}

.hm-pvi-inline {
    background: #000;
}

.hm-pvi-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hm-pvi-modal[hidden] {
    display: none;
}

.hm-pvi-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.hm-pvi-modal__dialog {
    position: relative;
    background: #000;
    padding: 12px;
    border-radius: 10px;
    width: min(90vw, 900px);
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.hm-pvi-modal__content {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.hm-pvi-modal--portrait .hm-pvi-modal__dialog {
    width: min(92vw, 420px);
}

.hm-pvi-modal--portrait .hm-pvi-modal__content {
    padding-top: 177.78%; /* 9:16 */
}

/* Modern browsers: force proper sizing via aspect-ratio if supported */
@supports (aspect-ratio: 16/9) {
    .hm-pvi-modal__content {
        padding-top: 0;
        aspect-ratio: 16/9;
    }
    .hm-pvi-modal--portrait .hm-pvi-modal__content {
        aspect-ratio: 9/16;
    }
}

.hm-pvi-modal__content iframe,
.hm-pvi-modal__content video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Mobile: keep dialog inside viewport even for portrait */
@media (max-width: 480px) {
    .hm-pvi-modal__dialog {
        width: 94vw;
        padding: 10px;
    }
}


.hm-pvi-modal__close {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.hm-pvi-modal__close::before,
.hm-pvi-modal__close::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 15px;
    width: 2px;
    height: 16px;
    background: #fff;
}

.hm-pvi-modal__close::before {
    transform: rotate(45deg);
}

.hm-pvi-modal__close::after {
    transform: rotate(-45deg);
}

body.hm-pvi-modal-open {
    overflow: hidden;
}
