/* 360 Image Viewer Plugin Styles */

.image-360-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    margin: 20px 0;
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.image-360-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 12px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.control-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.control-btn:hover:before {
    left: 100%;
}

.control-btn:active {
    transform: scale(0.95);
}

.image-360-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 30px 20px 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 999;
    backdrop-filter: blur(5px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Loading animation */
.image-360-container:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    z-index: 500;
    pointer-events: none;
}

.image-360-container.loaded:before {
    display: none;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Loading text */
.image-360-container:after {
    content: "Loading 360° View...";
    position: absolute;
    top: calc(50% + 50px);
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    font-weight: 500;
    z-index: 500;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.image-360-container.loaded:after {
    display: none;
}

/* A-Frame specific overrides */
.image-360-container a-scene {
    border-radius: 8px;
}

/* Responsive design */
@media (max-width: 768px) {
    .image-360-container {
        margin: 15px -15px;
        border-radius: 0;
    }
    
    .image-360-controls {
        top: 10px;
        right: 10px;
        gap: 5px;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .image-360-info {
        font-size: 12px;
        padding: 15px 10px 10px;
    }
}

/* Fullscreen styles */
.image-360-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.image-360-fullscreen .image-360-controls {
    top: 20px;
    right: 20px;
}

/* VR Mode UI override */
.a-enter-vr {
    display: none !important;
}

/* Cursor styles for better UX */
.image-360-container {
    cursor: grab;
}

.image-360-container:active {
    cursor: grabbing;
}