/**
 * Elementor Cloth Gallery – CSS v1.0.0
 */

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

.ecg-container {
    position: relative;
    width: 100%;
    height: 700px;
    overflow: hidden;
    background-color: #1a1510;
}

/* ─── Responsive Höhe via CSS Custom Properties ───────────────── */
@media (min-width: 1025px) {
    .ecg-container { height: var(--ecg-h-desktop, 700px); }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .ecg-container { height: var(--ecg-h-tablet, 500px); }
}
@media (max-width: 767px) {
    .ecg-container { height: var(--ecg-h-mobile, 360px); }
}

/* ─── Canvas ──────────────────────────────────────────────────── */
.ecg-canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    cursor: grab;
}
.ecg-canvas.ecg-dragging { cursor: grabbing; }

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

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

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

/* ─── Reset-Button ────────────────────────────────────────────── */
.ecg-reset-btn {
    position: absolute;
    top: 12px; right: 14px;
    background: rgba(0,0,0,0.45);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 11px;
    font-family: sans-serif;
    cursor: pointer;
    z-index: 6;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.03em;
}
.ecg-reset-btn:hover {
    background: rgba(240,200,80,0.3);
    color: #fff;
    border-color: rgba(240,200,80,0.4);
}

/* ─── Gyroskop-Erlaubnisbutton ────────────────────────────────── */
.ecg-gyro-prompt {
    position: absolute;
    bottom: 44px; 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;
}
.ecg-gyro-prompt:hover {
    background: rgba(40,130,240,0.85);
    transform: translateX(-50%) scale(1.03);
}

/* ─── Tear-Partikel-Animation ─────────────────────────────────── */
@keyframes ecg-tear-particle {
    0%   { opacity: 1; transform: translate(0,0) rotate(0deg) scale(1); }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--tr)) scale(0.3); }
}
.ecg-tear-particle {
    position: absolute;
    pointer-events: none;
    border-radius: 1px;
    animation: ecg-tear-particle 0.6s ease-out forwards;
    z-index: 8;
}

/* ─── Lightbox ────────────────────────────────────────────────── */
.ecg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ecg-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    cursor: pointer;
    animation: ecg-fade-in 0.25s ease;
}
.ecg-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: ecg-scale-in 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.ecg-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;
}
.ecg-lightbox-title {
    margin: 12px 0 0;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-family: sans-serif;
    text-align: center;
}
.ecg-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;
}
.ecg-lightbox-close:hover {
    background: rgba(255,255,255,0.22);
    transform: scale(1.1) rotate(90deg);
}
.ecg-lightbox-close svg { width: 20px; height: 20px; }

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

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