/* WooCommerce Checkout Customizations */

/* Order Review Table Styling */
.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* Header styling */
.woocommerce-checkout-review-order-table thead th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* Left column alignment */
.woocommerce-checkout-review-order-table .product-name {
    text-align: left;
    width: 65%;
    padding-right: 20px;
}

/* Right column alignment */
.woocommerce-checkout-review-order-table .product-total {
    text-align: right;
    font-weight: 500;
    width: 35%;
}

/* Footer totals alignment */
.woocommerce-checkout-review-order-table tfoot th {
    text-align: left;
    font-weight: 500;
    color: #555;
}

.woocommerce-checkout-review-order-table tfoot td {
    text-align: right;
    font-weight: 500;
}

/* Remove button styling */
.woocommerce-checkout-review-order-table .order-item-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    margin-left: 15px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.woocommerce-checkout-review-order-table .order-item-remove:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(231, 76, 60, 0.3);
}

.woocommerce-checkout-review-order-table .order-item-remove:active {
    transform: translateY(0);
}

.woocommerce-checkout-review-order-table .order-item-remove:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Product name styling */
.woocommerce-checkout-review-order-table .product-name {
    font-size: 14px;
    line-height: 1.4;
}

.woocommerce-checkout-review-order-table .product-quantity {
    color: #666;
    font-size: 13px;
}

/* Subtotal and Total rows */
.woocommerce-checkout-review-order-table .cart-subtotal th,
.woocommerce-checkout-review-order-table .cart-subtotal td {
    font-size: 14px;
    color: #666;
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
    border-top: 2px solid #ddd;
    background: #f8f9fa;
}

/* Hover effects for rows */
.woocommerce-checkout-review-order-table tbody tr:hover {
    background: #f8f9fa;
}

/* Responsive design */
@media (max-width: 768px) {
    .woocommerce-checkout-review-order-table .product-name {
        width: 100%;
        display: block;
        margin-bottom: 5px;
    }

    .woocommerce-checkout-review-order-table .product-total {
        width: 100%;
        text-align: left;
        font-size: 14px;
        font-weight: 600;
    }

    .woocommerce-checkout-review-order-table .order-item-remove {
        margin-left: 0;
        margin-top: 10px;
        display: inline-block;
    }

    .woocommerce-checkout-review-order-table th,
    .woocommerce-checkout-review-order-table td {
        padding: 10px;
    }
}

/* Additional checkout improvements */
.woocommerce-checkout #order_review_heading {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* Success/Error messages styling */
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-error,
.woocommerce-checkout .woocommerce-info {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Loading state for remove buttons */
.order-item-remove.loading {
    position: relative;
    color: transparent;
}

.order-item-remove.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}