/* Lightbox: pijltjes binnen het scherm houden */
.rental-lightbox-prev,
.occasion-lightbox-prev,
.product-lightbox-prev {
    left: 12px;
    right: auto;
}

.rental-lightbox-next,
.occasion-lightbox-next,
.product-lightbox-next {
    right: 12px;
    left: auto;
}

@media (max-width: 999px) {
    .rental-lightbox-nav,
    .occasion-lightbox-nav,
    .product-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 28px;
        padding: 0;
    }

    .rental-lightbox-prev,
    .occasion-lightbox-prev,
    .product-lightbox-prev {
        left: max(8px, env(safe-area-inset-left, 0px));
    }

    .rental-lightbox-next,
    .occasion-lightbox-next,
    .product-lightbox-next {
        right: max(56px, calc(8px + env(safe-area-inset-right, 0px)));
    }

    .rental-lightbox-content,
    .occasion-lightbox-content,
    .product-lightbox-content {
        max-width: min(80vw, calc(100vw - 120px));
        padding: 10px;
        box-sizing: border-box;
    }

    .rental-lightbox-close,
    .occasion-lightbox-close,
    .product-lightbox-close {
        top: max(10px, env(safe-area-inset-top, 0px));
        right: max(10px, env(safe-area-inset-right, 0px));
        z-index: 10;
    }
}

/* Verhuurproduct: mobiele layout */
@media (max-width: 999px) {
    .rental-single-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 28px 12px 28px;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    body.using-mobile-browser .rental-single-wrapper,
    body.mobile .rental-single-wrapper {
        padding-top: 36px;
    }

    .rental-left-column,
    .rental-right-column {
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .rental-left-column {
        padding: 18px 14px;
    }

    .rental-title {
        font-size: 1.45em;
        line-height: 1.25;
        padding-right: 52px;
        margin-top: 8px;
        word-break: break-word;
    }

    .rental-title-brand {
        font-size: 1.05em;
        margin-bottom: 18px;
        padding-right: 52px;
    }

    .rental-image-gallery,
    .rental-main-image,
    .rental-gallery-link {
        max-width: 100%;
    }

    .rental-main-image img,
    .rental-featured-img,
    .rental-featured-video-player {
        max-width: 100%;
        width: 100%;
        height: auto;
        box-sizing: border-box;
    }

    .rental-description {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        word-break: break-word;
    }

    .rental-description table {
        width: 100% !important;
        max-width: 100%;
        table-layout: fixed;
        font-size: 0.85em;
    }

    .rental-description th,
    .rental-description td {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        padding: 8px 5px;
        vertical-align: top;
    }

    .rental-description img,
    .rental-description iframe,
    .rental-description video {
        max-width: 100%;
        height: auto;
    }

    .rental-description figure,
    .rental-description .wp-block-image,
    .rental-description .wp-block-table {
        max-width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 390px) {
    .rental-title {
        font-size: 1.3em;
    }

    .rental-description table {
        font-size: 0.8em;
    }

    .rental-description th,
    .rental-description td {
        padding: 6px 4px;
    }
}
