/*
 * PRODUCT_PREVIEW_LAYOUT_V1
 *
 * The rebuilt product page is already placed inside
 * #main-catalog-right. The legacy product layout normally
 * expects .item2_right_content to sit beside a separate
 * .item2_left_menu and therefore applies margin-left:290px.
 *
 * In the rebuilt shell that offset would be applied twice.
 * This override is loaded only by product/preview.html.twig.
 */
.legacy-product #main-catalog-right .item2_right_content {
    margin-left: 0;
}

/* PRODUCT_REQUEST_UI_V1 */

/*
 * PRODUCT_HEADER_GEOMETRY_FIX_V2
 *
 * Restore the original legacy four-column float geometry.
 * Product-only legacy CSS adds margin-left:145px to .logo;
 * that extra offset makes the contact column wrap.
 */
.global[data-rebuild="visual-product-preview-v1"] .header-inner {
    display: block !important;
    width: 1000px !important;
    height: 128px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: content-box !important;
}

.global[data-rebuild="visual-product-preview-v1"] .header-inner > .logo,
.global[data-rebuild="visual-product-preview-v1"] .header-inner > .desc,
.global[data-rebuild="visual-product-preview-v1"] .header-inner > .search,
.global[data-rebuild="visual-product-preview-v1"] .header-inner > .contact {
    float: left !important;
    flex: none !important;
    box-sizing: content-box !important;
}

.global[data-rebuild="visual-product-preview-v1"] .header-inner > .logo {
    margin-left: 0 !important;
}

.global[data-rebuild="visual-product-preview-v1"] .header-inner > .desc {
    width: 245px !important;
    min-width: 245px !important;
}

.global[data-rebuild="visual-product-preview-v1"] .header-inner > .search {
    width: 375px !important;
    min-width: 375px !important;
    height: 128px !important;
}

.global[data-rebuild="visual-product-preview-v1"] .header-inner > .contact {
    margin-left: 0 !important;
    white-space: nowrap !important;
}

.global[data-rebuild="visual-product-preview-v1"] .contact-inner,
.global[data-rebuild="visual-product-preview-v1"] .contact-inner a {
    white-space: nowrap !important;
}

.global[data-rebuild="visual-product-preview-v1"] .preview-search {
    display: flex;
    align-items: center;
    width: auto;
    max-width: none;
    white-space: nowrap;
}

.global[data-rebuild="visual-product-preview-v1"] .preview-search input[type="text"],
.global[data-rebuild="visual-product-preview-v1"] .preview-search input[type="search"] {
    box-sizing: border-box;
    width: 251px !important;
    max-width: none !important;
}

/*
 * Price: remove the legacy orange highlight.
 */
.global[data-rebuild="visual-product-preview-v1"] .item2_calculator,
.global[data-rebuild="visual-product-preview-v1"] .item2_calculator_alln {
    background-color: #ffffff !important;
}


/*
 * Request quantity selector.
 */
.global[data-rebuild="visual-product-preview-v1"] .request-quantity-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
}

.global[data-rebuild="visual-product-preview-v1"] .request-qty-button {
    box-sizing: border-box;
    width: 32px;
    height: 30px;
    padding: 0;
    border: 1px solid #bdbdbd;
    border-radius: 4px;
    background: #f5f5f5;
    color: #4b4b4b;
    font-size: 20px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
}

.global[data-rebuild="visual-product-preview-v1"] .request-qty-button:hover {
    background: #e9e9e9;
}

.global[data-rebuild="visual-product-preview-v1"] .request-qty-input {
    box-sizing: border-box;
    width: 76px !important;
    height: 30px;
    margin: 0;
    text-align: center;
}

.global[data-rebuild="visual-product-preview-v1"] .request-qty-unit {
    min-width: 28px;
    white-space: nowrap;
}

.global[data-rebuild="visual-product-preview-v1"] .request-add-button {
    min-height: 34px;
    padding: 5px 16px;
    border: 4px solid #ebebeb;
    border-radius: 8px;
    background: #00abe0;
    color: #ffffff;
    cursor: pointer;
}

.global[data-rebuild="visual-product-preview-v1"] .request-added-state {
    display: inline-block;
    margin-bottom: 7px;
    color: #00abe0;
    font-weight: bold;
}

.global[data-rebuild="visual-product-preview-v1"] .request-remove-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #777777;
    text-decoration: underline;
    cursor: pointer;
}


/*
 * Header request widget.
 */
.global[data-rebuild="visual-product-preview-v1"] .request-widget-link {
    color: #4b4b4b;
    text-decoration: none;
}

.global[data-rebuild="visual-product-preview-v1"] .request-widget-title {
    color: #00abe0;
    font-size: 18px;
    font-weight: bold;
}

.global[data-rebuild="visual-product-preview-v1"] .request-widget-count {
    font-size: 12px;
}

/* PRODUCT_REQUEST_UI_V1_FIX1 */

/*
 * Old style.css uses ID selectors for these controls.
 * Override them explicitly for the new request UI.
 */
body.legacy-product #buttonadd.request-add-button {
    width: auto !important;
    height: auto !important;
    min-height: 40px !important;
    padding: 7px 20px !important;
    border: 4px solid #d1d1d1 !important;
    border-radius: 10px !important;
    background: #00abe0 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    cursor: pointer !important;
}

body.legacy-product #buttondel.request-remove-button {
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #777777 !important;
    font-size: 14px !important;
    text-decoration: underline !important;
    cursor: pointer !important;
}

/*
 * Explicitly clear every possible legacy background component
 * from the price result.
 */
body.legacy-product #loc_sum.item2_calculator,
body.legacy-product .item2_calculator,
body.legacy-product .item2_calculator_alln {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
}
