/**
 * MBA Gallery Pro — Side-by-Side Before/After styles.
 *
 * Lays the before/after images out next to each other (replacing the
 * draggable reveal slider) and stacks them vertically on small screens.
 *
 * @package MBA_Gallery_Pro
 */

/* Hide the reveal/before/after toggle buttons — irrelevant when both
   images are shown at once. */
.medbeafgallery-image-controls.mba-pro-sbs-hidden {
    display: none !important;
}

/* The wrapper the free plugin used for the slider — now a flex row. */
.mba-pro-sbs-wrapper {
    width: 100%;
    height: auto;
    position: static;       /* override Cocoen's absolute positioning */
    overflow: visible;
}

/* ─── The side-by-side grid ──────────────────────────────────────────── */
.mba-pro-sbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    align-items: start;
}

.mba-pro-sbs-item {
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--pro-bg-muted, #f5f5f7);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.mba-pro-sbs-img-wrap {
    position: relative;
    width: 100%;
    /* Keep both panels the same height regardless of native aspect ratio. */
    aspect-ratio: 3 / 4;
    background: #e9e9ee;
}

.mba-pro-sbs-img {
    width: 100% !important;     /* defeat theme `img{max-width:100%}` quirks */
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ─── Labels under each image ────────────────────────────────────────── */
.mba-pro-sbs-label {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 10px 8px;
    color: var(--pro-text, #1a1a2e);
    background: var(--pro-bg, #fff);
}

.mba-pro-sbs-label-before {
    color: var(--pro-text-muted, #6e6e80);
}

.mba-pro-sbs-label-after {
    color: var(--pro-accent, #2563eb);
}

/* Give the modal image area a touch more room now that there's no handle. */
.mba-pro-sbs-modal .medbeafgallery-comparison-container {
    max-width: none;
}

/* The free plugin's standalone Before/After text labels (the little caption
   bar) are redundant now that each panel is labelled — hide them. */
.mba-pro-sbs-modal .medbeafgallery-labels {
    display: none;
}

/* ─── Responsive: stack vertically on small screens ──────────────────── */
@media (max-width: 600px) {
    .mba-pro-sbs {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mba-pro-sbs-img-wrap {
        aspect-ratio: 4 / 3;
    }
}
