/**
 * Fauna 3D Viewer Styles
 * CSS-based animation from pre-rendered PNG thumbnails
 * iOS-compatible implementation
 */

.fauna-3d-grid {
    margin-top: 2rem;
    border-top:1px solid black;
    padding-top: 1rem;
}

.fauna-3d-items {
    margin-bottom: 2rem;
}

.fauna-3d-item {
    margin-bottom: 2rem;
}

.fauna-3d-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

.fauna-3d-link:hover {
    transform: translateY(-5px);
}

.fauna-3d-viewer {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    background: #f5f5f5;
    overflow: hidden;
    cursor: grab;
    margin-bottom: 0.5rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.fauna-3d-viewer:active {
    cursor: grabbing;
}

.fauna-3d-viewer.loading {
    background: #f5f5f5;
}

.fauna-3d-viewer.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: fauna-3d-spin 0.8s linear infinite;
    z-index: 10;
}

@keyframes fauna-3d-spin {
    to { transform: rotate(360deg); }
}

/* Hidden canvas element (no longer used) */
.fauna-3d-canvas {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

/* Frame image - displayed during interaction */
.fauna-3d-frame,
.fauna-3d-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: contain;
    object-fit: contain;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    pointer-events: none;
    /* Optimize for iOS */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    perspective: 1000;
}

/* Smooth frame transitions on iOS */
.fauna-3d-frame {
    /* Enable hardware acceleration */
    will-change: contents;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.fauna-3d-title {
    color: var(--verd-fosc);
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0.5rem 0 0;
    text-align: center;
    line-height: 1.4;
}

.fauna-3d-subtitle {
    color: gray;
    font-size: 1rem;
    font-style: italic;
    margin: 0.25rem 0 0;
    text-align: center;
    line-height: 1.4;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    /* Optimize for mobile */
    .fauna-3d-viewer {
        cursor: auto;
    }
}

/* Remove hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    .fauna-3d-link:hover {
        transform: none;
    }
    
    .fauna-3d-viewer {
        cursor: auto;
    }
}
/*# sourceMappingURL=fauna-3d-viewer.css.map */