/* ===== WP Mixed Media Carousel – corrected CSS ===== */

/* Root + viewport (height comes from inline aspect-ratio on .wpmc-viewport) */
.wpmc {
    position: relative;
    width: 100%;
}

.wpmc-viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Track lays slides horizontally and inherits the viewport height */
.wpmc-track {
    display: flex;
    align-items: stretch;
    height: 100%;
    transition: transform .35s ease;
}

/* Each slide fills the viewport height; block avoids flex sizing quirks */
.wpmc-slide {
    flex: 0 0 100%;
    display: block;
    height: 100%;
}

/* Figure provides the positioning context and also fills height */
.wpmc-figure {
    position: relative;
    margin: 0;
    width: 100%;
    height: 100%;
    line-height: 0;
    /* kill inline-gap for images */
}

/* Media fills the slide; choose contain (no crop) or cover (edge-to-edge) */
.wpmc-img,
.wpmc-video,
.wpmc-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-position: center center;
    object-fit: contain;
    /* change to 'cover' if you want crop-to-fill */
}

/* Iframe hygiene: inherit the viewport's aspect ratio */
.wpmc-embed {
    border: 0;
}

/* Caption sits above the media if used */
.wpmc-caption {
    position: relative;
    z-index: 2;
    font-size: 0.9rem;
    color: #555;
    padding: .5rem .25rem;
    text-align: center;
}

/* Prev/Next controls */
.wpmc-prev,
.wpmc-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    cursor: pointer;
}

.wpmc-prev {
    left: .5rem;
}

.wpmc-next {
    right: .5rem;
}

/* Dots */
.wpmc-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: .5rem;
    display: flex;
    gap: .5rem;
    justify-content: center;
    z-index: 5;
}

.wpmc-dots button {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    background: #ddd;
    cursor: pointer;
}

.wpmc-dots button[aria-current="true"] {
    background: #333;
}

/* Beat theme-wide helpers that can interfere */
.wpmc img,
.wpmc video {
    max-width: none;
}

/* ===== Editor-only styles (safe to keep) ===== */
.wpmc-editor .wpmc-items {
    display: grid;
    gap: 12px;
    margin: 12px 0;
}

.wpmc-editor .wpmc-item {
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wpmc-editor .wpmc-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.wpmc-preview {
    margin-top: 12px;
}