/* STL Viewer Modal */
.stl-viewer-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.stl-viewer-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stl-viewer-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stl-viewer-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stl-viewer-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.stl-viewer-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.stl-viewer-close:hover {
    color: #333;
}

.stl-viewer-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#stl-viewer-container {
    width: 100%;
    height: 100%;
}

.stl-viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.stl-viewer-loading .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stl-viewer-controls {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.stl-viewer-controls-info {
    flex: 1;
}

.stl-viewer-button {
    padding: 8px 16px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.stl-viewer-button:hover {
    background-color: #005a87;
}

/* View in 3D button in admin */
.view-stl-3d {
    display: inline-block;
    padding: 4px 10px;
    background-color: #0073aa;
    color: white !important;
    text-decoration: none !important;
    border-radius: 3px;
    font-size: 12px;
    margin-left: 8px;
}

.view-stl-3d:hover {
    background-color: #005a87;
    color: white !important;
}
