/* DropReflect56 – DropFluid56 Widget Styles */

/* ── Gallery grid ── */
.dr56-gallery {
    display: grid;
    grid-template-columns: repeat(var(--dr56-cols, 3), 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Single item ── */
.dr56-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    cursor: crosshair;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;   /* prevent scroll hijack on touch */
    background: #111;
}

.dr56-item img.dr56-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    border-radius: inherit;
    transition: filter .3s ease;
}

/* ── WebGL canvas overlay ── */
.dr56-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: inherit;
    z-index: 2;
}

/* ── Moisture overlay (subsurface scattering illusion) ── */
.dr56-moist {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: inherit;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.07) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(200,230,255,.05) 0%, transparent 55%);
    mix-blend-mode: screen;
}

/* Subtle animated wetness shimmer */
.dr56-moist::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(255,255,255,.04) 50%,
        transparent 60%
    );
    background-size: 200% 200%;
    animation: dr56-shimmer 8s ease-in-out infinite alternate;
}

@keyframes dr56-shimmer {
    0%   { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* ── Caption ── */
.dr56-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 8px 12px;
    color: #fff;
    font-size: .82rem;
    font-family: inherit;
    background: linear-gradient(transparent, rgba(0,0,0,.55));
    border-radius: 0 0 6px 6px;
    pointer-events: none;
}

/* ─────────── Lightbox ─────────── */
.dr56-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 10, 18, .92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
}
.dr56-lightbox.dr56-lb-open {
    opacity: 1;
    pointer-events: all;
}

.dr56-lb-inner {
    position: relative;
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    /* evaporation effect: starts blurred, clears up */
    filter: blur(20px) saturate(0);
    transition: filter .55s cubic-bezier(.22,.61,.36,1);
}
.dr56-lightbox.dr56-lb-open .dr56-lb-inner {
    filter: blur(0px) saturate(1);
}

.dr56-lb-img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 80px rgba(0,120,200,.25);
}

.dr56-lb-caption {
    color: rgba(255,255,255,.75);
    font-size: .9rem;
    font-family: inherit;
    margin: 0;
    text-align: center;
}

.dr56-lb-close {
    position: absolute;
    top: -42px;
    right: 0;
    background: none;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.dr56-lb-close:hover { background: rgba(255,255,255,.15); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .dr56-gallery {
        grid-template-columns: repeat(min(var(--dr56-cols,3), 2), 1fr);
    }
}
@media (max-width: 480px) {
    .dr56-gallery {
        grid-template-columns: repeat(min(var(--dr56-cols,3), 1), 1fr);
    }
}

/* ── Long-press ripple hint ── */
.dr56-item.dr56-pressing::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 5;
    background: radial-gradient(circle at var(--px,50%) var(--py,50%),
        rgba(255,255,255,.12) 0%,
        transparent 70%);
    animation: dr56-press-pulse .5s ease forwards;
    pointer-events: none;
}
@keyframes dr56-press-pulse {
    0%   { opacity: 0; transform: scale(0.4); }
    60%  { opacity: 1; }
    100% { opacity: 0; transform: scale(1); }
}
