/**
 * BB-WooAutomate Styles
 * Version: 1.0.0
 */

/* Widget Container */
.bbwa-widget {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.bbwa-header {
    margin-bottom: 15px;
}

.bbwa-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

/* Live Inventory Table */
.bbwa-table {
    width: 100%;
    margin: 15px 0;
}

.bbwa-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.5fr;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.bbwa-row--head {
    background: #f8f8f8;
    font-weight: 600;
    border-radius: 4px;
}

.bbwa-row.is-out {
    opacity: 0.5;
    pointer-events: none;
}

.bbwa-color,
.bbwa-size,
.bbwa-stock {
    text-align: center;
}

.bbwa-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bbwa-qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.bbwa-qty-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

.bbwa-qty-input {
    width: 60px;
    height: 32px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Milestone Progress */
.bbwa-milestone {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.bbwa-milestone-message {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 10px;
    text-align: center;
}

.bbwa-milestone-bar {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.bbwa-milestone-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
}

.bbwa-milestone-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 20px;
}

.bbwa-icon {
    opacity: 0.6;
    transition: opacity 0.3s;
}

.bbwa-icon:hover {
    opacity: 1;
}

/* Milestone Progress Container with Tiers */
.bbwa-milestone-progress-container {
    position: relative;
    margin: 30px 0;
}

.bbwa-milestone-tiers {
    position: relative;
    height: 80px;
    margin-top: 20px;
}

.bbwa-tier {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    text-align: center;
    width: 80px;
}

.bbwa-tier-marker {
    width: 12px;
    height: 12px;
    background: #333;
    border: 2px solid #fff;
    border-radius: 50%;
    margin: 0 auto 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bbwa-tier-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
}

.bbwa-tier-amount {
    font-weight: 700;
    color: #333;
}

.bbwa-tier-reward {
    color: #666;
    font-size: 10px;
}

.bbwa-milestone-status {
    text-align: center;
    margin-top: 15px;
    padding: 8px 0;
    border-top: 1px solid #e0e0e0;
}

.bbwa-status-unlocked {
    color: #4CAF50;
    font-weight: 600;
    font-size: 14px;
}

.bbwa-status-remaining {
    color: #ff9800;
    font-weight: 600;
    font-size: 14px;
}

/* Button */
.bbwa-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.bbwa-button:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.bbwa-button:active {
    transform: translateY(0);
}

/* Shop & Mini Cart Milestone */
.bbwa-shop-milestone,
.bbwa-mini-cart-milestone {
    padding: 15px 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    margin: 15px 0;
}

.bbwa-shop-milestone .bbwa-milestone-message,
.bbwa-mini-cart-milestone .bbwa-milestone-message {
    color: #856404;
    font-weight: 600;
    margin-bottom: 8px;
}

.bbwa-shop-milestone .bbwa-milestone-bar,
.bbwa-mini-cart-milestone .bbwa-milestone-bar {
    background: #fff;
}

.bbwa-shop-milestone .bbwa-milestone-bar span,
.bbwa-mini-cart-milestone .bbwa-milestone-bar span {
    background: linear-gradient(90deg, #ffc107, #ff9800);
}

/* Responsive */
@media (max-width: 768px) {
    .bbwa-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        font-size: 13px;
    }
    
    .bbwa-row--head {
        display: none;
    }
    
    .bbwa-color::before {
        content: 'Color: ';
        font-weight: 600;
    }
    
    .bbwa-size::before {
        content: 'Size: ';
        font-weight: 600;
    }
    
    .bbwa-stock::before {
        content: 'Stock: ';
        font-weight: 600;
    }
    
    .bbwa-qty {
        grid-column: 1 / -1;
    }
}
