/* Woo Discount Manager - Incentive Message Styles */

.wdm-incentive-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    animation: wdm-pulse 2s ease-in-out infinite;
}

.wdm-incentive-message:empty {
    display: none;
}

.wdm-incentive-message strong {
    color: #fff;
    font-weight: 700;
}

.wdm-incentive-icon {
    margin-right: 6px;
    font-size: 16px;
}

/* Animation */
@keyframes wdm-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
}

/* WoodMart drawer cart specific */
.wd-cart-widget .wdm-incentive-message,
.cart-widget-side .wdm-incentive-message {
    margin: 10px 15px;
    font-size: 13px;
    padding: 10px 14px;
}

/* Mini cart widget */
.widget_shopping_cart .wdm-incentive-message {
    margin: 10px 0;
}

/* Cart page */
.woocommerce-cart .wdm-incentive-message {
    max-width: 600px;
    margin: 0 auto 20px;
}

/* Success state - max discount reached */
.wdm-incentive-message:has(.wdm-incentive-icon:first-child:contains("🎉")) {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* Alternative colors for different message types */
.wdm-incentive-message--success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.wdm-incentive-message--spending {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* RTL Support */
[dir="rtl"] .wdm-incentive-icon {
    margin-right: 0;
    margin-left: 6px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wdm-incentive-message {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .wdm-incentive-message {
        font-size: 13px;
        padding: 10px 12px;
        border-radius: 6px;
    }

    .wdm-incentive-icon {
        font-size: 14px;
    }
}

/* ========================================
   Gift Feature Styles
   ======================================== */

/* Gift Badge - shown next to gift items in cart */
.wdm-gift-badge {
    display: inline-block;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(17, 153, 142, 0.3);
}

/* Gift quantity display (replaces input) */
.wdm-gift-quantity {
    display: inline-block;
    background: #f5f5f5;
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 600;
    color: #333;
    border: 1px solid #ddd;
}

/* Gift remove link disabled state */
.wdm-gift-no-remove {
    color: #ccc;
    cursor: not-allowed;
    font-size: 18px;
}

/* Gift icon for placeholder gifts */
.wdm-gift-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    font-size: 32px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 8px;
}

/* Gift Incentive Message */
.wdm-gift-incentive-message {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    box-shadow: 0 2px 10px rgba(17, 153, 142, 0.3);
}

.wdm-gift-incentive-message:empty {
    display: none;
}

.wdm-gift-incentive-message strong {
    color: #fff;
    font-weight: 700;
}

/* WoodMart drawer cart specific */
.wd-cart-widget .wdm-gift-incentive-message,
.cart-widget-side .wdm-gift-incentive-message {
    margin: 10px 15px;
    font-size: 13px;
    padding: 10px 14px;
}

/* Mini cart widget */
.widget_shopping_cart .wdm-gift-incentive-message {
    margin: 10px 0;
}

/* Cart page */
.woocommerce-cart .wdm-gift-incentive-message {
    max-width: 600px;
    margin: 0 auto 20px;
}

/* Gift item row styling */
.woocommerce-cart-form .cart_item .wdm-gift-badge {
    animation: wdm-gift-shine 2s ease-in-out infinite;
}

@keyframes wdm-gift-shine {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(17, 153, 142, 0.3);
    }
    50% {
        box-shadow: 0 2px 12px rgba(17, 153, 142, 0.5);
    }
}

/* RTL Support for gifts */
[dir="rtl"] .wdm-gift-badge {
    margin-left: 0;
    margin-right: 8px;
}

/* Checkout order review gift styling */
.woocommerce-checkout-review-order-table .wdm-gift-badge {
    font-size: 10px;
    padding: 2px 6px;
    margin-left: 5px;
}

/* Gift item row in checkout */
.woocommerce-checkout-review-order-table .wdm-gift-item {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1) 0%, rgba(56, 239, 125, 0.1) 100%);
}


.woocommerce-checkout-review-order-table .wdm-gift-item .product-total {
    color: #11998e;
    font-weight: 600;
}

/* Small badge for orders */
.wdm-gift-badge-small {
    display: inline-block;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 5px;
    vertical-align: middle;
}

/* Order emails and admin order view */
.woocommerce-table--order-details .wdm-gift-badge,
.woocommerce-order-details .wdm-gift-badge {
    font-size: 10px;
    padding: 2px 6px;
}

/* Mobile responsive for gifts */
@media (max-width: 768px) {
    .wdm-gift-badge {
        font-size: 10px;
        padding: 2px 8px;
        margin-left: 5px;
    }

    .wdm-gift-incentive-message {
        font-size: 13px;
        padding: 10px 12px;
    }

    .wdm-gift-quantity {
        padding: 4px 10px;
        font-size: 13px;
    }
}

/* ========================================
   Free Shipping Progress Bar Styles
   ======================================== */

/* Main progress container */
.wdm-free-shipping-progress {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe4cc 100%);
    border: 2px solid #f5a623;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.2);
}

.wdm-free-shipping-progress:empty {
    display: none;
}

/* Progress bar track */
.wdm-progress-bar {
    height: 12px;
    background: #e8e0d5;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Progress bar fill */
.wdm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f5a623 0%, #ff8c00 50%, #ff6b00 100%);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Animated shine effect on progress bar */
.wdm-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: wdm-progress-shine 2s ease-in-out infinite;
}

@keyframes wdm-progress-shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Progress text */
.wdm-progress-text {
    font-size: 14px;
    color: #5a4a32;
    text-align: center;
    font-weight: 500;
    line-height: 1.4;
}

.wdm-progress-text strong {
    color: #d4740c;
    font-weight: 700;
}

/* Progress icon */
.wdm-progress-icon {
    margin-right: 8px;
    font-size: 18px;
    vertical-align: middle;
}

/* Qualified state - free shipping unlocked */
.wdm-free-shipping-progress.qualified {
    background: linear-gradient(135deg, #e6fff0 0%, #ccffe0 100%);
    border-color: #38ef7d;
    box-shadow: 0 2px 8px rgba(56, 239, 125, 0.25);
}

.wdm-free-shipping-progress.qualified .wdm-progress-bar {
    background: #c8f7dc;
}

.wdm-free-shipping-progress.qualified .wdm-progress-fill {
    background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
}

.wdm-free-shipping-progress.qualified .wdm-progress-text {
    color: #1a6b4c;
}

.wdm-free-shipping-progress.qualified .wdm-progress-text strong {
    color: #0d7a54;
}

.wdm-free-shipping-progress.qualified .wdm-progress-icon {
    color: #11998e;
}

/* WoodMart drawer cart specific */
.wd-cart-widget .wdm-free-shipping-progress,
.cart-widget-side .wdm-free-shipping-progress {
    margin: 10px 15px;
    padding: 12px 14px;
}

.wd-cart-widget .wdm-progress-text,
.cart-widget-side .wdm-progress-text {
    font-size: 13px;
}

/* Mini cart widget */
.widget_shopping_cart .wdm-free-shipping-progress {
    margin: 10px 0;
}

/* Cart page */
.woocommerce-cart .wdm-free-shipping-progress {
    max-width: 600px;
    margin: 0 auto 20px;
}

/* RTL Support */
[dir="rtl"] .wdm-progress-icon {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .wdm-progress-fill::after {
    animation-name: wdm-progress-shine-rtl;
}

@keyframes wdm-progress-shine-rtl {
    0% {
        right: -100%;
        left: auto;
    }
    100% {
        right: 100%;
        left: auto;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .wdm-free-shipping-progress {
        padding: 12px 14px;
        border-radius: 8px;
    }

    .wdm-progress-bar {
        height: 10px;
    }

    .wdm-progress-text {
        font-size: 13px;
    }

    .wdm-progress-icon {
        font-size: 16px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wdm-free-shipping-progress {
        background: linear-gradient(135deg, #3d3529 0%, #4a3f2e 100%);
        border-color: #b37f1a;
    }

    .wdm-progress-bar {
        background: #2d2820;
    }

    .wdm-progress-text {
        color: #f0e6d6;
    }

    .wdm-progress-text strong {
        color: #ffb84d;
    }

    .wdm-free-shipping-progress.qualified {
        background: linear-gradient(135deg, #1a3d2e 0%, #2d4a3d 100%);
        border-color: #38ef7d;
    }

    .wdm-free-shipping-progress.qualified .wdm-progress-bar {
        background: #1a3d2e;
    }

    .wdm-free-shipping-progress.qualified .wdm-progress-text {
        color: #c8f7dc;
    }

    .wdm-free-shipping-progress.qualified .wdm-progress-text strong {
        color: #6fff9e;
    }
}
