/*
 * ============================================================
 * BARFmenu B2B Order Engine
 * FINAL LAYOUT
 * ============================================================
 */


/* PRODUCT INFO / CARD */

.products .info,
.product .info {
    display: flex;
    flex-direction: column;
}


/* ORDER MODULE */

.bm-b2b-order {
    width: 100%;
    margin: 12px 0 16px;
}

.bm-b2b-order-ready {
    border: 1px solid #e5e5e5;
    border-radius: 7px;
    background: #ffffff;
    overflow: hidden;
}

.bm-b2b-order-ready ~ .price {
    display: none !important;
}


/* VARIANT */

.bm-b2b-order-row {
    display: block;
    padding: 12px 14px;
    background: #ffffff;
}

.bm-b2b-order-row + .bm-b2b-order-row {
    border-top: 1px solid #e5e5e5;
}

.bm-b2b-order-info {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0 0 9px;
}

.bm-b2b-order-label {
    display: block;
    margin: 0;
    padding: 0;
    color: #333333;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    white-space: normal;
}

.bm-b2b-order-stock {
    display: none !important;
}


/*
 * CONTROLS
 *
 * Desktop:
 * [ prices              ] [ - ][ 0 ][ + ]
 *
 * De quantity staat als één blok rechts en wordt verticaal
 * gecentreerd over Adviesprijs + Uw prijs.
 */

.bm-b2b-order-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px 48px 34px;
    align-items: center;
    width: 100%;
    min-width: 0;
    column-gap: 0;
}


/* PRICES */

.bm-b2b-order-prices {
    display: grid;
    grid-template-columns: minmax(145px, 1fr) minmax(62px, auto);
    align-items: baseline;
    width: 100%;
    min-width: 0;
    padding-right: 14px;
    column-gap: 8px;
    row-gap: 4px;
}

.bm-b2b-order-price-row {
    display: contents;
}

.bm-b2b-order-price-label {
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #888888;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 400;
    text-align: left;
    white-space: normal;
}

.bm-b2b-order-advice-price {
    margin: 0;
    padding: 0;
    color: #777777;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 400;
    text-align: right;
    white-space: nowrap;
}

.bm-b2b-order-price-row-customer
.bm-b2b-order-price-label {
    color: #555555;
    font-weight: 500;
}

.bm-b2b-order-price {
    display: block;
    margin: 0;
    padding: 0;
    color: #358e15;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}


/* QUANTITY */

.bm-b2b-order-minus,
.bm-b2b-order-plus {
    box-sizing: border-box;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid #d8d8d8;
    background: #f2f2f2;
    color: #555555;
    font-family: inherit;
    font-size: 18px;
    line-height: 32px;
    font-weight: 400;
    text-align: center;
    cursor: pointer;
    vertical-align: middle;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.bm-b2b-order-minus {
    border-radius: 4px 0 0 4px;
}

.bm-b2b-order-plus {
    border-radius: 0 4px 4px 0;
}

.bm-b2b-order-minus:hover,
.bm-b2b-order-plus:hover {
    background: #e8e8e8;
    border-color: #cccccc;
    color: #333333;
}

.bm-b2b-order-minus:focus,
.bm-b2b-order-plus:focus {
    outline: none;
    border-color: #358e15;
}

.bm-b2b-order-quantity {
    box-sizing: border-box !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 34px !important;
    margin: 0 -1px !important;
    padding: 0 4px !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #333333 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 32px !important;
    font-weight: 400 !important;
    text-align: center !important;
    vertical-align: middle !important;
    box-shadow: none !important;
    position: relative;
    z-index: 1;
}

.bm-b2b-order-quantity:focus {
    outline: none !important;
    border-color: #358e15 !important;
}

.bm-b2b-order-quantity::-webkit-inner-spin-button,
.bm-b2b-order-quantity::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bm-b2b-order-quantity {
    -moz-appearance: textfield;
}


/* UNAVAILABLE */

.bm-b2b-order-unavailable {
    display: inline-block;
    grid-column: 2 / -1;
    justify-self: end;
    padding: 5px 9px;
    border-radius: 4px;
    background: #f2f2f2;
    color: #777777;
    font-size: 12px;
    line-height: 1.3;
}


/* LOADING / ERROR */

.bm-b2b-order-loading,
.bm-b2b-order-error {
    display: block;
    padding: 10px 0;
    color: #777777;
    font-size: 13px;
    line-height: 1.4;
}

.bm-b2b-order-error {
    color: #a94442;
}


/* CART BUTTON */

.info > a.cart {
    display: block !important;
    box-sizing: border-box;
    width: 100%;
    margin: auto 0 0 !important;
    padding: 11px 16px !important;
    border: 1px solid #358e15 !important;
    border-radius: 5px;
    background: #358e15 !important;
    color: #ffffff !important;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.info > a.cart:hover,
.info > a.cart:focus {
    background: #2f7f13 !important;
    border-color: #2f7f13 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.info > a.cart .fa {
    margin-right: 7px;
}


/* PRODUCT MESSAGE */

.bm-b2b-product-message {
    display: block;
    min-height: 0;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.4;
}

.bm-b2b-product-message:empty {
    display: none;
}

.bm-b2b-product-message.is-success {
    color: #358e15;
}

.bm-b2b-product-message.is-error {
    color: #a94442;
}


/* TABLET / NARROW DESKTOP */

@media (max-width: 900px) {

    .bm-b2b-order-row {
        padding: 11px 12px;
    }

    .bm-b2b-order-prices {
        grid-template-columns: minmax(120px, 1fr) minmax(58px, auto);
        padding-right: 10px;
        column-gap: 6px;
    }
}


/*
 * MOBILE
 *
 * Variant
 * Adviesprijs                    €xx,xx
 * Uw prijs                       €xx,xx
 *                           [ - ][ 0 ][ + ]
 */

@media (max-width: 600px) {

    .bm-b2b-order {
        margin-top: 10px;
    }

    .bm-b2b-order-row {
        padding: 12px;
    }

    .bm-b2b-order-info {
        margin-bottom: 10px;
    }

    .bm-b2b-order-label {
        font-size: 14px;
    }

    .bm-b2b-order-controls {
        grid-template-columns: 34px 48px 34px;
        justify-content: end;
        align-items: center;
        row-gap: 10px;
    }

    .bm-b2b-order-prices {
        grid-column: 1 / -1;
        grid-row: 1;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
        padding-right: 0;
        column-gap: 10px;
        row-gap: 7px;
    }

    .bm-b2b-order-minus {
        grid-column: 1;
        grid-row: 2;
    }

    .bm-b2b-order-quantity {
        grid-column: 2;
        grid-row: 2;
    }

    .bm-b2b-order-plus {
        grid-column: 3;
        grid-row: 2;
    }

    .bm-b2b-order-advice-price {
        font-size: 13px;
    }

    .bm-b2b-order-price {
        font-size: 16px;
    }

    .info > a.cart {
        width: 100%;
        margin-top: auto !important;
    }
}
