/* ============================================================
   ECG37 – Elementor Construction Gallery 37
   Stylesheet
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.ecg37-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
    font-family: 'Courier New', Courier, monospace;
}

/* ── Canvas Container ────────────────────────────────────── */
.ecg37-canvas-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.ecg37-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
    touch-action: none; /* prevent scroll while touching canvas */
}

/* ── Overlay Hint ────────────────────────────────────────── */
.ecg37-overlay-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: rgba(0, 0, 0, 0.65);
    color: #ffe082;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ecg37-overlay-hint.ecg37-hint--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.ecg37-hint-icon {
    font-size: 16px;
}

/* ── Lightbox ────────────────────────────────────────────── */
.ecg37-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.ecg37-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}

.ecg37-lightbox-content {
    position: relative;
    z-index: 1;
    background: #1a1a1a;
    border: 1px solid rgba(255, 200, 50, 0.3);
    border-radius: 6px;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,200,50,0.1);

    transform: scale(0.92) translateY(16px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ecg37-lightbox.ecg37-lightbox--open .ecg37-lightbox-content {
    transform: scale(1) translateY(0);
}

.ecg37-lb-close {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 2;
    background: rgba(255, 200, 50, 0.15);
    border: 1px solid rgba(255, 200, 50, 0.4);
    color: #ffe082;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ecg37-lb-close:hover {
    background: rgba(255, 200, 50, 0.35);
}

.ecg37-lb-img-wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 70vh;
    background: #111;
}

.ecg37-lb-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.ecg37-lb-info {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 200, 50, 0.15);
    background: #111;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ecg37-lb-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ffe082;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: 'Courier New', Courier, monospace;
}

.ecg37-lb-caption {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-family: sans-serif;
}

.ecg37-lb-download {
    align-self: flex-start;
    margin-top: 4px;
    padding: 6px 16px;
    background: #F5A623;
    color: #1a1000;
    font-weight: 700;
    font-size: 13px;
    border-radius: 3px;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: background 0.2s;
    font-family: 'Courier New', Courier, monospace;
}

.ecg37-lb-download:hover {
    background: #FFD54F;
    color: #1a1000;
}

/* ── Editor Preview (content_template) ──────────────────── */
.ecg37-editor-preview .ecg37-canvas-container {
    min-height: 200px;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ecg37-overlay-hint {
        font-size: 10px;
        padding: 6px 12px;
    }

    .ecg37-lb-title {
        font-size: 14px;
    }

    .ecg37-lightbox-content {
        max-width: 96vw;
    }

    .ecg37-lb-img-wrap {
        max-height: 55vh;
    }

    .ecg37-lb-img {
        max-height: 55vh;
    }
}
