/* Common Price by Quantity Element Styles */

.bb-price-by-quantity-block {
    display: grid;
    /* Gap is controlled by horizontalGap and verticalGap settings */
}

.bb-layout-columns .bb-price-by-quantity-block {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.bb-price-by-quantity-message {
    padding: 5px;
    font-size: 0.9em;
    text-align: left;
    font-style: italic;
    width: 100%;
    box-sizing: border-box;
    grid-column: 1 / -1;
    border-radius: 4px;
}

.bb-price-by-quantity-wrap {
    padding: 10px 0;
    position: relative;
    min-height: 50px; /* Ensure space for loading state */
}

/* Loading state */
.bb-price-by-quantity-wrap.is-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.bb-price-by-quantity-wrap.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    z-index: 11;
    animation: bb-price-loading 0.6s linear infinite;
}

@keyframes bb-price-loading {
    to {
        transform: rotate(360deg);
    }
}

/* Hide total price block initially */
.total-price-wrap {
    display: none;
}
