/**
 * Custom Checkout Order Review Styles
 */

.edelweiss-order-review {
    width: 100%;
    margin-bottom: 20px;
}

.edelweiss-order-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #ebebeb;
    align-items: flex-start;
}

.edelweiss-order-item.odd {
    background-color: #ffffff;
}

.edelweiss-order-item.even {
    background-color: #f7f7f7;
}

.edelweiss-order-item-thumbnail {
    flex: 0 0 80px;
    margin-right: 15px;
}

.edelweiss-order-item-thumbnail img {
    width: 80px;
    height: auto;
    display: block;
    border-radius: 4px;
}

.edelweiss-order-item-content {
    flex: 1;
}

.edelweiss-order-item-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.edelweiss-order-item-name {
    font-weight: 700;
    font-size: 1rem;
    color: #333;
    padding-right: 10px;
}

.edelweiss-order-item-total {
    font-weight: 700;
    white-space: nowrap;
}

.edelweiss-order-item-meta {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.edelweiss-order-item-meta dl.variation {
    margin: 5px 0 0 0;
    display: block;
}

.edelweiss-order-item-meta dl.variation dt {
    float: left;
    clear: left;
    margin-right: 5px;
    font-weight: 600;
}

.edelweiss-order-item-meta dl.variation dd {
    margin-bottom: 2px;
}

.edelweiss-order-item-quantity {
    display: block;
    margin-bottom: 3px;
    font-style: italic;
}

/* Totals Area */
.edelweiss-order-review-totals {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ebebeb;
    border-radius: 4px;
}

.edelweiss-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f1f1;
}

.edelweiss-total-row:last-child {
    border-bottom: none;
}

.edelweiss-total-row .label {
    font-weight: 500;
}

.edelweiss-total-row.edelweiss-grand-total {
    border-top: 2px solid #333;
    margin-top: 5px;
    padding-top: 15px;
    font-size: 1.2rem;
}

.edelweiss-total-row.edelweiss-grand-total .label,
.edelweiss-total-row.edelweiss-grand-total .value {
    font-weight: 800;
}

.edelweiss-tax-note {
    text-align: right;
    margin-top: 5px;
    color: #777;
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .edelweiss-order-item-thumbnail {
        display: none;
    }
}

/**
 * Hide default WooCommerce/Avada table
 * We want to replace it entirely with our custom structure.
 */
.woocommerce-checkout-review-order-table,
#order_review table.shop_table.woocommerce-checkout-review-order-table {
    display: none !important;
}

/* Ensure our review is visible */
.edelweiss-order-review {
    display: block !important;
}
