/* Mushroom Forest Gallery v1.0 */

/* ── Base ───────────────────────────────────────────────────────── */
.mfg-wrap {
    position: relative;
    width: 100%;
    height: 700px;
    min-height: 200px;
    overflow: hidden;
    background: #020a04;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair;
}
.mfg-wrap .mfg-canvas {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* ── Myzel ground ripple ─────────────────────────────────────────── */
.mfg-wrap .mfg-ripple {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 120, 0.7);
    pointer-events: none;
    z-index: 30;
    width: 0; height: 0;
    opacity: 0;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(0,220,100,0.35), inset 0 0 10px rgba(0,200,80,0.2);
}
@keyframes mfg-ripple {
    0%   { width: 0;     height: 0;     opacity: 0.9;  border-width: 3px; }
    50%  { opacity: 0.5; border-width: 1.5px; }
    100% { width: 380px; height: 380px; opacity: 0;    border-width: 0.5px; }
}
.mfg-wrap .mfg-ripple.active {
    animation: mfg-ripple 0.85s cubic-bezier(0.1,0.9,0.3,1) forwards;
}

/* ── Light flash overlay ─────────────────────────────────────────── */
.mfg-wrap .mfg-flash {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 60%, rgba(100,255,160,0.35) 0%, transparent 70%);
    pointer-events: none;
    z-index: 28;
    opacity: 0;
    transition: opacity 0.08s;
}
.mfg-wrap .mfg-flash.active {
    opacity: 1;
    transition: none;
}
@keyframes mfg-flash-fade {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}
.mfg-wrap .mfg-flash.fading {
    animation: mfg-flash-fade 0.6s ease-out forwards;
}

/* ── Gyro button ─────────────────────────────────────────────────── */
.mfg-wrap .mfg-gyro-btn {
    position: absolute;
    bottom: 20px; left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    padding: 10px 24px;
    background: rgba(2, 18, 6, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #66ffaa;
    border: 1px solid rgba(0, 200, 80, 0.4);
    border-radius: 50px;
    font-size: 13px; font-weight: 500;
    cursor: pointer; white-space: nowrap;
    transition: background .2s, border-color .2s;
}
.mfg-wrap .mfg-gyro-btn:hover {
    background: rgba(4, 30, 12, 0.9);
    border-color: rgba(0, 240, 100, 0.6);
}

/* ── Lightbox base ───────────────────────────────────────────────── */
.mfg-wrap .mfg-lightbox {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(.4,0,.2,1);
}
.mfg-wrap .mfg-lightbox.mfg-lb-active {
    display: flex;
    opacity: 1;
}

/* Forest style */
.mfg-wrap .mfg-lb--forest {
    background: radial-gradient(ellipse at 50% 100%, rgba(4,20,8,0.97) 0%, rgba(2,10,4,0.98) 60%);
}
/* Spore style */
.mfg-wrap .mfg-lb--spore {
    background: rgba(3, 12, 6, 0.96);
}
/* Minimal style */
.mfg-wrap .mfg-lb--minimal {
    background: rgba(2, 8, 4, 0.97);
}

.mfg-wrap .mfg-lb-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.mfg-wrap .mfg-lb-frame {
    position: relative;
    display: inline-block;
}

/* Forest glow border */
.mfg-wrap .mfg-lb--forest .mfg-lb-frame::before,
.mfg-wrap .mfg-lb--spore .mfg-lb-frame::before {
    content: '';
    position: absolute;
    inset: -14px;
    border: 1px solid rgba(0, 200, 80, 0.3);
    pointer-events: none;
}
.mfg-wrap .mfg-lb--forest .mfg-lb-frame::after,
.mfg-wrap .mfg-lb--spore .mfg-lb-frame::after {
    content: '';
    position: absolute;
    inset: -26px;
    border: 1px solid rgba(0, 160, 60, 0.12);
    pointer-events: none;
}

/* Animated bioluminescent border */
@keyframes mfg-bio-glow {
    0%   { box-shadow: 0 0 10px rgba(0,200,100,0.3), 0 0 24px rgba(0,150,60,0.15); }
    40%  { box-shadow: 0 0 18px rgba(0,255,120,0.5), 0 0 40px rgba(0,200,80,0.22); }
    70%  { box-shadow: 0 0 12px rgba(100,255,160,0.35), 0 0 30px rgba(0,180,80,0.18); }
    100% { box-shadow: 0 0 10px rgba(0,200,100,0.3), 0 0 24px rgba(0,150,60,0.15); }
}
.mfg-wrap .mfg-lb--forest .mfg-lb-frame,
.mfg-wrap .mfg-lb--spore  .mfg-lb-frame {
    animation: mfg-bio-glow 3.5s ease-in-out infinite;
}

.mfg-wrap .mfg-lb-img {
    max-width: 85%;
    max-height: 66vh;
    display: block;
    object-fit: contain;
    border-radius: 3px;
    transform: scale(0.9);
    transition: transform 0.65s cubic-bezier(.4,0,.2,1);
}
.mfg-wrap .mfg-lightbox.mfg-lb-active .mfg-lb-img {
    transform: scale(1);
}

/* Close button */
.mfg-wrap .mfg-lb-close {
    position: absolute;
    top: 18px; right: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 200, 80, 0.3);
    color: rgba(100, 240, 140, 0.8);
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s, color .2s;
    z-index: 51;
}
.mfg-wrap .mfg-lb-close:hover {
    background: rgba(0, 120, 40, 0.15);
    color: #88ffbb;
}

/* Nav arrows */
.mfg-wrap .mfg-lb-prev,
.mfg-wrap .mfg-lb-next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(2, 20, 8, 0.7);
    border: 1px solid rgba(0, 180, 70, 0.3);
    color: rgba(100, 240, 140, 0.8);
    font-size: 28px; line-height: 1;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s;
    z-index: 51;
}
.mfg-wrap .mfg-lb-prev { left: 16px; }
.mfg-wrap .mfg-lb-next { right: 16px; }
.mfg-wrap .mfg-lb-prev:hover,
.mfg-wrap .mfg-lb-next:hover {
    background: rgba(4, 40, 16, 0.88);
    color: #aaffcc;
}

/* Typography */
.mfg-wrap .mfg-lb-caption {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 13px;
    letter-spacing: .12em;
    color: rgba(100, 220, 140, 0.55);
    margin: 0;
}
.mfg-wrap .mfg-lb-counter {
    font-family: sans-serif;
    font-size: 9px;
    letter-spacing: .5em;
    color: rgba(60, 160, 90, 0.3);
    text-transform: uppercase;
    margin: 0;
}
.mfg-wrap .mfg-lb-hint {
    font-family: sans-serif;
    font-size: 10px;
    letter-spacing: .3em;
    color: rgba(40, 120, 70, 0.2);
    text-transform: uppercase;
    margin: 0;
    cursor: pointer;
}

/* SEO */
.mfg-wrap .mfg-seo {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    list-style: none;
    padding: 0; margin: 0; border: 0;
}

/* Responsive */
@media (max-width: 767px) {
    .mfg-wrap { height: 460px; cursor: auto; }
    .mfg-wrap .mfg-lb-prev { left: 6px; padding: 8px 10px; }
    .mfg-wrap .mfg-lb-next { right: 6px; padding: 8px 10px; }
}

/* Editor placeholder */
.elementor-editor-active .mfg-wrap[data-images="[]"]::before {
    content: "🍄 Mushroom Forest Gallery: Keine Bilder ausgewählt";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(100, 220, 140, 0.85);
    font-family: sans-serif; font-size: 13px;
    z-index: 5;
    background: rgba(2, 20, 8, 0.75);
    padding: 10px 22px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    border: 1px solid rgba(0, 180, 70, 0.3);
}
