/* ─────────────────────────────────────────────────────────
   OrigamiFold28 – Stylesheet
   All class names contain "origamifold28" per spec.
───────────────────────────────────────────────────────── */

.origamifold28-widget-wrap {
    position: relative;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Canvas container ── */
.origamifold28-canvas-wrap {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    border-radius: 4px;
    background: #1a1a1a;
}

.origamifold28-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    cursor: grab;
    touch-action: none;
}

.origamifold28-canvas:active {
    cursor: grabbing;
}

/* ── Progress bar ── */
.origamifold28-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.1);
    pointer-events: none;
    z-index: 2;
}

.origamifold28-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #c8a96e, #f0d4a0);
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(200, 169, 110, 0.6);
}

/* ── Hint scroll button ── */
.origamifold28-hint-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 3;
    transition: opacity 0.3s, background 0.3s;
    animation: origamifold28-bounce 1.8s ease-in-out infinite;
}

.origamifold28-hint-btn:hover {
    background: rgba(255,255,255,0.22);
}

.origamifold28-hint-btn svg {
    width: 20px;
    height: 20px;
}

@keyframes origamifold28-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(5px); }
}

/* ── Lightbox ── */
.origamifold28-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

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

.origamifold28-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.origamifold28-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.08),
        0 32px 80px rgba(0,0,0,0.7);
    animation: origamifold28-lb-unfold 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes origamifold28-lb-unfold {
    from {
        opacity: 0;
        transform: scale(0.88) perspective(800px) rotateX(8deg);
    }
    to {
        opacity: 1;
        transform: scale(1) perspective(800px) rotateX(0deg);
    }
}

.origamifold28-lightbox-img {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.origamifold28-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.origamifold28-lightbox-close:hover {
    background: rgba(255,255,255,0.18);
}

/* ── Mobile adjustments ── */
@media ( max-width: 767px ) {
    .origamifold28-canvas-wrap {
        height: 320px;
    }
}

/* ── Elementor editor placeholder ── */
.elementor-editor-active .origamifold28-canvas-wrap {
    min-height: 200px;
}
