/* The winkelwagen's additions to live's stylesheet, emitted by Views/brand/webshop/Winkelwagen.cshtml.
   brand-webshop.css stays live's main.css verbatim; what the rebuild changes in behaviour lives here.
   px only, as elsewhere on the platform. */

/* Live's change, remove and info controls are links into a Bootstrap modal or a GET that changes the
   winkelwagen; here they are buttons — a popover, or a POST — so they lose the button chrome and keep
   live's look. */
.cart-table__change,
.cart-table__remove,
.cart-table__info,
.cart__empty {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    line-height: inherit;
}

/* The remove button keeps live's own size for its icon; the rest read as the text around them. */
.cart-table__change,
.cart-table__info,
.cart__empty {
    font-size: inherit;
}

.cart-table__remove {
    color: #d00;
}

.cart-table__info {
    color: #aaa;
}

.cart__empty {
    color: #524b45;
    text-decoration: underline;
}

/* Live's "toevoegen" and "wijzigen" modals, as popovers: the size of Bootstrap 4's .modal-dialog. */
.add-modal[popover] {
    border: 0;
    padding: 0;
    background: transparent;
    width: calc(100% - 20px);
    max-width: 500px;
    max-height: calc(100% - 40px);
    overflow: auto;
}

.add-modal[popover]::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.add-modal .add-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: 0;
    padding: 4px;
    cursor: pointer;
    color: #524b45;
}

/* Why a click was not added, or a line no longer sold: live's own message colour (its actiecode slot). */
.cart__notice,
.cart__unavailable {
    color: #e80;
}

/* Ticket 16: a bewaarde bestelling saved or restored — done, not refused. The shop's green, darkened to read on white. */
.cart__confirm {
    color: #4f8a2c;
    font-weight: 600;
}

/* A container line's meelevering and matrassen (ticket 10): live's has-extras selects, and below the container the
   extras as lines of their own, indented so they read as belonging to it. */
.cart-table__extra-line .cart-table__name {
    padding-left: 24px;
}

/* One rule under a container and all it carries, not under each. */
.cart-table tr:has(+ .cart-table__extra-line) td {
    border-bottom: 0;
}

.cart-table__extra-line .u-text-lg {
    font-size: 16px;
}

/* Ticket 11: an entered actiecode's status, its "Verwijderen" beside it. "Actiecode invoeren" itself is a .cart__empty
   button opening the actiecode popover (winkelwagen-uitlijning 03). */
.cart__actiecode-status .cart__empty {
    margin-left: 8px;
}

/* Winkelwagen-uitlijning 01: the add buttons in a row of their own under the lines. The row's cells keep the shop's
   line rule, so the rule under them is exactly as wide as the lines'. */
.cart__add {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
}

/* From 992px the remove column shows, at the shop's fixed 110px (.cart-table__actions). The buttons step into it, so they
   end at the box edge, flush with Gegevens invullen. Change this with that width. */
@media (min-width: 992px) {
    .cart__add {
        margin-right: -110px;
    }
}

/* Winkelwagen-uitlijning 01: the next step. Leegmaken and Bewaar bestelling on the left, Gegevens invullen on the right,
   everything on the button's middle. A row too narrow for both wraps the button below, as a whole. */
.cart__next {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.cart__next-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
}

/* Winkelwagen-uitlijning 02: the foot on a phone. Below 768px the shop lays the table out as blocks. */
@media (max-width: 767px) {
    /* The add buttons stacked and full width. In its own body the add row is that body's last row, which the shop
       shades as a line: this row is not one. `:last-child` lifts the rule above the shop's shading rules, which tie
       with it otherwise. */
    .cart-table tbody tr.cart-table__add:last-child td {
        background: none;
        padding: 16px;
    }

    .cart__add {
        flex-direction: column;
    }

    .cart__add .btn {
        width: 100%;
        justify-content: center;
    }

    /* The actiecode slot is alone in the totals' first row, so the shop's 110px for a row's last cell (its amount)
       squeezed it until "Actiecode invoeren" wrapped. It takes the width above the totals instead. The `tr` lifts the
       rule above the shop's `.cart-table tfoot td:last-child`, which would tie with it otherwise. */
    .cart-table tfoot tr td.cart__actiecode-slot {
        width: 100%;
        float: none;
        text-align: left;
        padding: 16px 16px 8px;
    }

    /* The next step stacks: Gegevens invullen first and full width, then the two links, a line each. It can't be one
       row here: the three need about 590px. The shop's mobile-block only widens the button below 576px. The order is
       visual only: the markup keeps desktop's, so keyboard focus still reaches the two links before the button
       (accepted with the user, 2026-11-12). */
    .cart__next {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .cart__next .btn {
        width: 100%;
    }

    .cart__next-links {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Postcode-lock 02: the leegmaken confirmation's two choices, Leegmaken first. */
.leegmaken__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-top: 20px;
}
