/**
 * Elementor Fluid Gallery – CSS v1.1.0
 */

/* ─── Wrapper & Container ─────────────────────────────────────── */
.efg-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
}

.efg-container {
    position: relative;
    width: 100%;
    /* Höhe wird per JS responsiv gesetzt */
    height: 600px;
    overflow: hidden;
    background-color: #0a1628;
}

/* ─── Responsive Höhe via CSS-Custom-Properties ───────────────── */
/* JS setzt --efg-h-desktop / tablet / mobile auf dem :root */
@media (min-width: 1025px) {
    .efg-container { height: var(--efg-h-desktop, 600px); }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .efg-container { height: var(--efg-h-tablet, 420px); }
}
@media (max-width: 767px) {
    .efg-container { height: var(--efg-h-mobile, 280px); }
}

/* ─── Canvas ──────────────────────────────────────────────────── */
.efg-canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
}

/* Standard-Cursor wird per JS überschrieben */
.efg-canvas { cursor: crosshair; }
.efg-canvas.efg-cursor-default  { cursor: default; }
.efg-canvas.efg-cursor-none     { cursor: none; }
.efg-canvas.efg-cursor-crosshair{ cursor: crosshair; }

/* ─── Custom Cursor ───────────────────────────────────────────── */
.efg-custom-cursor {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: none;
    transition: transform 0.08s ease, opacity 0.15s ease;
}

.efg-custom-cursor.efg-cursor-drop {
    display: block;
    border-radius: 50% 50% 50% 0;
    transform: translate(-50%, -50%) rotate(-45deg);
    box-shadow: 0 0 8px 2px currentColor;
}

.efg-custom-cursor.efg-cursor-ripple {
    display: block;
    background: transparent !important;
    border: 2px solid currentColor;
    animation: efg-ripple-cursor 1.2s ease-out infinite;
}

@keyframes efg-ripple-cursor {
    0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* ─── Fallback ────────────────────────────────────────────────── */
.efg-fallback {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
}
.efg-fallback img {
    width: calc(33.33% - 8px);
    height: auto;
    object-fit: cover;
    border-radius: 4px;
}
.no-canvas .efg-canvas   { display: none; }
.no-canvas .efg-fallback { display: flex; }

/* ─── Ladeindikator ───────────────────────────────────────────── */
.efg-loading-spinner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; height: 40px;
    border: 3px solid rgba(100,180,255,0.2);
    border-top-color: rgba(100,180,255,0.8);
    border-radius: 50%;
    animation: efg-spin 0.8s linear infinite;
    z-index: 11;
    pointer-events: none;
}
@keyframes efg-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ─── Bedien-Hinweis ──────────────────────────────────────────── */
.efg-hint {
    position: absolute;
    bottom: 12px; left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.45);
    color: rgba(255,255,255,0.75);
    font-size: 11px;
    padding: 4px 14px;
    border-radius: 20px;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 5;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    letter-spacing: 0.04em;
}
.efg-hint.efg-hint-fade { opacity: 0; }

/* ─── Bildunterschriften (Canvas-Overlay) ─────────────────────── */
.efg-caption-overlay {
    position: absolute;
    pointer-events: none;
    z-index: 8;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-family: sans-serif;
    color: #fff;
    background: rgba(0,0,0,0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.efg-caption-overlay.efg-caption-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Gyroskop-Erlaubnisbutton ────────────────────────────────── */
.efg-gyro-prompt {
    position: absolute;
    bottom: 40px; left: 50%;
    transform: translateX(-50%);
    background: rgba(30,100,200,0.7);
    color: #fff;
    border: 1px solid rgba(100,180,255,0.4);
    border-radius: 24px;
    padding: 8px 20px;
    font-size: 13px;
    font-family: sans-serif;
    cursor: pointer;
    z-index: 6;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}
.efg-gyro-prompt:hover {
    background: rgba(40,130,240,0.85);
    transform: translateX(-50%) scale(1.03);
}

/* ─── Lightbox ────────────────────────────────────────────────── */
.efg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.efg-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    cursor: pointer;
    animation: efg-fade-in 0.25s ease;
}
.efg-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: efg-scale-in 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.efg-lightbox-img {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
    display: block;
}
.efg-lightbox-title {
    margin: 12px 0 0;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-family: sans-serif;
    text-align: center;
    letter-spacing: 0.03em;
}
.efg-lightbox-close {
    position: fixed;
    top: 20px; right: 24px;
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
    z-index: 2;
}
.efg-lightbox-close:hover {
    background: rgba(255,255,255,0.22);
    transform: scale(1.1) rotate(90deg);
}
.efg-lightbox-close svg { width: 20px; height: 20px; }

@keyframes efg-fade-in  { from { opacity:0; } to { opacity:1; } }
@keyframes efg-scale-in { from { opacity:0; transform:scale(0.88); } to { opacity:1; transform:scale(1); } }

/* ─── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .efg-lightbox-close { top:12px; right:12px; width:40px; height:40px; }
    .efg-lightbox-img   { max-width:95vw; max-height:80vh; }
    .efg-hint           { font-size:10px; }
}
