/*
 * Minicart A/B test, variation "minicart-v2" (Noibu test 707).
 * Every rule is scoped to html.nb-test-minicart-v2, so control visitors see no change.
 * Remove this file when the test ends.
 */

html:not(.nb-test-minicart-v2) .swell-mc-v2-promo {
    display: none !important;
}

/* ---------- free delivery bar ---------- */

html.nb-test-minicart-v2 #minicart-content-wrapper .swell-mc-v2-promo {
    margin: 0;
    border-bottom: 1px solid #e6ecee;
}

html.nb-test-minicart-v2 #minicart-content-wrapper .swell-mc-v2-promo[hidden] {
    display: none;
}

html.nb-test-minicart-v2 .swell-mc-v2-free {
    padding: 10px 16px;
    font-size: 13px;
    color: #3d4c53;
}

html.nb-test-minicart-v2 .swell-mc-v2-free p {
    margin: 0 0 5px;
}

html.nb-test-minicart-v2 .swell-mc-v2-free strong {
    color: #1f2a30;
}

html.nb-test-minicart-v2 .swell-mc-v2-free .swell-mc-v2-free-done {
    color: #14804a;
    font-weight: 600;
}

html.nb-test-minicart-v2 .swell-mc-v2-bar {
    height: 6px;
    background: #e6ecee;
    border-radius: 3px;
    overflow: hidden;
}

html.nb-test-minicart-v2 .swell-mc-v2-bar span {
    display: block;
    height: 6px;
    background: #14804a;
    border-radius: 3px;
}

html.nb-test-minicart-v2 .swell-mc-v2-free .swell-mc-v2-footnote {
    margin: 4px 0 0;
    font-size: 11px;
    line-height: 1.3;
    color: #5b6b72;
}

/* ---------- simpler item rows ---------- */

html.nb-test-minicart-v2 #minicart-content-wrapper .product-item .product-links .action.edit {
    display: none;
}

/* ---------- footer: subtotal, then "Checkout" and "View basket" ---------- */

html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px 16px;
}

/* Express payment buttons stay on the basket and checkout pages */
html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .actions > div.primary > :not(a) {
    display: none !important;
}

html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .subtotal {
    order: 1;
}

html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .actions {
    order: 2;
}

/* No discount code box in the minicart: codes are entered on the basket or checkout page */
html.nb-test-minicart-v2 #minicart-content-wrapper .mini-cart-coupon-code-container {
    display: none !important;
}

/* The template renders an empty .actions block before the real one: hide it */
html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .actions:not(:has(*)) {
    display: none;
}

html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .subtotal {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0;
}

html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .actions,
html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .actions > div.primary {
    margin: 0;
    padding: 0;
}

html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .actions > div.primary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .actions > div.primary > a.action.checkout {
    flex: none;
    width: 100%;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .actions > div.primary > a.action.secondary.checkout {
    order: 2;
    background: #ffffff;
    border: 2px solid #0b6e80;
    color: #0b6e80;
    box-shadow: none;
}

html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .actions > div.primary > a.action.primary.checkout {
    order: 1;
    flex-direction: row;
}

/* Lock icon inline with the label rather than stacked above it */
html.nb-test-minicart-v2 #minicart-content-wrapper .offcanvas-footer .actions > div.primary > a.action.primary.checkout > * {
    display: inline-flex;
    margin: 0;
}

/* The chat button sits over the basket buttons: hide it while the basket is open */
html.nb-test-minicart-v2 body:has(#offCanvasRight.is-open) #m2chat-host,
html.nb-test-minicart-v2 body:has(#offCanvasRight.is-open) #m2chat-trigger,
html.nb-test-minicart-v2 body:has(#offCanvasRight.is-open) .dfd-chat-bubble,
html.nb-test-minicart-v2 body:has(#offCanvasRight.is-open) [class*="dfd-chat-bubble"] {
    display: none !important;
}

/* ---------- mobile: near full-screen basket ---------- */

@media (max-width: 39.99em) {
    html.nb-test-minicart-v2 #offCanvasRight.position-right {
        width: 100%;
        max-width: 100%;
        top: 36px;
        height: calc(100% - 36px);
        border-radius: 16px 16px 0 0;
    }

    html.nb-test-minicart-v2 #offCanvasRight.position-right:not(.is-open) {
        transform: translateX(100%);
    }
}
