/* STL 3D Viewer Styles */

.stl-viewer-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stl-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.stl-viewer-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stl-viewer-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.stl-action-link {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.stl-action-link:hover {
    background: #e3f2fd;
    color: #005a87;
    text-decoration: none;
}

.stl-help-trigger {
    color: #007cba;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.stl-help-trigger:hover {
    background: #e3f2fd;
    color: #005a87;
}

.stl-download-btn {
    background: #007cba;
    color: white !important;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.stl-download-btn:hover {
    background: #005a87;
    color: white !important;
    text-decoration: none;
}

.stl-viewer-canvas {
    width: 100%;
    height: calc(100% - 78px);
    min-height: 300px;
    position: relative;
}

.stl-viewer-canvas canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}



/* Loading state */
.stl-viewer-canvas::before {
    content: "Loading 3D model...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 14px;
    z-index: 1;
}

.stl-viewer-canvas canvas {
    z-index: 2;
    position: relative;
}

/* Error state */
.stl-viewer-canvas .error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #dc3545;
    text-align: center;
    font-size: 14px;
}

/* Help popup styles */
.stl-help-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #007cba;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
}

.stl-help-content {
    padding: 20px;
}

.stl-help-content h5 {
    margin: 0 0 15px 0;
    color: #007cba;
    font-size: 16px;
}

.stl-help-content ul {
    margin: 0 0 15px 0;
    padding-left: 20px;
}

.stl-help-content li {
    margin-bottom: 8px;
    font-size: 14px;
}

.stl-help-axes {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.stl-help-close {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

.stl-help-close:hover {
    background: #005a87;
}

/* Responsive design */
@media (max-width: 768px) {
    .stl-viewer-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .stl-viewer-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .stl-help-popup {
        width: 95%;
        max-width: 350px;
    }
}

/* Admin styles for media library */
.stl-viewer-shortcode {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.stl-viewer-shortcode p {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.stl-viewer-shortcode code {
    display: block;
    background: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px 0;
    font-family: monospace;
    word-break: break-all;
}

.stl-viewer-shortcode button {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.stl-viewer-shortcode button:hover {
    background: #005a87;
} 