/* EPD Warehouse Inventory Display — front-end styles.
   Replicates the look of the site's existing inventory-search page (left
   search + Categories sidebar, clean main table). All selectors are scoped
   to .epd-wid-* so nothing leaks into or conflicts with theme styles. */

.epd-wid-wrap {
	margin: 1.5em 0;
	width: 100%;
	box-sizing: border-box;
	color: #313131;
	font-size: 15px;
	line-height: 1.4;
}

.epd-wid-title {
	text-align: center;
	font-weight: 500;
	font-size: 1.4em;
	color: #444;
	margin: 0 0 1.6em;
}

/* ---- Layout: sidebar + main ---- */

.epd-wid-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 2.5em;
	align-items: flex-start;
}

.epd-wid-sidebar {
	flex: 0 0 240px;
	max-width: 240px;
}

.epd-wid-main {
	flex: 1 1 360px;
	min-width: 0;
	max-width: 100%;
}

/* ---- Search box (rounded pill) ---- */

.epd-wid-searchbox {
	margin-bottom: 1.6em;
}

/* High-specificity + appearance reset so the theme's input[type="search"]
   styling can't override the rounded pill. */
.epd-wid-wrap input.epd-wid-search {
	width: 100%;
	padding: 0.65rem 1.1rem;
	border: 1px solid #d9d9d9;
	border-radius: 999px !important;
	-webkit-appearance: none;
	appearance: none;
	font-size: 1em;
	line-height: 1.3;
	background: #fff;
	color: inherit;
	box-sizing: border-box;
}

.epd-wid-wrap input.epd-wid-search:focus {
	outline: none;
	border-color: #999;
}

/* Remove the native clear/decoration WebKit adds to search inputs. */
.epd-wid-wrap input.epd-wid-search::-webkit-search-decoration,
.epd-wid-wrap input.epd-wid-search::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

/* ---- Categories sidebar ---- */

.epd-wid-cat-heading {
	font-size: 1.6em;
	font-weight: 700;
	margin: 0 0 0.6em;
	color: #222;
}

.epd-wid-cats {
	display: flex;
	flex-direction: column;
	gap: 0.1em;
}

.epd-wid-cat-group {
	margin-top: 0.9em;
}

.epd-wid-group-name {
	display: block;
	font-weight: 700;
	color: #222;
	margin: 0.4em 0 0.25em;
}

.epd-wid-cat {
	display: block;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	padding: 0.3em 0;
	margin: 0;
	font: inherit;
	color: #2a2a2a;
	cursor: pointer;
}

.epd-wid-cat:hover {
	color: #0a5cad;
	text-decoration: underline;
}

.epd-wid-cat.epd-wid-active {
	font-weight: 700;
}

.epd-wid-cat-all {
	font-weight: 600;
}

/* ---- Main table ---- */

.epd-wid-table-scroll {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.epd-wid-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	background: transparent;
}

.epd-wid-table th,
.epd-wid-table td {
	padding: 0.85em 1em;
	text-align: left;
	border-bottom: 1px solid #ececec;
	vertical-align: top;
}

.epd-wid-table thead th {
	background: #f4f4f4;
	font-weight: 600;
	color: #333;
	border-bottom: 1px solid #e0e0e0;
	white-space: nowrap;
}

.epd-wid-col-name {
	min-width: 240px;
}

.epd-wid-col-qty {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.epd-wid-col-unit {
	white-space: nowrap;
}

.epd-wid-col-cat {
	min-width: 180px;
}

.epd-wid-group-sub {
	display: block;
	color: #888;
	font-size: 0.85em;
	margin-top: 0.15em;
}

.epd-wid-table tbody tr:hover {
	background: #fafafa;
}

.epd-wid-row.epd-wid-hidden {
	display: none;
}

.epd-wid-no-results td,
.epd-wid-empty td {
	text-align: center;
	color: #777;
	font-style: italic;
	padding: 1.4em;
}

/* ---- Footer: count + pagination ---- */

.epd-wid-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.75em;
	margin-top: 1.1em;
}

.epd-wid-count {
	color: #666;
	font-size: 0.9em;
}

.epd-wid-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.epd-wid-pagination button {
	min-width: 2.2rem;
	height: 2.2rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: #efefef;
	color: #000;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.epd-wid-pagination button:not(.epd-wid-active):not(:disabled):hover {
	background-color: #dcdcdc;
}

.epd-wid-pagination button.epd-wid-active {
	background-color: #15609f;
	color: #fff;
	cursor: default;
}

.epd-wid-pagination button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---- Responsive: stack sidebar above table, table scrolls ---- */

@media (max-width: 782px) {
	.epd-wid-layout {
		flex-direction: column;
		gap: 1.5em;
	}
	.epd-wid-sidebar {
		flex: 1 1 auto;
		max-width: none;
		width: 100%;
	}
	.epd-wid-cat-heading {
		font-size: 1.3em;
	}
}
