/* Real3D Login Extender - Smart Overlay Styles */

.r3e-smart-wrapper {
    position: relative;
    width: 100%;
    margin: 20px 0;
    /* No overflow: hidden here so flipbook fullscreen controls can escape if needed */
}

/* Base overlay style */
.r3e-smart-overlay {
    position: absolute;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;

    /* Allow interaction with the flipbook pages beneath the overlay */
    pointer-events: none;

    /* Gentle Glass UI Blur */
    backdrop-filter: blur(6px) grayscale(10%);
    -webkit-backdrop-filter: blur(6px) grayscale(10%);
    background: rgba(255, 255, 255, 0.05);

    transition: all 0.3s ease;
}

/* === LIGHTBOX MODE OVERRIDES === */
/* When the blur overlay is inside the lightbox, lower its z-index so it
   sits BELOW the flipbook's own nav buttons (close, arrows, etc.) */
.flipbook-overlay .r3e-smart-overlay {
    z-index: 5;
}

/* When the login modal is moved inside the lightbox, ensure it renders on top of everything */
.flipbook-overlay #clp-login-modal {
    z-index: 9999;
}

.flipbook-overlay #clp-login-modal .clp-modal-overlay {
    position: absolute;
    z-index: 9999;
}

/* Half Blur (Double Page Mode) - Right 50% only */
.r3e-smart-overlay.r3e-half-blur {
    right: 0;
    width: 50%;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    box-shadow: inset 20px 0 20px -20px rgba(0, 0, 0, 0.1);
}

/* Full Blur (Single Page Mode) - 100% width */
.r3e-smart-overlay.r3e-full-blur {
    left: 0;
    right: 0;
    width: 100%;
}

/* The Simple Button Layout Mode */
.r3e-smart-lock-box.r3e-simple-button-mode {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    text-align: center;
}

.r3e-smart-lock-box.r3e-simple-button-mode .clp-view-photos-btn {
    pointer-events: auto;
    /* IMPORTANT: Enable clicks on the button itself */
    font-size: 16px;
    font-weight: 600;
    padding: 14px 34px;
    border-radius: 30px;
    background-color: rgba(30, 30, 30, 0.4) !important;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.r3e-smart-lock-box.r3e-simple-button-mode .clp-view-photos-btn:hover {
    background-color: rgba(0, 0, 0, 0.6) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.r3e-smart-lock-box.r3e-simple-button-mode .clp-view-photos-btn:active {
    transform: translateY(1px);
}

/* Legacy Lock Box UI (Still available if simple button mode not used) */
.r3e-smart-lock-box:not(.r3e-simple-button-mode) {
    background: rgba(255, 255, 255, 0.95);
    padding: 35px 45px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    width: 380px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: r3e-popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    pointer-events: auto;
}

@keyframes r3e-popIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}