.mcp-media-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.mcp-media-track {
    position: relative;
    width: 100%;
}

.mcp-media-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: none;
    background-color: #000;
}

/* Override overflow for video slides to prevent clipping */
.mcp-media-item[data-mcp-type="video"] {
    overflow: visible !important;
}

.mcp-media-item.is-active {
    display: block;
}

.mcp-media-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #222;
    z-index: 1;
}

.mcp-media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mcp-media-iframe-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.mcp-media-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.mcp-media-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.mcp-media-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    z-index: 2;
    padding: 0;
    transition: all 0.3s ease;
}

.mcp-media-play-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.mcp-media-play-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #fff;
}

.mcp-media-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 32px;
    height: 48px;
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
    line-height: 1;
    transition: background 0.3s ease;
}

.mcp-media-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.mcp-media-prev {
    left: 8px;
}

.mcp-media-next {
    right: 8px;
}

.mcp-media-counter {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 3px;
    z-index: 10;
    pointer-events: none;
}

.mcp-media-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    padding: 30px 15px 15px;
    font-size: 14px;
    z-index: 5;
    pointer-events: none;
}

/* --- VIDEO LAYOUT FIX --- */

/* Video slides: use a 16:9 box with reasonable height */
.mcp-media-item[data-mcp-type="video"] {
    position: relative;
    aspect-ratio: 16 / 9 !important;
    min-height: 260px;       /* tweak as needed */
    max-height: none;
    overflow: visible !important;
    background: #000;        /* simple black letterbox background */
}

/* The iframe container should cover the whole video area */
.mcp-media-item[data-mcp-type="video"] .mcp-media-iframe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;        /* keep player inside the box */
}

/* Make the Bunny iframe fill the container */
.mcp-media-item[data-mcp-type="video"] .mcp-media-iframe-container iframe {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

/* When playing, hide thumb + play button (we already add .video-playing in JS) */
.mcp-media-item.video-playing .mcp-media-thumb,
.mcp-media-item.video-playing .mcp-media-play-btn {
    display: none !important;
}

