/* =========================================================================
   LivingCollage – Elementor Widget  |  assets/css/living-collage.css
   ========================================================================= */

/* ── Stage wrapper ─────────────────────────────────────────────────────── */
.lc-collage-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    font-family: inherit;
}

.lc-stage {
    position: relative;
    width: 100%;
    height: 600px;          /* overridden by Elementor control */
    overflow: hidden;
    cursor: default;
    touch-action: none;     /* we handle all touch ourselves */
    -webkit-user-select: none;
    user-select: none;
    background-color: #1a1a1a; /* default; overridden by Elementor control */
}

/* ── Canvas layer (all photo items live here) ──────────────────────────── */
.lc-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    will-change: transform;
}

/* ── Individual photo card ─────────────────────────────────────────────── */
.lc-photo {
    position: absolute;
    box-sizing: border-box;
    background: #fff;
    padding: 8px 8px 32px;
    cursor: grab;
    will-change: transform;
    transform-origin: center center;
    transition: box-shadow 0.15s ease;
    /* GPU-layered so each photo paints independently */
    backface-visibility: hidden;
}

.lc-photo.lc-shadow {
    box-shadow:
        0 4px 10px rgba(0,0,0,.45),
        0 1px 3px  rgba(0,0,0,.30);
}

.lc-photo.lc-dragging {
    cursor: grabbing;
    z-index: 9999 !important;
    box-shadow:
        0 20px 48px rgba(0,0,0,.60),
        0 6px  14px rgba(0,0,0,.40) !important;
    transition: box-shadow 0.08s ease;
}

.lc-photo img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}

/* ── Hint overlay ──────────────────────────────────────────────────────── */
.lc-hint {
    position: absolute;
    bottom: 12px;
    right: 16px;
    color: rgba(255,255,255,.35);
    font-size: 11px;
    letter-spacing: .04em;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

.lc-hint.lc-hint-hidden {
    opacity: 0;
}

/* ── Lightbox overlay ──────────────────────────────────────────────────── */
.lc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .92);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lc-lightbox.lc-lb-open {
    opacity: 1;
    pointer-events: all;
}

/* Animation: zoom */
.lc-lightbox[data-anim="zoom"] .lc-lb-inner {
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lc-lightbox[data-anim="zoom"].lc-lb-open .lc-lb-inner {
    transform: scale(1);
}

/* Animation: fade */
.lc-lightbox[data-anim="fade"] .lc-lb-inner {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.lc-lightbox[data-anim="fade"].lc-lb-open .lc-lb-inner {
    opacity: 1;
}

/* Animation: slide */
.lc-lightbox[data-anim="slide"] .lc-lb-inner {
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.lc-lightbox[data-anim="slide"].lc-lb-open .lc-lb-inner {
    transform: translateY(0);
    opacity: 1;
}

.lc-lb-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
    padding: 8px;
    background: #fff;
}

.lc-lb-img {
    display: block;
    max-width: 85vw;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lc-lb-caption {
    width: 100%;
    padding: 12px 16px 4px;
    text-align: center;
    color: #222;
}

.lc-lb-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.lc-lb-text {
    margin: 4px 0 0;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* ── Lightbox buttons ──────────────────────────────────────────────────── */
.lc-lb-close,
.lc-lb-prev,
.lc-lb-next {
    position: fixed;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 1;
    -webkit-appearance: none;
}

.lc-lb-close:hover,
.lc-lb-prev:hover,
.lc-lb-next:hover {
    background: rgba(255,255,255,.25);
    transform: scale(1.08);
}

.lc-lb-close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 18px;
}

.lc-lb-prev,
.lc-lb-next {
    top: 50%;
    width: 52px;
    height: 52px;
    margin-top: -26px;
    font-size: 36px;
}

.lc-lb-prev { left: 12px; }
.lc-lb-next { right: 12px; }

.lc-lb-counter {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.5);
    font-size: 13px;
    letter-spacing: .06em;
    pointer-events: none;
}

/* ── "Loading" shimmer on image ────────────────────────────────────────── */
.lc-photo.lc-loading img {
    opacity: 0;
}

.lc-photo.lc-loaded img {
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* ── Focus / keyboard accessibility ───────────────────────────────────── */
.lc-photo:focus-visible {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

/* ── Zoom control indicator ───────────────────────────────────────────── */
.lc-zoom-indicator {
    position: absolute;
    top: 12px;
    left: 16px;
    color: rgba(255,255,255,.30);
    font-size: 11px;
    letter-spacing: .04em;
    pointer-events: none;
    transition: opacity 0.8s ease;
    opacity: 0;
}
.lc-zoom-indicator.lc-zoom-show {
    opacity: 1;
}

/* ── Responsive tweaks ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .lc-stage {
        touch-action: none;
    }

    .lc-lb-prev { left: 4px; }
    .lc-lb-next { right: 4px; }

    .lc-lb-prev,
    .lc-lb-next {
        width: 44px;
        height: 44px;
        margin-top: -22px;
        font-size: 28px;
    }

    .lc-lb-inner {
        max-width: 95vw;
    }

    .lc-lb-img {
        max-width: 92vw;
        max-height: 65vh;
    }
}

/* ── Elementor editor indicator ─────────────────────────────────────────── */
.elementor-editor-active .lc-hint {
    display: none;
}
