/**
 * RM_A-LB Lightbox Styles
 */

/* Lightbox Container */
.rma-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rma-lightbox[hidden] {
    display: none;
}

/* Backdrop */
.rma-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
}

/* Content Container */
.rma-lightbox-content {
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Close Button - positioned at 5% from top to align with image top edge */
.rma-lightbox-close {
    position: absolute;
    top: 0;
    right: 2%;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    color: #343434;
    transition: color 0.2s ease;
    outline: none;
}

.rma-lightbox-close:hover {
    color: #000000;
}

.rma-lightbox-close:focus {
    outline: none;
}

.rma-lightbox-close svg {
    width: 29px;
    height: 29px;
}

/* Image Container */
.rma-lightbox-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rma-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.1s ease;
}

.rma-lightbox-image.is-fading {
    opacity: 0;
}

/* Navigation Areas */
.rma-lightbox-nav {
    position: absolute;
    top: 5%;
    bottom: 5%;
    width: 50%;
    display: flex;
    align-items: center;
    z-index: 5;
}

.rma-lightbox-prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 5%;
}

.rma-lightbox-next {
    right: 0;
    justify-content: flex-end;
    padding-right: 5%;
}

/* Gallery Image Styles */
.rma-image-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.rma-gallery-image {
    position: relative;
    margin: 0;
    overflow: hidden;
    vertical-align: top;
}

.rma-gallery-image.rma-lightbox-trigger {
    cursor: pointer;
}

.rma-gallery-image img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
}

/* Image Caption styles are defined in theme custom.css */

/* Main Image */
.rma-main-image {
    position: relative;
    margin: 0 0 30px 0;
    cursor: pointer;
}

.rma-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Gallery Title - Typography defined in theme custom.css */

/* Responsive */
@media (max-width: 992px) {
    .rma-image-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .rma-image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .rma-image-gallery {
        grid-template-columns: 1fr;
    }
}

/* Keyboard Focus - Navigation areas only */
.rma-lightbox-nav:focus {
    outline: none;
}

/* Custom Cursor Styles - Thin arrow design with subtle white glow for visibility on dark images */
.rma-lightbox-prev {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23343434' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cdefs%3E%3Cfilter id='glow' x='-50%25' y='-50%25' width='200%25' height='200%25'%3E%3CfeDropShadow dx='0' dy='0' stdDeviation='0.8' flood-color='white' flood-opacity='1'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23glow)'%3E%3Cline x1='19' y1='12' x2='5' y2='12'%3E%3C/line%3E%3Cpolyline points='12 19 5 12 12 5'%3E%3C/polyline%3E%3C/g%3E%3C/svg%3E") 16 16, w-resize;
}

.rma-lightbox-next {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23343434' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cdefs%3E%3Cfilter id='glow' x='-50%25' y='-50%25' width='200%25' height='200%25'%3E%3CfeDropShadow dx='0' dy='0' stdDeviation='0.8' flood-color='white' flood-opacity='1'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23glow)'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/g%3E%3C/svg%3E") 16 16, e-resize;
}
