/**
 * WooCommerce 3D Model Viewer - Frontend Styles
 * Version: 2.5.7 - Fixed height chain
 */

/* The container wrapper */
.wc-3d-viewer-container {
    width: 100% !important;
    height: 100% !important;
}

#wc-3d-model-viewer {
    width: 100%;
    height: 100% !important;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

#wc-3d-model-viewer canvas {
    border-radius: 7px;
    width: 100% !important;
    height: 100% !important;
    display: block;
    touch-action: none !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.wc-3d-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #333;
    pointer-events: none;
}

.wc-3d-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background: rgba(255, 235, 235, 0.95);
    color: #d82c0d;
    border-radius: 8px;
    text-align: center;
    z-index: 10;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
}

.wc-3d-controls {
    display: flex;
    justify-content: center;
    margin: 0.5em 0 1em;
    gap: 8px;
}

.wc-3d-button {
    background: #f7f7f7;
    color: #515151;
    border: 1px solid #ccc;
    padding: 0.5em 1em;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.wc-3d-button:hover {
    background: #ebebeb;
    border-color: #999;
}

.woocommerce-product-gallery {
    overflow: visible !important;
}

/* Bricks Product Gallery - force height through chain */
.brxe-product-gallery {
    display: flex;
    flex-direction: column;
}

.brxe-product-gallery .woocommerce-product-gallery,
.brxe-product-gallery .woocommerce-product-gallery__wrapper,
.brxe-product-gallery figure.woocommerce-product-gallery__wrapper,
.brxe-product-gallery .flex-viewport,
.brxe-product-gallery .woocommerce-product-gallery__image,
.brxe-product-gallery .wc-3d-viewer-container {
    height: 100% !important;
    flex: 1;
}

@media (max-width: 768px) {
    #wc-3d-model-viewer {
        min-height: 250px;
    }
}
