details.wcdo-purchase-list {
    --wcdo-list-height: 480px;
    display: block;
    width: 100%;
    min-width: 0;
    margin: 8px 0;
    border: 1px solid #dedede;
    border-radius: 7px;
    background: #fff;
    color: #303030;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}
.wcdo-purchase-list > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}
.wcdo-purchase-list > summary::-webkit-details-marker { display: none; }
.wcdo-purchase-list > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.wcdo-purchase-list-title { font-weight: 600; }
.wcdo-purchase-list-preview {
    grid-column: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    color: #666;
    font-size: 12px;
}
.wcdo-purchase-list-preview > span { display: block; }
.wcdo-purchase-list-toggle { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12px; color: #666; }
.wcdo-purchase-list-toggle::after { content: ' ▾'; }
.wcdo-purchase-list[open] .wcdo-purchase-list-toggle::after { content: ' ▴'; }
.wcdo-purchase-list-body { max-height: var(--wcdo-list-height); overflow: auto; overscroll-behavior: contain; padding: 0 12px 12px; border-top: 1px solid #eee; }
.wcdo-purchase-list-floating > .wcdo-purchase-list-body {
    position: fixed;
    inset: auto;
    box-sizing: border-box;
    margin: 0;
    border: 1px solid #dedede;
    border-radius: 7px;
    background: #fff;
    color: #303030;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
    z-index: 100001;
}
.wcdo-purchase-list-floating > .wcdo-purchase-list-body::backdrop { background: transparent; pointer-events: none; }
.wcdo-purchase-list-section { margin-top: 12px; }
.wcdo-purchase-list-section > h4,
.wcdo-purchase-list-section > h5 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: inherit; }
.wcdo-purchase-list .wcdo-purchase-list-rows { margin: 0; }
.wcdo-purchase-list-row { display: grid; grid-template-columns: minmax(70px, 30%) minmax(0, 1fr); gap: 8px; padding: 4px 0; }
.wcdo-purchase-list .wcdo-purchase-list-label { margin: 0; color: #727272; font-weight: 400; }
.wcdo-purchase-list .wcdo-purchase-list-value { margin: 0; min-width: 0; color: inherit; }
.wcdo-purchase-list-value a { text-decoration: underline; }
.wcdo-purchase-list-value p { margin: 0 0 4px; }
details.wcdo-purchase-list--mini,
.widget_shopping_cart .wcdo-purchase-list { --wcdo-list-height: 280px; }
details.wcdo-purchase-list--checkout,
.wcdo-purchase-list-checkout,
.woocommerce-checkout-review-order .wcdo-purchase-list,
.wc-block-checkout .wcdo-purchase-list { --wcdo-list-height: 360px; }
dl.variation > dt.variation-wcdo-purchase-list { display: none !important; }
dl.variation > dd.variation-wcdo-purchase-list { display: block !important; float: none !important; width: 100%; margin: 0 !important; }
.wcdo-purchase-list-ready.wcdo-purchase-list-has-data .wc-block-components-product-details:not(.wc-block-components-product-details ~ .wc-block-components-product-details) { display: none; }
.wcdo-purchase-list-mount { min-width: 0; width: 100%; }

/* Readable thumbnails in both native Blocks and classic cart/checkout templates. */
.wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image {
    width: 112px;
    min-width: 112px;
    vertical-align: top;
}
.wc-block-cart .wc-block-cart-item__image img,
.woocommerce-cart .woocommerce-cart-form table.cart td.product-thumbnail img {
    display: block;
    width: 96px;
    height: 96px;
    max-width: none;
    object-fit: contain;
}
.wc-block-checkout .wc-block-components-order-summary-item { align-items: flex-start; }
.wc-block-checkout .wc-block-components-order-summary-item__description { padding-top: 0; }
.wc-block-checkout details.wcdo-purchase-list > summary { grid-template-columns: minmax(0, 1fr); padding-right: 8px; padding-left: 8px; }
.wc-block-checkout .wcdo-purchase-list-title { grid-column: 1; grid-row: 1; }
.wc-block-checkout .wcdo-purchase-list-preview { grid-column: 1; grid-row: 2; }
.wc-block-checkout .wcdo-purchase-list-toggle { grid-column: 1; grid-row: 3; justify-self: end; }
.wc-block-checkout .wc-block-components-order-summary-item__image {
    width: 72px;
    max-width: 72px;
    flex: 0 0 72px;
    align-self: flex-start;
    padding-top: 0;
    margin-top: 0;
}
.wc-block-checkout .wc-block-components-order-summary-item__image img,
.woocommerce-checkout-review-order-table .product-item-thumbnail img {
    width: 72px;
    height: 72px;
    max-width: none;
    object-fit: contain;
}
.woocommerce-checkout-review-order-table .product-item-thumbnail {
    width: 72px;
    margin-top: 0;
    align-self: flex-start;
}
.woocommerce-checkout-review-order-table .product-item-thumbnail,
.woocommerce-checkout-review-order-table .cg-checkout-table-product-name { padding-top: 0; vertical-align: top; }
@media (max-width: 768px) {
    .woocommerce-cart .wp-block-woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row {
        grid-template-columns: 80px minmax(0, 1fr);
    }
    .woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
        width: 80px;
        min-width: 80px;
        padding-right: 0;
    }
    .woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img,
    .woocommerce-cart .woocommerce-cart-form table.cart td.product-thumbnail img { width: 80px; height: 80px; }
    .wc-block-checkout .wc-block-components-order-summary-item__image {
        width: 64px;
        max-width: 64px;
        flex-basis: 64px;
    }
    .wc-block-checkout .wc-block-components-order-summary-item__image img,
    .woocommerce-checkout-review-order-table .product-item-thumbnail img { width: 64px; height: 64px; }
    .woocommerce-checkout-review-order-table .product-item-thumbnail { width: 64px; }
}
@media (max-width: 480px) {
    .wcdo-purchase-list > summary { padding: 9px 10px; }
    .wcdo-purchase-list-preview { grid-column: 1 / -1; }
    .wcdo-purchase-list-toggle { grid-row: 1; }
    .wcdo-purchase-list-body { padding-right: 10px; padding-left: 10px; }
    .wcdo-purchase-list-row { grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 5px 0; }
}
