/* Elementor 3D STEP Viewer Styles */

.e3dsv-wrapper {
    position: relative;
    width: 100%;
}

.e3dsv-viewer-container {
    position: relative;
    width: 100%;
    height: 500px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.e3dsv-viewer-container canvas {
    display: block;
    outline: none;
}

/* Loading Indicator */
.e3dsv-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.e3dsv-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: e3dsv-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes e3dsv-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.e3dsv-loading p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #333;
}

/* Error Display */
.e3dsv-error {
    text-align: center;
    padding: 20px;
    color: #d63638;
}

.e3dsv-error .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.e3dsv-error p {
    margin: 10px 0 0;
    font-size: 14px;
}

/* Notice */
.e3dsv-notice {
    padding: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    text-align: center;
    font-size: 14px;
}

/* Control Buttons */
.e3dsv-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.e3dsv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.e3dsv-btn:hover {
    background-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.e3dsv-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.e3dsv-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 1;
}

/* Fullscreen styles */
.e3dsv-viewer-container:fullscreen {
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.e3dsv-viewer-container:-webkit-full-screen {
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.e3dsv-viewer-container:-moz-full-screen {
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .e3dsv-viewer-container {
        height: 400px;
    }

    .e3dsv-controls {
        gap: 8px;
    }

    .e3dsv-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .e3dsv-btn .dashicons {
        width: 18px;
        height: 18px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .e3dsv-viewer-container {
        height: 300px;
    }

    .e3dsv-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Elementor Editor Specific Styles */
.elementor-editor-active .e3dsv-viewer-container {
    pointer-events: auto;
}

/* Additional utility classes */
.e3dsv-viewer-container.e3dsv-loading-active {
    cursor: wait;
}

.e3dsv-viewer-container.e3dsv-error-state {
    background-color: #fff5f5;
}

/* Control button variants */
.e3dsv-btn-reset {
    background-color: #2271b1;
}

.e3dsv-btn-reset:hover {
    background-color: #135e96;
}

.e3dsv-btn-wireframe {
    background-color: #46b450;
}

.e3dsv-btn-wireframe:hover {
    background-color: #2d8f3a;
}

.e3dsv-btn-fullscreen {
    background-color: #d63638;
}

.e3dsv-btn-fullscreen:hover {
    background-color: #b02a2c;
}

/* Tooltip for buttons */
.e3dsv-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    padding: 5px 10px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 3px;
    pointer-events: none;
    opacity: 0;
    animation: e3dsv-tooltip-fade-in 0.3s ease forwards;
}

@keyframes e3dsv-tooltip-fade-in {
    to {
        opacity: 1;
    }
}

/* Smooth transitions */
.e3dsv-viewer-container,
.e3dsv-btn,
.e3dsv-loading {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
.e3dsv-btn:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Loading state overlay */
.e3dsv-viewer-container .e3dsv-loading {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Custom scrollbar for fullscreen mode */
.e3dsv-viewer-container:fullscreen::-webkit-scrollbar {
    width: 8px;
}

.e3dsv-viewer-container:fullscreen::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.e3dsv-viewer-container:fullscreen::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.e3dsv-viewer-container:fullscreen::-webkit-scrollbar-thumb:hover {
    background: #777;
}
