/**
 * GLB Animation Viewer - Frontend Styles
 * @version 2.10.1
 */

/* ================================================
   WRAPPER (Fullscreen mode)
   ================================================ */
.glb-animation-wrapper {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
    box-sizing: border-box;
    /* Ensure nothing clips the 3D content */
    overflow: visible;
}

/* ================================================
   VIEWER
   ================================================ */
.glb-animation-viewer {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Fullscreen mode */
.glb-animation-viewer[data-fullscreen="true"] {
    border-radius: 0;
}

/* Normal mode */
.glb-animation-viewer[data-fullscreen="false"] {
    border-radius: 8px;
}

/* ================================================
   CANVAS
   ================================================ */
.glb-animation-viewer canvas {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* ================================================
   HOTSPOT STYLES (if needed for custom cursor)
   ================================================ */
.glb-animation-viewer[data-has-hotspots="true"] canvas {
    cursor: default;
}

/* ================================================
   RESPONSIVE - Mobile & Tablet
   ================================================ */
@media (max-width: 1024px) {
    .glb-animation-viewer[data-fullscreen="false"] {
        border-radius: 0;
    }
    
    /* Mobile/Tablet: Full width viewer without margins/padding */
    .glb-animation-wrapper,
    .glb-animation-viewer {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        border-radius: 0 !important;
    }
    
    /* Ensure parent containers don't add padding on mobile/tablet */
    .entry-content .glb-animation-wrapper,
    .post-content .glb-animation-wrapper,
    .page-content .glb-animation-wrapper,
    article .glb-animation-wrapper {
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
    }
}

/* Force parent containers to not clip 3D viewer */
.glb-animation-wrapper,
.glb-animation-viewer,
.glb-animation-wrapper *:not(canvas),
.entry-content,
.post-content,
.page-content,
article {
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
}

/* ================================================
   LOADING STATE
   ================================================ */
.glb-animation-viewer.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: glb-spin 0.8s linear infinite;
}

@keyframes glb-spin {
    to { transform: rotate(360deg); }
}

/* ================================================
   SCROLL INDICATOR - Mouse icon style
   ================================================ */
.glb-scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}

.glb-scroll-indicator.visible {
    opacity: 1;
    visibility: visible;
}

/* Mouse icon */
.glb-scroll-indicator .scroll-mouse {
    width: 26px;
    height: 42px;
    border: 3px solid rgba(255,255,255,0.9);
    border-radius: 20px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.glb-scroll-indicator .scroll-wheel {
    width: 4px;
    height: 10px;
    background: rgba(255,255,255,0.9);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: glb-scroll-wheel 1.5s ease-in-out infinite;
}

@keyframes glb-scroll-wheel {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 24px; }
}

.glb-scroll-indicator .scroll-arrow {
    width: 24px;
    height: 24px;
    animation: glb-bounce 1.2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.glb-scroll-indicator .scroll-text {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@keyframes glb-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}
