/*
 * DXPX WooCommerce Modern Checkout - Redesign V3 (Vuexy Style) - Cart Component
 *
 * Version: 4.1.0
 */

/* --- Cart Header --- */
.order-summary-container > h3 {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--dxpx-border-color);
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--dxpx-secondary-text-color);
}

/* --- Cart Items List --- */
.dxpx-modern-cart-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dxpx-modern-cart-item {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--dxpx-border-color);
    position: relative;
    transition: background-color 0.2s;
}
.dxpx-modern-cart-item:hover {
    background-color: #fdfdfd;
}

.dxpx-cart-item-main {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
}

.dxpx-item-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--dxpx-border-radius);
    border: 1px solid var(--dxpx-border-color);
}
.woocommerce-placeholder-image {
    width: 80px;
    height: 80px;
    background-color: var(--dxpx-background-color);
    border-radius: var(--dxpx-border-radius);
    border: 1px solid var(--dxpx-border-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23dbdcdf'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375 0 11-.75 0 .375 0 01.75 0z' /%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 40%;
}

.dxpx-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dxpx-item-name {
    font-weight: 600;
    color: var(--dxpx-heading-color);
    text-decoration: none;
    font-size: 1rem;
}
.dxpx-item-name:hover {
    color: var(--dxpx-primary-color);
}

.dxpx-quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--dxpx-border-color);
    border-radius: var(--dxpx-border-radius);
    width: fit-content;
}
.dxpx-quantity-btn {
    background: transparent;
    border: none;
    color: var(--dxpx-text-color);
    padding: 0.25rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dxpx-quantity-btn:hover { 
    background-color: var(--dxpx-primary-color);
    color: #fff;
}
.dxpx-quantity-btn .dxpx-icon {
    width: 1rem;
    height: 1rem;
}

.dxpx-quantity-display {
    padding: 0 0.25rem;
    font-size: 1rem;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
    border-left: 1px solid var(--dxpx-border-color);
    border-right: 1px solid var(--dxpx-border-color);
}

.dxpx-item-price-and-remove {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
.dxpx-item-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dxpx-heading-color);
}
.dxpx-remove-item {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dxpx-text-color);
    font-size: 0.875rem;
    padding: 0.2rem;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.dxpx-remove-item .dxpx-icon {
    width: 1rem;
    height: 1rem;
}
.dxpx-remove-item:hover { 
    color: #fff;
    background-color: var(--dxpx-error-color); 
}


/* --- Cart Collaterals (Totals, Coupon) --- */
.cart-collaterals {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.coupon-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-totals {
    border-top: 1px solid var(--dxpx-border-color);
    padding-top: 1.5rem;
}

.coupon {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}
.coupon input[type="text"] {
    flex-grow: 1;
    min-width: 100px;
    /* Uses styles from billing-component.css */
}
.coupon button {
    padding: 0.8rem 1.25rem;
    font-weight: 500;
    background: var(--dxpx-primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--dxpx-border-radius);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}
.coupon button:hover:not(:disabled) { 
	background-color: var(--dxpx-primary-hover-color);
	box-shadow: 0 4px 12px -4px var(--dxpx-primary-color);
}

.applied-coupons h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

.applied-coupons ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.applied-coupons li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #e4f3da;
    padding: 0.75rem 1rem;
    border-radius: var(--dxpx-border-radius);
    border: 1px solid var(--dxpx-border-color);
    gap: 1rem;
}

.applied-coupons .coupon-details {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.applied-coupons .coupon-info,
.applied-coupons .coupon-value {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.applied-coupons .coupon-label,
.applied-coupons .coupon-discount-label {
    font-size: 0.75rem;
    color: var(--dxpx-secondary-text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.applied-coupons .coupon-code {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dxpx-heading-color);
}

.applied-coupons .coupon-amount {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dxpx-success-color); /* Use success color for discount */
}

.applied-coupons .remove-coupon-btn {
    background: transparent;
    border: none;
    color: var(--dxpx-secondary-text-color);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    transition: all 0.2s;
}

.applied-coupons .remove-coupon-btn .dxpx-icon {
    width: 1rem;
    height: 1rem;
}

.applied-coupons .remove-coupon-btn:hover {
    background-color: var(--dxpx-error-color);
    color: #fff;
}

/* --- Totals --- */
.cart-totals {
    font-size: 1rem;
    width: 100%;
}
.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
}
.total-row:last-child {
    font-size: 1.25rem;
    font-weight: 600;
    border-top: 1px solid var(--dxpx-border-color);
    margin-top: 1rem;
    padding-top: 1rem;
}
.total-row .total-label,
.total-row .total-amount {
    color: var(--dxpx-heading-color);
}

/* Hide recommendations for now to achieve a cleaner look */
.dxpx-inline-recommendation-row {
    display: none;
}

/* --- Item Updating State --- */
.dxpx-modern-cart-item {
    transition: opacity 0.4s ease, background-color 0.2s;
}

.dxpx-modern-cart-item.dxpx-updating {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.dxpx-modern-cart-item.dxpx-updating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--dxpx-primary-color);
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}