/* =========================================================
   VortexImages3D – Styles
   ========================================================= */

/* ── Container ── */
.vortex3d-container {
    position: relative;
    overflow: hidden;
    display: block;
    background: #000d1a;
}

/* ── Canvas ── */
.vortex3d-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
    touch-action: none;
    cursor: grab;
    outline: none;
}
.vortex3d-canvas:active {
    cursor: grabbing;
}

/* ── Editor placeholder ── */
.vortex3d-editor-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a2e 0%, #001a33 100%);
}
.vortex3d-editor-placeholder svg {
    width: 60%;
    max-width: 300px;
    height: auto;
    opacity: 0.85;
}

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

.vortex3d-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: #000;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.vortex3d-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: vortex3d-zoom-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes vortex3d-zoom-in {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.vortex3d-lightbox-img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.3), 0 0 120px rgba(0, 0, 0, 0.8);
    display: block;
}

/* ── Close button variants ── */
.vortex3d-lightbox-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 40px;
    height: 40px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.5);
    color: #00d4ff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 2;
}
.vortex3d-lightbox-close:hover {
    background: rgba(0, 212, 255, 0.35);
    transform: scale(1.1) rotate(90deg);
}

.vortex3d-close-circle {
    border-radius: 50%;
}
.vortex3d-close-square {
    border-radius: 4px;
}
.vortex3d-close-text {
    background: transparent;
    border-color: transparent;
    font-size: 32px;
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .vortex3d-lightbox-close {
        top: -14px;
        right: -14px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    .vortex3d-lightbox-img {
        border-radius: 4px;
    }
}

/* ── Accessibility ── */
.vortex3d-container:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}
.vortex3d-lightbox-close:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════
   VortexImages3D v2 – Extension Styles
   ═══════════════════════════════════════════════ */

/* ── Chromatic Aberration overlay canvas ── */
.vortex3d-ca-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: screen;
    opacity: 0.6;
}

/* ── Explode Button ── */
.vortex3d-explode-btn {
    position: absolute;
    bottom: 18px;
    right: 18px;
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 212, 255, 0.5);
    background: rgba(0, 10, 30, 0.6);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
    user-select: none;
    -webkit-user-select: none;
}
.vortex3d-explode-btn:hover {
    transform: scale(1.15);
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.45);
}
.vortex3d-explode-btn:active {
    transform: scale(0.95);
}
.vortex3d-explode-btn:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 3px;
}

/* ── Mobile adjustments ── */
@media (max-width: 768px) {
    .vortex3d-explode-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
        bottom: 12px;
        right: 12px;
    }
    .vortex3d-ca-overlay {
        display: none; /* CA too costly on mobile */
    }
}
