/**
 * WC Advanced Promotions - Public Styles
 */

/* Promotion Badges */
.wcap-promo-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.wcap-badge-bogo {
    background: #27ae60;
}

.wcap-badge-quantity_discount {
    background: #3498db;
}

.wcap-badge-cart_discount {
    background: #9b59b6;
}

.wcap-badge-free_gift {
    background: #f39c12;
}

.wcap-badge-special_price {
    background: #e74c3c;
}

/* Single Product Badges */
.wcap-single-badges {
    margin: 15px 0;
}

.wcap-single-badges .wcap-promo-badge {
    position: static;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Pricing Table */
.wcap-pricing-table-container {
    margin: 20px 0;
}

.wcap-pricing-table {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wcap-pricing-table .wcap-table-title {
    margin: 0;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 600;
}

.wcap-pricing-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.wcap-pricing-table th,
.wcap-pricing-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.wcap-pricing-table thead th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcap-pricing-table tbody tr:last-child td {
    border-bottom: none;
}

.wcap-pricing-table tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
}

.wcap-best-deal {
    font-weight: 600;
}

.wcap-best-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 3px;
    color: #fff;
    margin-left: 8px;
    vertical-align: middle;
}

/* Cart Promotions */
.wcap-cart-promotions-applied {
    background: #e7f5e7;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.wcap-cart-promotions-applied h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #155724;
}

.wcap-cart-promotions-applied ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wcap-cart-promotions-applied li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid #c3e6c3;
}

.wcap-cart-promotions-applied li:first-child {
    border-top: none;
    padding-top: 0;
}

.wcap-cart-promotions-applied .promo-name {
    font-weight: 500;
    color: #155724;
}

.wcap-cart-promotions-applied .promo-discount {
    color: #28a745;
    font-weight: 600;
}

/* Available Promotions */
.wcap-available-promotions {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.wcap-available-promotions h4 {
    margin: 0 0 10px;
    color: #856404;
    font-size: 15px;
}

.wcap-promo-hint {
    margin: 0;
    color: #856404;
}

/* Free Item */
.wcap-free-gift {
    color: #28a745;
    font-weight: 700;
    font-size: 14px;
}

/* Item Discount */
.wcap-item-discount {
    color: #28a745;
    font-weight: 500;
}

/* Total Savings */
.wcap-total-savings th,
.wcap-total-savings td {
    background: #e7f5e7 !important;
    color: #155724;
}

.wcap-savings-amount {
    color: #28a745 !important;
    font-size: 16px;
}

/* Mini Cart Savings */
.wcap-mini-cart-savings {
    text-align: center;
    padding: 10px;
    background: #e7f5e7;
    border-radius: 4px;
    margin-bottom: 10px;
    color: #155724;
}

.wcap-mini-cart-savings strong {
    color: #28a745;
}

/* Gift Selector */
.wcap-gift-selector {
    background: #f8f9fa;
    border: 2px dashed #28a745;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.wcap-gift-selector h3 {
    margin: 0 0 10px;
    color: #28a745;
}

.wcap-gift-selector p {
    margin: 0 0 15px;
    color: #666;
}

.wcap-gift-products {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.wcap-gift-product {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    width: 120px;
    text-align: center;
    transition: all 0.3s ease;
}

.wcap-gift-product:hover {
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(40,167,69,0.2);
}

.wcap-gift-product img {
    max-width: 100%;
    height: auto;
    margin-bottom: 8px;
}

.wcap-gift-product span {
    display: block;
    font-size: 12px;
    color: #333;
    line-height: 1.3;
}

.wcap-select-gift {
    text-decoration: none;
    color: inherit;
}

/* Checkout Promotions */
.wcap-checkout-promo th,
.wcap-checkout-promo td {
    color: #28a745;
}

/* Urgency Messages */
.wcap-urgency {
    color: #e74c3c;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .wcap-pricing-table th,
    .wcap-pricing-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .wcap-best-badge {
        display: block;
        margin: 5px 0 0;
    }
    
    .wcap-gift-products {
        flex-direction: column;
        align-items: center;
    }
    
    .wcap-gift-product {
        width: 100%;
        max-width: 200px;
    }
}
