.review-media-card {
    margin-top: 1rem;
    overflow: hidden;
}

.review-media-card-header {
    font-size: 1rem;
}

.review-media-card-body {
    padding: 1rem 1rem 0.25rem;
}

.review-media-grid {
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.review-media-column {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.review-media-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 190px;
    padding: 0;
    overflow: hidden;
    appearance: none;
    background: #f3f3f3;
    border: 0;
    border-radius: 0.25rem;
    box-shadow: none;
    cursor: pointer;
}

.review-media-item:hover,
.review-media-item:focus {
    border: 0;
    box-shadow: none;
}

.review-media-item:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.review-media-preview {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    margin: auto;
    object-fit: contain;
    object-position: center center;
    transition: transform 0.2s ease;
}

.review-media-preview--image,
.review-media-preview--video {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
}

.review-media-item:hover .review-media-preview {
    transform: scale(1.03);
}

.review-media-video-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.15);
}

.review-media-video-icon {
    position: relative;
    display: block;
    width: 52px;
    height: 52px;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 50%;
}

.review-media-video-icon::after {
    position: absolute;
    top: 50%;
    left: 54%;
    width: 0;
    height: 0;
    content: "";
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #fff;
    transform: translate(-50%, -50%);
}

/*
 * Modal
 */

.review-media-modal {
    padding-right: 0 !important;
}

.review-media-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.review-media-modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100vw - 2rem);
    max-width: 1200px;
    min-height: calc(100vh - 3.5rem);
    margin: 1.75rem auto;
    pointer-events: none;
}

.review-media-modal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    pointer-events: auto;
}

.review-media-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    text-align: center;
}

.review-media-modal-image,
.review-media-modal-video {
    display: block;
    width: auto;
    max-width: calc(100vw - 4rem);
    height: auto;
    max-height: calc(100vh - 4rem);
    margin: 0 auto;
    object-fit: contain;
    object-position: center center;
}

.review-media-modal-video {
    background: #000;
}

.review-media-modal-close {
    position: absolute;
    z-index: 2;
    top: -18px;
    right: -18px;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #fff;
    font-size: 32px;
    font-weight: 300;
    line-height: 38px;
    text-align: center;
    text-shadow: none;
    opacity: 1;
    background: rgba(0, 0, 0, 0.75);
    border: 0;
    border-radius: 50%;
}

.review-media-modal-close:hover,
.review-media-modal-close:focus {
    color: #fff;
    opacity: 1;
    background: rgba(0, 0, 0, 0.95);
}

@media (max-width: 767.98px) {
    .review-media-card-body {
        padding: 0.75rem 0.75rem 0.1rem;
    }

    .review-media-item {
        height: 170px;
    }

    .review-media-modal-dialog {
        width: calc(100vw - 1rem);
        min-height: calc(100vh - 1rem);
        margin: 0.5rem auto;
    }

    .review-media-modal-image,
    .review-media-modal-video {
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }

    .review-media-modal-close {
        top: 8px;
        right: 8px;
    }
}

@media (max-width: 575.98px) {
    .review-media-item {
        height: 210px;
    }
}