/* Progress bar base styles */
.simple-cart-discount-progress {
    position: fixed;
    left: 0;
    right: 0;
    background: #f7f7f7;
    padding: 15px;
    text-align: center;
    z-index: 999999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding-right: 40px;
    width: 100%;
}

.simple-cart-discount-progress.mini_cart {
    height: auto !important;
}

/* Top position styles */
.simple-cart-discount-progress.top {
    top: 0;
}

/* Admin bar adjustment */
body.admin-bar .simple-cart-discount-progress.top {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .simple-cart-discount-progress.top {
        top: 46px;
    }
}

/* Bottom position styles */
.simple-cart-discount-progress.bottom {
    bottom: 0;
    top: auto;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.06);
}

/* Mobile styles */
@media screen and (max-width: 600px) {
    .simple-cart-discount-progress {
        padding: 10px;
        padding-right: 35px;
    }
}

/* Fixed position styles */
.simple-cart-discount-progress.bottom {
    position: fixed !important;
    z-index: 999999 !important;
}

/* Body padding adjustments */
body.has-top-discount-bar {
    padding-top: 65px;
}

body.has-bottom-discount-bar {
    padding-bottom: 65px;
}

/* Progress bar text styles */
.simple-cart-discount-progress-text {
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

/* Progress bar visual styles */
.simple-cart-discount-progress-bar {
    background: #eee;
    height: 5px;
    border-radius: 3px;
    margin: 0 auto;
    max-width: 800px;
    overflow: hidden;
}

.simple-cart-discount-progress-bar-fill {
    background: linear-gradient(to right, #ff6b6b, #ffa502);
    height: 100%;
    width: 0;
    transition: width 0.5s ease-in-out, background 0.3s ease-in-out;
    border-radius: 3px;
}

/* Success state styles */
.simple-cart-discount-progress-bar-fill.complete {
    background: linear-gradient(to right, #4CAF50, #45a049);
}

/* Close button styles */
.simple-cart-discount-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
}

.simple-cart-discount-close:hover {
    color: #666;
}

/* Cart page specific styles */
.simple-cart-discount-progress.cart_top {
    position: relative;
    margin: 1em 0;
    padding: 15px;
    border-radius: 4px;
    text-align: left;
    border: 1px solid #ddd;
    box-shadow: none;
    box-sizing: border-box;
    width: 100%;
}

.woocommerce-cart .simple-cart-discount-progress.cart_top .simple-cart-discount-progress-bar {
    margin: 10px 0 0;
    max-width: none;
    width: 100%;
}

/* Mini cart progress bar styles */
.widget_shopping_cart_content .simple-cart-discount-progress.mini_cart {
    position: relative;
    margin: 10px 0;
    font-size: 0.9em;
    /* Remove border and padding but keep background */
    border: none;
    padding: 0;
    background: #f7f7f7;  /* Default background color */
}

.widget_shopping_cart_content .simple-cart-discount-progress.mini_cart .simple-cart-discount-progress-text {
    margin-bottom: 8px;
    font-size: 0.9em;
    padding: 0 10px;  /* Add some padding to the text */
}

.widget_shopping_cart_content .simple-cart-discount-progress.mini_cart .simple-cart-discount-progress-bar {
    height: 4px;
    background: #eee;  /* Add background color to progress bar container */
    margin: 0;  /* Remove margin */
    border-radius: 0;  /* Remove border radius */
}

/* Storefront theme specific adjustments */
.storefront-handheld-footer-bar .cart .widget_shopping_cart_content .simple-cart-discount-progress.mini_cart {
    margin: 5px;
    font-size: 0.8em;
    background: #f7f7f7;  /* Ensure background color is applied */
}

/* Theme compatibility styles */
.widget_shopping_cart_content .simple-cart-discount-progress.mini_cart {
    clear: both;
    background: #f7f7f7;  /* Ensure background color is applied */
}

/* Plugin compatibility styles */
.xoo-wsc-container .simple-cart-discount-progress.mini_cart,
.elementor-menu-cart__container .simple-cart-discount-progress.mini_cart {
    margin: 10px;
    background: #f7f7f7;  /* Ensure background color is applied */
}

.simple-cart-discount-notice {
    margin: 0 0 20px 0;
    padding: 10px 0;
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
    display: inline-block;
}

/* Special handling for variation product pages */
.variations_form + .simple-cart-discount-notice {
    margin-top: 20px;
}

/* Add this new style for cart discount text */
.cart-discount td .amount {
    color: #4CAF50;  /* Green color */
    font-weight: bold;
}

.cart-discount th {
    color: #4CAF50;  /* Green color */
    font-weight: bold;
}

.excluded-product-notice {
    color: #e74c3c;
    display: block;
    font-size: 0.85em;
    margin-top: 5px;
    font-style: italic;
}

/* Progress bar styles above cart table */
.simple-cart-discount-progress.cart_top {
    position: relative;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: left;
    border: 1px solid #ddd;
    box-shadow: none;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure progress bar container and cart table have same width */
.woocommerce-cart .simple-cart-discount-progress.cart_top {
    max-width: none;
    width: auto;
}

/* Align progress bar container with table */
.woocommerce-cart .simple-cart-discount-progress.cart_top .simple-cart-discount-progress-bar {
    margin: 10px 0 0;
    max-width: none;
    width: 100%;
}

/* Fixed position progress bar styles */
.simple-cart-discount-progress.top,
.simple-cart-discount-progress.bottom {
    position: fixed;
    text-align: center;
}

.simple-cart-discount-progress.top .simple-cart-discount-progress-bar,
.simple-cart-discount-progress.bottom .simple-cart-discount-progress-bar {
    margin: 10px auto 0;
}

/* Ensure text readability in dark theme */
.simple-cart-discount-progress.theme-dark .simple-cart-discount-progress-text {
    color: #fff;
}

/* Progress bar styles above cart totals */
.simple-cart-discount-progress.cart_total_top {
    position: relative;
    margin: 1em 0;
    padding: 15px;
    border-radius: 4px;
    text-align: left;
    border: 1px solid #ddd;
    box-shadow: none;
    box-sizing: border-box;
    width: 100%;
}

.woocommerce-cart .simple-cart-discount-progress.cart_total_top .simple-cart-discount-progress-bar {
    margin: 10px 0 0;
    max-width: none;
    width: 100%;
}

.widget_shopping_cart_content .simple-cart-discount-progress.mini_cart {
    clear: both;
}

.xoo-wsc-container .simple-cart-discount-progress.mini_cart,
.elementor-menu-cart__container .simple-cart-discount-progress.mini_cart {
    margin: 10px;
}

/* Cart Block specific styles */
.wc-block-cart-progress-bar {
    margin: 1em 0;
    width: 100%;
}

.wc-block-cart .simple-cart-discount-progress {
    position: relative;
    margin: 0;
    padding: 15px;
    border-radius: 4px;
    text-align: left;
    border: 1px solid #ddd;
    box-shadow: none;
    box-sizing: border-box;
    width: 100%;
}

.wc-block-cart .simple-cart-discount-progress .simple-cart-discount-progress-bar {
    margin: 10px 0 0;
    max-width: none;
    width: 100%;
}

/* Ensure progress bar is visible */
.wc-block-cart .simple-cart-discount-progress {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
} 