/* TEG-WHOLESALE trade storefront. Deliberately plain: it sits inside
   whatever theme the site uses, so it sets spacing and meaning (colour that
   always comes with a word) and leaves typography to the theme. */

.twh-store {
	--twh-ok: #1b6e2f;
	--twh-warn: #8a5a00;
	--twh-bad: #9b1c1c;
	--twh-line: rgba(0, 0, 0, .12);
	--twh-soft: rgba(0, 0, 0, .04);
	max-width: 72rem;
}

.twh-store .twh-nav {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem 1rem;
	align-items: center;
	padding: .6rem 0;
	border-bottom: 1px solid var(--twh-line);
	margin-bottom: 1rem;
}

.twh-store .twh-nav .twh-who {
	font-weight: 600;
	margin-right: auto;
}

.twh-store .twh-current {
	font-weight: 700;
	text-decoration: underline;
}

.twh-store .twh-tabs a {
	margin-right: 1rem;
}

.twh-store .twh-table {
	width: 100%;
	border-collapse: collapse;
	margin: .5rem 0 1rem;
}

.twh-store .twh-table th,
.twh-store .twh-table td {
	text-align: left;
	vertical-align: top;
	padding: .45rem .5rem;
	border-bottom: 1px solid var(--twh-line);
}

.twh-store .num {
	text-align: right;
	white-space: nowrap;
}

.twh-store .twh-muted {
	opacity: .7;
}

.twh-store .twh-qty {
	width: 5em;
}

.twh-store .twh-button {
	cursor: pointer;
	padding: .35em .9em;
}

.twh-store .twh-small {
	font-size: .85em;
	padding: .2em .6em;
}

.twh-store .twh-link {
	background: none;
	border: 0;
	padding: 0;
	text-decoration: underline;
	cursor: pointer;
	color: inherit;
}

.twh-store .twh-inline {
	display: inline-block;
	margin: 0 .5rem .5rem 0;
}

.twh-store .twh-add {
	white-space: nowrap;
}

.twh-store .twh-avail {
	display: inline-block;
	padding: 0 .45em;
	border-radius: 3px;
	font-size: .85em;
	font-weight: 600;
	border: 1px solid currentColor;
}

.twh-store .twh-avail-in {
	color: var(--twh-ok);
}

.twh-store .twh-avail-low {
	color: var(--twh-warn);
}

.twh-store .twh-avail-backorder {
	color: var(--twh-bad);
}

.twh-store .twh-notice {
	border-left: 4px solid var(--twh-line);
	background: var(--twh-soft);
	padding: .2rem 1rem;
	margin: 0 0 1rem;
}

.twh-store .twh-notice-success {
	border-color: var(--twh-ok);
}

.twh-store .twh-notice-warning {
	border-color: var(--twh-warn);
}

.twh-store .twh-notice-error {
	border-color: var(--twh-bad);
}

.twh-store .twh-err,
.twh-store .twh-req {
	color: var(--twh-bad);
}

.twh-store .twh-problem td {
	background: rgba(155, 28, 28, .06);
}

.twh-store .twh-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
	gap: 1.5rem;
}

.twh-store .twh-pad {
	width: 100%;
	font-family: monospace;
}

.twh-store .twh-list {
	border: 1px solid var(--twh-line);
	padding: .5rem 1rem;
	margin-bottom: .75rem;
}

.twh-store .twh-form input[type="text"],
.twh-store .twh-form input[type="email"],
.twh-store .twh-form input[type="tel"],
.twh-store .twh-form textarea,
.twh-store.twh-apply input[type="text"],
.twh-store.twh-apply input[type="email"],
.twh-store.twh-apply input[type="tel"],
.twh-store.twh-apply textarea {
	width: 100%;
	max-width: 32rem;
}

.twh-store fieldset {
	border: 1px solid var(--twh-line);
	padding: .5rem 1rem;
	margin: 0 0 1rem;
}

/* The honeypot: out of sight for people, in plain view for robots. */
.twh-store .twh-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.twh-store .twh-product-img {
	float: right;
	max-width: 40%;
	height: auto;
	margin: 0 0 1rem 1rem;
}

.twh-store .twh-day {
	margin-right: .6rem;
}

/* The scan box from the back office, on the storefront. */
.twh-store .twh-scanner .twh-scan-row {
	display: flex;
	gap: .4rem;
	align-items: center;
	flex-wrap: wrap;
}

.twh-store .twh-scanner .twh-scan-input {
	flex: 1 1 12rem;
	font-size: 1.1em;
}

.twh-store .twh-scan-status {
	min-height: 1.5em;
	margin-top: .3rem;
}

@media (max-width: 40rem) {
	.twh-store .twh-catalogue thead {
		display: none;
	}

	.twh-store .twh-catalogue td {
		display: block;
		border-bottom: 0;
		padding: .2rem 0;
	}

	.twh-store .twh-catalogue tr {
		display: block;
		border-bottom: 1px solid var(--twh-line);
		padding: .5rem 0;
	}
}
