/* EASY CAMPERS MAUI - REUSABLE GALLERY */

.ecm-custom-gallery {
    position: relative;
    width: 100%;
    height: var(--ecm-gallery-height, 500px);
    overflow: hidden;
    background: #000;
    isolation: isolate;
}

/* Blurred version of the current photo fills the entire frame */
.ecm-gallery-bg {
    position: absolute;
    top: -30px;
    left: -30px;
    width: calc(100% + 60px);
    height: calc(100% + 60px);

    object-fit: cover;

    filter:
        blur(25px)
        brightness(0.72);

    transform: scale(1.05);

    z-index: 0;
    pointer-events: none;
}

/* Sharp, complete, uncropped photograph */
.ecm-gallery-main {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;
    z-index: 1;
}

/* Navigation arrows */
.ecm-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 48px;
    height: 72px;

    border: 0;
    padding: 0;

    background: rgba(0, 0, 0, 0.12);
    color: white;

    font-size: 42px;
    font-weight: bold;
    line-height: 1;

    cursor: pointer;
    z-index: 3;

    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.ecm-gallery-prev {
    left: 0;
}

.ecm-gallery-next {
    right: 0;
}

.ecm-gallery-arrow:hover {
    background: rgba(0, 0, 0, 0.25);
}

.ecm-gallery-arrow:focus-visible {
    outline: 2px solid white;
    outline-offset: -4px;
}

.ecm-gallery-message {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    color: white;
    background: #222;

    font-family: Arial, sans-serif;
    text-align: center;
    z-index: 5;
}