/* =========================================
   MN Video Player Widget
   ========================================= */

/* ── Wrapper ── */
.mn-vp-wrapper {
    position: relative;
    width: 100%;
}

/* ── Aspect Ratios ── */
.mn-vp-aspect-16-9 { aspect-ratio: 16 / 9; }
.mn-vp-aspect-4-3  { aspect-ratio: 4 / 3; }
.mn-vp-aspect-21-9 { aspect-ratio: 21 / 9; }
.mn-vp-aspect-1-1  { aspect-ratio: 1 / 1; }
.mn-vp-aspect-9-16 { aspect-ratio: 9 / 16; }

/* ── Player Container ── */
.mn-vp-player {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    border-radius: 0;
}

.mn-vp-player .mn-vp-iframe,
.mn-vp-player .mn-vp-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.mn-vp-embed-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.mn-vp-embed-container .mn-vp-iframe,
.mn-vp-embed-container .mn-vp-video {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

/* ── Thumbnail ── */
.mn-vp-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: opacity 0.3s ease;
}

.mn-vp-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
    pointer-events: none;
}

.mn-vp-thumbnail:hover::after {
    background: rgba(0, 0, 0, 0.5);
}

.mn-vp-thumbnail.mn-vp-hidden {
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

/* Modal trigger (not inside .mn-vp-player) */
.mn-vp-modal-trigger {
    position: relative;
    width: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000;
}

.mn-vp-modal-trigger.mn-vp-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
    pointer-events: none;
}

.mn-vp-modal-trigger.mn-vp-thumbnail:hover::after {
    background: rgba(0, 0, 0, 0.5);
}

/* ── Trigger Box (Icon Box for Modal) ── */
.mn-vp-trigger-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    background-color: #1a1a2e;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mn-vp-trigger-box:hover {
    background-color: #16213e;
}

.mn-vp-trigger-box--square {
    border-radius: 8px;
}

.mn-vp-trigger-box--circle {
    border-radius: 50%;
}

.mn-vp-trigger-box .mn-vp-play-icon {
    background-color: transparent;
    width: auto;
    height: auto;
    border-radius: 0;
}

.mn-vp-trigger-box:hover .mn-vp-play-icon {
    transform: scale(1.1);
}

.mn-vp-trigger-box .mn-vp-play-icon.has-pulse::before {
    display: none;
}

/* ── Play Button (Icon) ── */
.mn-vp-play-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mn-vp-play-icon i {
    font-size: 60px;
    line-height: 1;
}

.mn-vp-play-icon svg {
    width: 60px;
    height: 60px;
    fill: #fff;
}

.mn-vp-play-icon img {
    width: 60px;
    height: auto;
    display: block;
}

.mn-vp-thumbnail:hover .mn-vp-play-icon {
    transform: scale(1.08);
}

/* ── Pulse Animation ── */
.mn-vp-play-icon.has-pulse {
    position: relative;
}

.mn-vp-play-icon.has-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: inherit;
    transform: translate(-50%, -50%);
    animation: mn-vp-pulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes mn-vp-pulse {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }
    100% {
        width: 160%;
        height: 160%;
        opacity: 0;
    }
}

/* ── Play Button (Text) ── */
.mn-vp-play-text-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    line-height: 1.4;
}

.mn-vp-play-text-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.mn-vp-play-text-btn i {
    font-size: 14px;
}

.mn-vp-play-text-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ── Modal Overlay ── */
.mn-vp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

body.mn-vp-modal-open {
    overflow: hidden;
}

/* ── Modal Content ── */
.mn-vp-modal-content {
    position: relative;
    width: 80%;
    max-width: 80%;
    max-height: 90vh;
}

.mn-vp-modal-content .mn-vp-player {
    border-radius: 0;
}

/* ── Modal Close Button ── */
.mn-vp-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 4px 8px;
    transition: opacity 0.2s ease;
    font-family: Arial, sans-serif;
}

.mn-vp-modal-close:hover {
    opacity: 0.7;
}

/* ── Notice ── */
.mn-vp-notice {
    padding: 20px;
    background: #f0f0f0;
    color: #666;
    text-align: center;
    border-radius: 4px;
    font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .mn-vp-modal-content {
        width: 95% !important;
        max-width: 95% !important;
    }

    .mn-vp-modal-close {
        top: -36px;
        font-size: 24px;
    }
}
