.woocommerce-mini-cart__coupon {
    padding: 15px 0 !important;
    display: flex !important;
    justify-content: center !important;
    /* align-items: flex-start !important; */
    /* flex-direction: column !important; Ensure messages are displayed below the input field */
}

.coupon-input-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

.coupon-input-wrapper .input-text {
    flex: 1 !important;
    padding: 5px 10px !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
    border: 1px solid #ddd !important;
    border-radius: 0 !important;
    height: 30px !important;
    box-sizing: border-box !important;
}

.coupon-input-wrapper .button {
    height: 30px !important;
    cursor: pointer !important;
    margin-right: 10px !important;
    padding: 0 15px !important;
}

.coupon-message {
    color: red !important;
    font-size: 0.9em !important;
    margin-top: 5px !important;
}

.woocommerce-mini-cart__totals {
    text-align: right !important; /* Right align all text */
    position: relative !important; /* Position relative to use pseudo-element */
    padding-left: 10px !important; /* Left padding for internal text */
}

.woocommerce-mini-cart__totals:after {
    content: '';
    position: absolute;
    bottom: 0; /* Align line to the bottom */
    left: 0;
    right: 0;
    border-top: 1px solid #ddd; /* Line color and style */
}

.woocommerce-mini-cart__totals p {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: flex-end !important; /* Align items to the end */
    width: 100% !important;
}

.woocommerce-mini-cart__totals .subtotal,
.woocommerce-mini-cart__totals .discount {
    font-size: 0.9em !important; /* Smaller font size */
}

.woocommerce-mini-cart__totals .discount {
    color: green !important; /* Green color for the discount */
}

.woocommerce-mini-cart__totals .total {
    font-size: 1.2em !important; /* Larger font size for the total */
    font-weight: bold !important;
    border-top: 0 !important;
}

.woocommerce-mini-cart__totals .label {
    flex: 1 1 auto !important; /* Let the labels take up the necessary space */
    text-align: left !important; /* Ensure the text is left-aligned */
}

.woocommerce-mini-cart__totals .value {
    margin-right: 10px !important; /* Add space at the right side of the values */
    flex: 0 0 auto !important; /* Keep the values fixed in place */
}

.woocommerce-mini-cart__buttons a.checkout{
    margin-top: 0 !important;
}

.woocommerce-mini-cart__coupon-info {
    background-color: #000; /* Black background */
    color: #fff; /* White text */
    padding: 0; /* Remove padding */
    text-align: center; /* Center align the text */
    font-size: 0.9em; /* Smaller font size */
    margin: 0; /* Remove all margins */
}

/* Remove margin-bottom for p elements inside the mini-cart */
.woocommerce-mini-cart__coupon-info p,
.woocommerce-mini-cart__totals p,
.woocommerce-mini-cart__buttons p,
.woocommerce-mini-cart__empty-message p {
    margin-bottom: 0 !important; /* Override any other margins */
}

/* Add these styles to your theme's style.css or your plugin's CSS file */

.widget_shopping_cart_content {
    display: flex;
    flex-direction: column;
}

.woocommerce-mini-cart__totals {
    margin-top: auto;
}

.woocommerce-mini-cart__minimum-order-message {
    text-align: center;
    margin: 0;
    padding: 10px;
    background-color: #f8f8f8;
}

.woocommerce-mini-cart__buttons {
    margin: 0;
}

.woocommerce-mini-cart__buttons .checkout {
    display: block;
    width: 100%;
    text-align: center;
}

.woocommerce-mini-cart__buttons:empty,
.woocommerce-mini-cart__buttons:not(:has(.checkout:visible)) {
    display: none;
}

.woocommerce-mini-cart__minimum-order-message:empty {
    display: none;
}