/* Scene Loading Overlay Styles */

/* Loading Overlay — hidden by default, only visible while actively loading on hover */
.scene-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
    opacity: 0;              /* Hidden by default */
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Show overlay only when parent item is in loading state */
.scene-item.is-loading .scene-loading-overlay {
    opacity: 1;
    pointer-events: none;
}

/* Play icon shown on hover when video is already loaded */
.scene-item .scene-play-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 11;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.scene-item:hover .scene-play-hint {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.scene-item .scene-play-hint i {
    color: #fff;
    font-size: 16px;
    margin-left: 3px; /* optical centering for play icon */
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.scene-loading-overlay span {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.85;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.scene-item.canva-scene {
    position: relative;
}

.scene-item.canva-scene video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.scene-item.canva-scene video.loaded {
    opacity: 1;
}
