/**
 * ShadowBox.css
 * Styles for the interactive 3D parallax effect
 * Version 1.1.1 - With prefixed class names to avoid conflicts
 */

/* Container to maintain aspect ratio */
.shadowbox-container {
    position: relative;
    width: 100%;
    max-width: 600px; /* Adjust as needed */
    margin: 0 auto;
}

/* The wrapper div that sets the aspect ratio */
.aspect-ratio-box {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
}

/* The actual shadowbox */
#shadowbox {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    cursor: move; /* Indicates interactive element */
}

/* Base styles for all parallax layers */
.sb_parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    will-change: transform; /* Performance optimization */
}

/* Layer stacking order */
.sb_layer-1 { z-index: 6; } /* Top layer */
.sb_layer-2 { z-index: 5; }
.sb_layer-3 { z-index: 4; }
.sb_layer-4 { z-index: 3; }
.sb_layer-5 { z-index: 2; }
.sb_layer-6 { z-index: 1; } /* Bottom layer */

/* Fullscreen button */
.fullscreen-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.fullscreen-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Fullscreen mode */
.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
}

/* Disable text selection for better interaction */
#shadowbox, .sb_parallax-layer {
    user-select: none;
    -webkit-user-select: none;
}

/* Make sure images are contained properly */
.sb_parallax-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevent image dragging */
}

/* Bootstrap breakpoints for responsive behavior */
@media (max-width: 768px) {
    .shadowbox-container {
        max-width: 100%;
    }
}

/* Optional: Add animation for transitions */
.shadowbox-initialized .sb_parallax-layer {
    transition: transform 0.05s ease-out;
}
