/**
 * 3D Mockup Styles for WooCommerce AI Marketing Page
 */

/* Container Styles */
.yx-3d-mockup-wrapper {
    position: relative;
    margin: 20px 0;
}

.yx-3d-mockup-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.yx-3d-mockup {
    width: 100%;
    height: 100%;
}

/* Placeholder Styles */
.yx-3d-mockup-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.yx-3d-placeholder-content {
    text-align: center;
    padding: 40px;
}

.yx-3d-placeholder-content .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #8c8f94;
    margin-bottom: 15px;
}

.yx-3d-placeholder-content p {
    color: #646970;
    font-size: 16px;
    margin: 0 0 20px 0;
}

.yx-generate-3d-btn {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.yx-generate-3d-btn:hover {
    background: #135e96;
    border-color: #135e96;
}

/* Loading Styles */
.yx-3d-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 100;
}

.yx-3d-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: yx-spin 1s linear infinite;
}

@keyframes yx-spin {
    to {
        transform: rotate(360deg);
    }
}

.yx-3d-loading p {
    margin-top: 15px;
    color: #646970;
    font-size: 14px;
}

/* Control Buttons */
.yx-3d-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
}

.yx-3d-control-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.yx-3d-control-btn:hover {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.yx-3d-control-btn:hover .dashicons {
    color: #fff;
}

.yx-3d-control-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #646970;
    transition: color 0.2s ease;
}

/* Viewer Container */
.yx-3d-viewer-container {
    position: relative;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.yx-3d-viewer {
    width: 100%;
    height: 100%;
}

/* Error Message */
.yx-3d-error {
    background: #fef0f0;
    border: 1px solid #f5c6c6;
    color: #cc0000;
    padding: 15px 20px;
    border-radius: 6px;
    text-align: center;
}

/* Meta Box Styles */
.yx-3d-meta-box .button {
    margin-top: 10px;
}

.yx-3d-meta-box hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid #ddd;
}

#yx_3d_preview {
    border-radius: 4px;
    overflow: hidden;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .yx-3d-controls {
        flex-wrap: wrap;
    }
    
    .yx-3d-control-btn {
        width: 36px;
        height: 36px;
    }
    
    .yx-3d-control-btn .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }
}

/* Fullscreen Mode */
.yx-3d-mockup-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    border-radius: 0;
}

.yx-3d-mockup-container.fullscreen .yx-3d-exit-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 100001;
}

/* Animation for Model Load */
.yx-3d-mockup canvas {
    animation: yx-fadeIn 0.5s ease-out;
}

@keyframes yx-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Tooltip Styles */
.yx-3d-control-btn[title] {
    position: relative;
}

.yx-3d-control-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 5px;
}

.yx-3d-control-btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    margin-bottom: -5px;
}
