/* Only the products scroll. The existing WooCommerce promotion, totals and
   checkout nodes stay in the same component and keep their event handlers. */
.nf-purchase-sheet :is([data-nf-spec-cart-scroll],[data-family-cart-scroll]):has(.nf-sheet-cart-grid .woocommerce-cart-form),
.nf-purchase-sheet .nf-embedded-cart:has(.woocommerce-cart-form),
.nf-purchase-sheet .nf-embedded-cart :is(.noofno-visual-cart-drawer__panel,[data-noofno-visual-cart-body],.nf-sheet-cart-grid,.nf-sheet-cart-grid .woocommerce):has(.woocommerce-cart-form) {
    display:flex;
    flex:1 1 0;
    flex-direction:column;
    min-height:0;
    min-width:0;
    overflow:hidden;
}
.nf-purchase-sheet .nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form {
    flex:1 1 0;
    min-height:0;
    margin:0;
    overflow:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
}
.nf-purchase-sheet .nf-embedded-cart .nf-sheet-cart-grid :is(.cart-collaterals,.noofno-gift-row) {
    flex:none;
}
.nf-purchase-sheet .nf-embedded-cart .nf-sheet-cart-grid .noofno-gift-row {
    display:block;
    padding:5px 8px 4px;
    border-top:2px solid #c2d3c8;
    background:#eef3ef;
}
.nf-sheet-cart-grid .noofno-gift-row .noofno-gift-row-copy {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:2px 5px;
    min-height:23px;
    margin:0 0 2px;
    color:#234335;
    font-size:.73rem;
    line-height:1.2;
}
.nf-sheet-cart-grid .noofno-gift-row-copy .noofno-gift-row-status {
    flex-basis:100%;
    order:2;
}
.nf-sheet-cart-grid .noofno-gift-row-copy .noofno-gift-row-status[hidden] {display:none}
.nf-sheet-cart-grid button.noofno-gift-info-toggle {
    display:inline-flex;
    align-items:center;
    gap:5px;
    margin:0 0 0 auto;
    padding:0;
    min-height:24px;
    border:0;
    background:none;
    box-shadow:none;
    color:#234c39;
    font:inherit;
    font-weight:650;
    white-space:nowrap;
    text-decoration:underline;
    text-underline-offset:2px;
    cursor:pointer;
}
.nf-sheet-cart-grid button.noofno-gift-info-toggle::after {
    content:"";
    width:6px;
    height:6px;
    border-right:1.5px solid currentColor;
    border-bottom:1.5px solid currentColor;
    transform:translateY(-1px) rotate(45deg);
}
.nf-sheet-cart-grid button.noofno-gift-info-toggle[aria-expanded="true"]::after {
    transform:translateY(1px) rotate(225deg);
}
.nf-sheet-cart-grid button.noofno-gift-info-toggle:focus-visible,
.nf-sheet-cart-grid .noofno-gift-info:focus-visible {
    outline:2px solid #50715d;
    outline-offset:2px;
}
.nf-sheet-cart-grid .noofno-gift-info[hidden] {display:none}
.nf-sheet-cart-grid .noofno-gift-info {
    box-sizing:border-box;
    max-height:180px;
    max-height:min(30dvh,180px);
    margin-top:4px;
    overflow:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    border:1px solid #cbdacf;
    border-radius:6px;
    background:#fff;
    padding:8px 10px;
    color:#294538;
    font-size:.73rem;
    line-height:1.35;
    animation:nf-gift-info-enter .16s ease-out;
}
.nf-sheet-cart-grid .noofno-gift-info p {margin:0 0 5px}
.nf-sheet-cart-grid .noofno-gift-info-summary {font-weight:650}
.nf-sheet-cart-grid .noofno-gift-info ul {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px 15px;
    margin:6px 0 0;
    padding-left:16px;
    list-style:disc;
}
.nf-sheet-cart-grid .noofno-gift-info li {margin:0}
@keyframes nf-gift-info-enter {
    from {opacity:0;transform:translateY(-4px)}
    to {opacity:1;transform:translateY(0)}
}
@media(prefers-reduced-motion:reduce) {
    .nf-sheet-cart-grid .noofno-gift-info {animation:none}
}
.nf-sheet-cart-grid .noofno-gift-row .noofno-gift-row-list {
    --gift-gap:6px;
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:calc((100% - 4 * var(--gift-gap)) / 5);
    align-items:stretch;
    gap:var(--gift-gap);
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scroll-snap-type:x proximity;
    scrollbar-width:thin;
    padding:1px 1px 3px;
}
.nf-sheet-cart-grid .noofno-gift-row button.noofno-gift-row-card {
    display:flex;
    min-width:0;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:1px;
    padding:2px 2px 3px!important;
    background:#fff;
    text-align:center;
    scroll-snap-align:start;
}
.nf-sheet-cart-grid .noofno-gift-row button.noofno-gift-row-card:focus-visible {outline-offset:-2px}
.nf-sheet-cart-grid .noofno-gift-row button.noofno-gift-row-card.is-selected {
    order:-1;
    border-color:#50715d;
    background:#e2ece4;
}
.nf-sheet-cart-grid .noofno-gift-row-card .noofno-gift-row-link,
.nf-sheet-cart-grid .noofno-gift-row-card .noofno-gift-row-link img {
    flex:none;
    width:clamp(40px,12.5vw,62px)!important;
    height:clamp(40px,12.5vw,62px)!important;
    object-fit:contain;
    border-radius:4px;
}
.nf-sheet-cart-grid .noofno-gift-row-card .noofno-gift-row-choice {
    width:100%;
    min-height:0;
    min-width:0;
    padding:0!important;
    justify-content:center;
    gap:0;
    text-align:center;
    line-height:1.15;
}
.nf-sheet-cart-grid .noofno-gift-row--compact .noofno-gift-row-choice > span {display:none}
.nf-sheet-cart-grid .noofno-gift-row-choice small {
    color:#28523f;
    font-size:10px;
    line-height:1.2;
}
.nf-sheet-cart-grid .noofno-gift-row-card.is-selected .noofno-gift-row-choice small {font-weight:700}
.nf-sheet-cart-grid .noofno-gift-row--compact .noofno-gift-row-none .noofno-gift-row-choice > span {
    display:block;
    font-size:10px;
}
.nf-sheet-cart-grid .noofno-gift-row--compact .noofno-gift-row-none:not(.is-selected) .noofno-gift-row-choice small {display:none}
.noofno-promotions-enabled [data-noofno-visual-cart-body] .nf-sheet-cart-grid .cart_totals.has-shipping-copy {
    grid-template-columns:minmax(0,1fr) auto;
    gap:5px!important;
    padding:5px 8px!important;
    border-top:1px solid #c2d3c8;
    background:#f5f7f4;
    min-height:30px;
}
.noofno-promotions-enabled [data-noofno-visual-cart-body] .nf-sheet-cart-grid .has-shipping-copy .noofno-cart-total-breakdown {
    flex-direction:row;
    flex-wrap:wrap;
    justify-content:flex-end;
    align-items:baseline;
    gap:3px 8px!important;
}
.nf-sheet-cart-grid .noofno-cart-total-breakdown > span:first-child {order:2}
.nf-sheet-cart-grid .has-compact-shipping-copy .noofno-shipping-copy :is(.noofno-shipping-rule,.noofno-shipping-benefit) {display:none}
.nf-sheet-cart-grid .has-compact-shipping-copy .noofno-shipping-copy small {
    margin:0;
    color:#3a5d49;
    font-size:10px;
    line-height:1.15;
}

.nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table tbody {
    display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:6px;
    width:100%;max-width:100%;padding:8px;overflow:visible;scroll-snap-type:none;
}
.nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table tbody tr.cart_item {
    display:flex;flex-direction:column;align-self:stretch;align-items:stretch;
    width:auto;min-width:0;height:auto!important;min-height:0!important;max-height:none!important;padding:5px 3px;background:white;
    border:1px solid #dbe5df;border-radius:6px;box-shadow:none;
}
.nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table tbody tr:not(.cart_item) {
    grid-column:1 / -1;
}
.nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table .product-thumbnail a {
    width:100%;margin-inline:0;
}
.nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table .product-thumbnail img {
    object-fit:contain;background:white;
}
.nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table .product-name {
    display:flex!important;flex:1 0 auto;flex-direction:column;align-items:stretch;justify-content:start;
    position:static!important;height:auto!important;max-height:none!important;overflow:visible;
    min-height:3.75em;margin:4px 0 0;white-space:normal;
    color:#263d35;font:inherit;font-size:.74rem;line-height:1.25;text-align:center!important;
}
.nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table .product-name a[data-nf-cart-title] {
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
    position:static!important;flex:none;height:2.5em!important;min-height:2.5em;max-height:2.5em;overflow:hidden;white-space:normal;overflow-wrap:anywhere;
    color:#233c33;text-decoration:underline;text-underline-offset:2px;font-weight:650;
}
.nf-embedded-cart .nf-sheet-cart-grid .nf-sheet-cart-size {
    position:static!important;display:block;flex:none;margin-top:3px;color:#405c50;font-size:.71rem;line-height:1.2;
}
.nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table td.product-quantity {flex:0 0 auto}
.nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table td.product-quantity .quantity {
    display:flex!important;width:100%;max-width:64px;min-width:0;margin:auto!important;
}
.nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table td.product-quantity .quantity :is(button,input.qty) {
    flex:1 1 0;width:0!important;min-width:0!important;min-height:24px;padding:0!important;
}
.nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table td.product-subtotal {
    position:static!important;flex:0 0 auto;height:auto!important;min-height:0!important;
    margin:4px 0 0;padding:0!important;transform:none!important;
    text-align:center!important;font-size:.72rem;line-height:1.3;
}

@media (max-width:767px) {
    .nf-sheet-cart-grid .noofno-gift-row .noofno-gift-row-list {
        --gift-gap:4px;
    }
    .nf-sheet-cart-grid .noofno-gift-row-card .noofno-gift-row-choice {
        font-size:10px;
    }
    .nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table tbody {
        grid-template-columns:repeat(5,minmax(0,1fr));
        gap:4px;
        padding:5px;
    }
    .nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table tbody tr.cart_item {
        gap:3px;
        padding:3px 2px;
    }
    .nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table td.product-thumbnail {
        flex:none;
        min-height:0!important;
        height:44px!important;
        padding:0!important;
    }
    .nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table .product-thumbnail :is(a,img) {
        width:100%!important;
        height:44px!important;
        margin:0!important;
    }
    .nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table .product-name {
        flex:1 0 auto;
        margin:0;
        min-height:0;
        font-size:.65rem;
        line-height:1.15;
    }
    .nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table .product-name a[data-nf-cart-title] {
        height:2.3em!important;
        min-height:2.3em;
        max-height:2.3em;
    }
    .nf-embedded-cart .nf-sheet-cart-grid .nf-sheet-cart-size {
        margin-top:2px;
        font-size:.62rem;
    }
    .nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table td.product-quantity {
        min-height:0!important;
        margin:0;
        padding:0!important;
    }
    .nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table td.product-quantity .quantity :is(button,input.qty) {
        min-height:25px;
    }
    .nf-embedded-cart .nf-sheet-cart-grid .woocommerce-cart-form table.shop_table td.product-subtotal {
        margin:0;
        font-size:.66rem;
    }
}
