.wpht-product-table-wrap { overflow-x: auto; }
.wpht-product-table { width: 100%; border-collapse: collapse; }
.wpht-product-table th,
.wpht-product-table td { padding: 8px 12px; border-bottom: 1px solid #e2e2e2; text-align: left; }
.wpht-product-table th { background: var(--wpht-thead-bg, #f7f7f7); color: var(--wpht-thead-color, inherit); }

.wpht-search-wrap { position: relative; max-width: 400px; }
.wpht-search-wrap input { width: 100%; padding: 8px 10px; box-sizing: border-box; }
#wpht-search-results { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid #ddd; background: #fff; }
#wpht-search-results li { padding: 6px 10px; border-bottom: 1px solid #eee; }
#wpht-search-results li:last-child { border-bottom: none; }

.wpht-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000; display: flex; align-items: center; justify-content: center; }
.wpht-modal-inner { background: #fff; padding: 20px; border-radius: 6px; width: 90%; max-width: 640px; position: relative; }
.wpht-modal-close { position: absolute; top: 6px; right: 10px; background: none; border: none; font-size: 22px; cursor: pointer; }

.wpht-chart-wrap { position: relative; width: 100%; height: 360px; }
#wpht-modal-chart { position: relative; width: 100%; height: 320px; }

/* The chart sizes itself from this box (content width, no padding), so it
   can never overflow its popup. */
.wpht-chart-canvas-wrap { position: relative; width: 100%; height: 320px; margin-top: 12px; }
.wpht-chart-canvas-wrap canvas { display: block; }
.wpht-modal-inner { box-sizing: border-box; padding: 24px; }
@media (max-width: 650px) {
	.wpht-chart-canvas-wrap { height: 260px; }
	.wpht-modal-inner { width: 94%; padding: 18px 14px; }
}

/* Close button on the reading-end corner (left on RTL sites) and room for
   it, so it never sits on top of the range tabs. */
.wpht-modal-inner > .wpht-modal-close { right: auto; inset-inline-end: 10px; top: 8px; line-height: 1; width: 32px; height: 32px; }
.wpht-modal-inner > .wpht-chart-range-tabs { padding-inline-end: 40px; }
