/*
 *
 * LE WAND PAGE STYLING
 * PDF deck viewer with canvas thumbnails and lightbox
 *
 */

/* PASSWORD GATE */
#password-gate {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--background, #fff);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#password-gate.active {
    display: flex;
}

#password-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#password-input {
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    letter-spacing: 0.08em;
    border: none;
    border-bottom: 1px solid var(--primary, #000);
    background: transparent;
    padding: 4px 2px;
    outline: none;
    text-align: center;
    width: 160px;
    color: var(--primary, #000);
}

#password-error {
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--secondary, #888);
    min-height: 1em;
}

/* REMOVE STILLS GRID TOP MARGIN ON SMALL SCREENS */
@media screen and (max-width: 950px) {
    #lw-grid {
        margin-top: 0;
    }
}

/* FORCE GRID LAYOUT ON ALL SCREEN SIZES */
.commercial-grid {
    display: grid;
    grid-template-columns: 4fr 1fr;
    column-gap: 20px;
    align-items: start;
}

.commercial-grid > .stills-grid       { grid-column: 1; grid-row: 1; }
.commercial-grid > .content-container { grid-column: 2; grid-row: 1; }

/* GRID ITEMS */
.lw-page-item {
    display: block;
    width: 100%;
    overflow: hidden;
    cursor: pointer;
}

.lw-page-item canvas {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.lw-page-item:hover canvas {
    transform: scale(1.03);
    opacity: 0.85;
}

/* LIGHTBOX */
.lw-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lw-lightbox.active {
    display: flex;
}

.lw-lightbox canvas {
    max-width: 90vw;
    max-height: 90vh;
}

.lw-lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    user-select: none;
}

.lw-lightbox-prev,
.lw-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 12px;
    user-select: none;
}

.lw-lightbox-prev { left: 16px; }
.lw-lightbox-next { right: 16px; }

/*
 *
 * LARGE SCREENS
 *
 */
@media screen and (min-width: 951px) {
    .main-flex-container {
        min-height: calc(100vh - 90px);
    }
}
