.hpa-history-page {
    max-width: 1200px;
    margin: 0 auto;
}

.hpa-statistics-section {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.hpa-statistics-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3em;
    color: #23282d;
}

#hpa-usage-chart {
    overflow-x: auto;
    background: #fff;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    min-height: 400px;
}

.hpa-filters {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.hpa-filters form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.hpa-filters label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    color: #23282d;
}

.hpa-filters input[type="date"],
.hpa-filters select {
    padding: 5px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    min-height: 30px;
    transition: border-color 0.2s;
}

.hpa-filters input[type="date"]:focus,
.hpa-filters select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.hpa-history-table {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.hpa-history-table .wp-list-table {
    margin: 0;
    border: none;
}

.hpa-history-table .wp-list-table th {
    background: #f6f7f7;
    border-bottom: 1px solid #ccd0d4;
    font-weight: 600;
    color: #23282d;
}

.hpa-history-table .wp-list-table td {
    border-bottom: 1px solid #ccd0d4;
    vertical-align: middle;
    padding: 12px 10px;
}

.hpa-history-table .wp-list-table tr:last-child td {
    border-bottom: none;
}

.hpa-history-table .wp-list-table tr:hover td {
    background: #f9f9f9;
}

.hpa-tooltip {
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
    line-height: 1.4;
    max-width: 300px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 9999;
}

.hpa-tooltip strong {
    color: #23282d;
    display: block;
    margin-bottom: 5px;
}

/* Bar chart styles */
.bar {
    transition: fill 0.3s ease;
}

.bar:hover {
    fill: #005a87;
}

.label {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.label.show {
    opacity: 1;
}

/* Pagination styles */
.tablenav {
    margin-top: 20px;
}

.tablenav-pages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.tablenav-pages a {
    padding: 8px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    text-decoration: none;
    color: #0073aa;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tablenav-pages a:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.tablenav-pages a.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
    cursor: default;
}

.tablenav-pages a.prev-page,
.tablenav-pages a.next-page {
    padding: 8px 10px;
    font-weight: bold;
}

/* Responsive design */
@media screen and (max-width: 782px) {
    .hpa-filters form {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hpa-filters label {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .hpa-filters input[type="date"],
    .hpa-filters select {
        width: 100%;
    }
    
    .hpa-history-table .wp-list-table {
        font-size: 14px;
    }
    
    .hpa-history-table .wp-list-table th,
    .hpa-history-table .wp-list-table td {
        padding: 8px 5px;
    }
    
    #hpa-usage-chart {
        min-height: 300px;
    }
}

@media screen and (max-width: 480px) {
    .hpa-history-page {
        padding: 0 10px;
    }
    
    .hpa-statistics-section,
    .hpa-filters,
    .hpa-history-table {
        padding: 15px;
    }
    
    .hpa-statistics-section h2 {
        font-size: 1.1em;
    }
}

/* Price Display Styles for Product Pages */
.hpa-price-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.hpa-old-price {
    color: #999;
    font-size: 0.9em;
    text-decoration: line-through;
}

.hpa-new-price {
    color: #d63638;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
}

.hpa-promo-info {
    font-size: 0.85em;
    color: #2c7bb6;
    padding: 3px 8px;
    background-color: #f0f7fc;
    border-left: 3px solid #2c7bb6;
    border-radius: 2px;
}

/* Responsive design for price display */
@media screen and (max-width: 768px) {
    .hpa-price-display {
        gap: 8px;
        margin: 8px 0;
    }
    
    .hpa-old-price {
        font-size: 0.85em;
    }
    
    .hpa-new-price {
        font-size: 1em;
    }
    
    .hpa-promo-info {
        font-size: 0.8em;
        padding: 2px 6px;
    }
}