/**
 * Starter Quantity Pricing - Frontend Styles
 */

/* Price Range */
.sqp-price-range {
    display: inline-block;
}

/* Price Table Wrapper */
.sqp-price-table-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.sqp-table-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.sqp-icon {
    font-size: 20px;
}

/* Price Table */
.sqp-price-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.sqp-price-table th,
.sqp-price-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.sqp-price-table thead th {
    background: #f1f3f5;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sqp-price-table tbody tr:last-child td {
    border-bottom: none;
}

.sqp-price-table tbody tr:hover {
    background: #f8f9fa;
}

.sqp-price-table .woocommerce-Price-amount {
    font-weight: 600;
    color: #2c3e50;
}

/* Info Message */
.sqp-info-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 15px;
    padding: 12px 15px;
    background: #e7f5ff;
    border: 1px solid #74c0fc;
    border-radius: 6px;
    font-size: 14px;
    color: #1864ab;
}

.sqp-info-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.sqp-info-text {
    line-height: 1.5;
}

/* Cart Discount Row */
.sqp-discount-row th,
.sqp-discount-row td {
    background: #d4edda !important;
    color: #155724;
    font-weight: 600;
}

.sqp-discount-amount {
    color: #28a745;
    font-weight: 700;
    font-size: 1.1em;
}

/* Woodmart Theme Compatibility */
.wd-product-grid .sqp-price-range,
.product-grid-item .sqp-price-range {
    display: block;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .sqp-price-table-wrapper {
        padding: 15px;
        margin: 15px 0;
    }
    
    .sqp-price-table th,
    .sqp-price-table td {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .sqp-table-title {
        font-size: 15px;
    }
    
    .sqp-info-message {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .sqp-group-savings {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Animation for price change */
@keyframes sqp-highlight {
    0% { background-color: #fff3cd; }
    100% { background-color: transparent; }
}

.sqp-price-updated {
    animation: sqp-highlight 1s ease-out;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .sqp-price-table-wrapper {
        background: #2d3436;
        border-color: #636e72;
    }
    
    .sqp-table-title {
        color: #dfe6e9;
    }
    
    .sqp-price-table {
        background: #353b48;
    }
    
    .sqp-price-table thead th {
        background: #2d3436;
        color: #b2bec3;
    }
    
    .sqp-price-table td {
        border-color: #636e72;
        color: #dfe6e9;
    }
    
    .sqp-price-table tbody tr:hover {
        background: #3d4452;
    }
    
    .sqp-info-message {
        background: #2c3e50;
        border-color: #3498db;
        color: #74b9ff;
    }
}
