/**
 * ShapeDiver Minimal Viewer Styles
 * Clean, minimal interface
 */

/* Container */
.shapediver-minimal-container {
    position: relative;
    width: 100%;
}

#shapediver-viewer-wrapper {
    position: relative;
    width: 100%;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Canvas */
#shapediver-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

#shapediver-canvas:active {
    cursor: grabbing;
}

/* Loading */
.sd-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 248, 248, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sd-loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sd-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #333;
    border-radius: 50%;
    animation: sd-spin 0.8s linear infinite;
}

@keyframes sd-spin {
    to { transform: rotate(360deg); }
}

.sd-loading p {
    margin-top: 16px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Minimal Controls */
.sd-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.sd-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.sd-btn:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.sd-btn:active {
    transform: translateY(0) scale(0.96);
}

.sd-btn svg {
    color: #333;
}

/* Fullscreen mode */
#shapediver-viewer-wrapper:fullscreen {
    height: 100vh !important;
    border-radius: 0;
}

#shapediver-viewer-wrapper:fullscreen #shapediver-canvas {
    height: 100vh !important;
}

#shapediver-viewer-wrapper:-webkit-full-screen {
    height: 100vh !important;
}

#shapediver-viewer-wrapper:-moz-full-screen {
    height: 100vh !important;
}

/* Variation notice */
.sd-variation-notice {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(33, 150, 243, 0.95);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    animation: slideUp 0.3s ease;
}

.sd-variation-notice.updating {
    background: rgba(255, 152, 0, 0.95);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Error message */
.sd-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(244, 67, 54, 0.95);
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 15;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    #shapediver-viewer-wrapper {
        border-radius: 6px;
    }
    
    .sd-controls {
        top: 12px;
        right: 12px;
        gap: 6px;
    }
    
    .sd-btn {
        width: 36px;
        height: 36px;
    }
    
    .sd-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .sd-variation-notice {
        bottom: 12px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    #shapediver-viewer-wrapper {
        border-radius: 0;
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
    }
    
    .sd-controls {
        top: 8px;
        right: 8px;
    }
    
    .sd-btn {
        width: 32px;
        height: 32px;
    }
}

/* Clean, minimal aesthetic */
* {
    -webkit-tap-highlight-color: transparent;
}

.shapediver-minimal-container {
    user-select: none;
    -webkit-user-select: none;
}
