/**
 * ACF Quantity Pricing Display - Stylesheet
 * Version: 1.0.0
 */

/* Main Wrapper */
.acf-quantity-pricing-wrapper {
    margin: 30px 0;
    background: #fff;
    border: none;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Quantity Select Section */
.quantity-select-section {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-select-section label {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin: 0;
}

.aqp-quantity-select {
    padding: 10px 35px 10px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: #ffffff;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 20px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 120px;
    width: 20%;
}

.aqp-quantity-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.aqp-quantity-select:hover {
    border-color: #0073aa;
}

/* Pricing Table */
.pricing-table-wrapper {
    margin-bottom: 25px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
}

.pricing-table thead th {
    background-color: #B2C8BC;
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    border: none;
    border-block-start: none !important;
}

.calculation-table thead th {
    border-block-start: none !important;
}

.pricing-table thead tr th:first-child {
    text-align: left;
    background-color: #B2C8BC;
}

.pricing-table thead tr td:first-child {
    text-align: left;
    background-color: #E4EBE8;
}

.pricing-table tbody td {
    padding: 15px;
    font-size: 15px;
    text-align: center;
    border: none;
    color: #333;
}

.pricing-table tbody td.row-label {
    text-align: left;
    font-weight: 600;
    color: #555;
}

.pricing-table tbody td.tier-price {
    font-weight: 500;
    color: #0073aa;
}

.pricing-table tbody td.tier-price del {
    display: block;
    font-size: 13px;
    color: #999;
    margin-bottom: 4px;
}

.pricing-table tbody td.tier-price strong {
    color: #e74c3c;
    font-size: 16px;
}

.pricing-table tr{
    background-color: #E4EBE8;
}

/* Calculation Table */
.calculation-table-wrapper {
    margin-top: 25px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calculation-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.calculation-table thead th {
    background: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #555;
    border: none;
}

.calculation-table tbody td {
    padding: 15px;
    font-size: 15px;
    border: none;
    color: #333;
}

.calculation-table tbody tr {
  background: #ececec;  
}



.calculation-table tbody tr:last-child td {
    border-bottom: none;
}

.product-sku {
    font-weight: 600;
    color: #0073aa;
}

/*.pricing-table thead th:first-child {
  text-align: left;
  background: #f5f5f5;
}*/

.selected-quantity,
.unit-price,
.line-total {
    font-weight: 500;
}

.line-total {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

/* Total Section */
.total-section {
    text-align: right;
    padding: 15px 20px;
    background: #f8f8f8;
    border-radius: 6px;
}

.total-section strong {
    font-size: 18px;
    color: #2c3e50;
}

.grand-total {
    color: #0073aa;
    font-size: 22px;
    margin: 0 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .acf-quantity-pricing-wrapper {
        padding: 15px;
    }
    
    .quantity-select-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .aqp-quantity-select {
        width: 100%;
        max-width: 200px;
    }
    
    .pricing-table {
        font-size: 13px;
    }
    
    .pricing-table thead th,
    .pricing-table tbody td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .calculation-table {
        font-size: 13px;
    }
    
    .calculation-table thead th,
    .calculation-table tbody td {
        padding: 10px 8px;
    }
    
    .total-section strong {
        font-size: 16px;
    }
    
    .grand-total {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .pricing-table thead th,
    .pricing-table tbody td {
        padding: 8px 5px;
        font-size: 12px;
    }
    
    .calculation-table {
        font-size: 12px;
    }
    
    .calculation-table thead th,
    .calculation-table tbody td {
        padding: 8px 5px;
    }
    
    .total-section {
        padding: 12px 15px;
    }
    
    .aqp-quantity-select {
        font-size: 14px;
    }
}

/* Animation for value changes */
@keyframes highlight {
    0% {
        background-color: #fff3cd;
    }
    100% {
        background-color: transparent;
    }
}

.highlight-change {
    animation: highlight 0.6s ease;
}

/* Remove old button styles (no longer needed) */
.quantity-price-header,
.quantity-prices,
.quantity-price-btn,
.quantity-input-section {
    display: none;
}