/* Frontend styles for WooCommerce Quantity Discount */

.wc-qd-tiers-display {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.wc-qd-tier-option {
    flex: 1;
    min-width: 150px;
    position: relative;
}

.wc-qd-tier-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wc-qd-tier-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 8px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background-color: rgba(155, 155, 155, 0.12);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.wc-qd-tier-option:hover label {
    border-color: #9ca3af;
    background-color: rgba(255, 80, 0, 0.06);
}

.wc-qd-tier-option.selected label,
.wc-qd-tier-option input[type="radio"]:checked + label {
    border-color: rgb(232, 92, 12);
    border-width: 3px;
    background-color: rgba(255, 80, 0, 0.06);
}

.wc-qd-discount-badge {
    position: absolute;
    top: -8px;
    right: 10px;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
    z-index: 1;
}

.wc-qd-quantity {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.wc-qd-prices {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wc-qd-original-price {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
}

.wc-qd-discounted-price {
    font-size: 16px;
    font-weight: bold;
    color: rgb(232, 92, 12);
}

.wc-qd-tier-option.selected .wc-qd-discounted-price,
.wc-qd-tier-option input[type="radio"]:checked + label .wc-qd-discounted-price {
    color: rgb(232, 92, 12);
}

/* Responsive design */
@media (max-width: 768px) {
    .wc-qd-tiers-display {
        flex-direction: column;
    }
    
    .wc-qd-tier-option {
        min-width: 100%;
    }
}

/* Integration with WooCommerce elements */
.single-product .wc-qd-tiers-display {
    margin-top: 15px;
    margin-bottom: 20px;
}

/* Hide in sticky add to cart */
.wd-sticky-btn .wc-qd-tiers-display,
.sticky-add-to-cart .wc-qd-tiers-display {
    display: none !important;
}

/* Animation for selection */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.wc-qd-tier-option.selected label {
    animation: pulse 0.3s ease-in-out;
}