/**
 * Wareoff portal styles.
 *
 * Component rules (.wds-card, .wds-form, .wds-nav …) apply wherever plugin
 * markup appears, including shortcodes inside a theme. Page-level rules are
 * scoped to body.wds-layout-app so theme display mode keeps the theme's own
 * typography and chrome. A theme that declares
 * add_theme_support( 'wareoff-distribution-suite', array( 'styles' => true ) )
 * skips this file entirely and styles the markup itself.
 */

/* ---------- Base (app layout only) ---------- */

body.wds-layout-app {
	margin: 0;
	background: var(--wds-color-canvas);
	color: var(--wds-color-ink);
	font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

body.wds-layout-app *,
body.wds-layout-app *::before,
body.wds-layout-app *::after {
	box-sizing: border-box;
}

body.wds-layout-app a {
	color: var(--wds-color-primary);
}

body.wds-layout-app a:hover {
	color: var(--wds-color-primary-strong);
}

body.wds-layout-app h1,
body.wds-layout-app h2,
body.wds-layout-app h3 {
	line-height: 1.25;
	margin: 0 0 var(--wds-space-3);
	color: var(--wds-color-ink);
}

body.wds-layout-app p {
	margin: 0 0 var(--wds-space-3);
}

body.wds-layout-app :focus-visible {
	outline: 3px solid var(--wds-color-accent);
	outline-offset: 2px;
}

.wds-portal .screen-reader-text,
.wds-nav .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.wds-skip-link {
	position: absolute;
	left: var(--wds-space-3);
	top: -100px;
	z-index: 1000;
	padding: var(--wds-space-2) var(--wds-space-4);
	background: var(--wds-color-surface);
	color: var(--wds-color-primary);
	border-radius: var(--wds-radius);
	box-shadow: var(--wds-shadow);
}

.wds-skip-link:focus {
	top: var(--wds-space-3);
}

.wds-icon {
	width: 20px;
	height: 20px;
	flex: none;
}

/* ---------- Brand ---------- */

.wds-brand {
	display: inline-flex;
	align-items: center;
	gap: var(--wds-space-3);
	text-decoration: none;
	color: inherit;
	font-weight: 700;
	font-size: 1.05rem;
	min-width: 0;
}

.wds-brand__mark {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: var(--wds-radius);
	background: var(--wds-color-accent);
	color: var(--wds-color-primary-strong);
	font-weight: 800;
	flex: none;
}

.wds-brand__logo {
	max-height: 40px;
	width: auto;
}

.wds-brand__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- App shell (signed in) ---------- */

.wds-app {
	min-height: 100vh;
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
}

.wds-topbar {
	display: none;
}

.wds-sidebar {
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: var(--wds-space-4);
	padding: var(--wds-space-5) var(--wds-space-3);
	background: var(--wds-color-primary);
	color: #fff;
}

/* Outranks "body.wds-layout-app a" so links stay light on the dark sidebar. */
body.wds-layout-app .wds-sidebar a,
body.wds-layout-app .wds-sidebar a:hover,
.wds-sidebar a,
.wds-sidebar button {
	color: #fff;
}

body.wds-layout-app .wds-topbar .wds-brand {
	color: #fff;
}

.wds-sidebar__brand {
	padding: 0 var(--wds-space-2) var(--wds-space-2);
}

.wds-sidebar__brand .wds-brand,
.wds-topbar .wds-brand {
	color: #fff;
}

.wds-sidebar__account {
	margin-top: auto;
	padding-top: var(--wds-space-4);
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.wds-sidebar__user {
	display: flex;
	align-items: center;
	gap: var(--wds-space-3);
	padding: 0 var(--wds-space-2);
	font-weight: 600;
	margin-bottom: var(--wds-space-2) !important;
	min-width: 0;
}

.wds-sidebar__user > span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wds-avatar {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	font-size: 0.875rem;
	flex: none;
}

.wds-content {
	min-width: 0;
}

.wds-main {
	max-width: 1120px;
	margin: 0 auto;
	padding: var(--wds-space-6) var(--wds-space-5);
}

.wds-page-title {
	font-size: 1.625rem;
	margin-bottom: var(--wds-space-5) !important;
}

/* ---------- Guest shell ---------- */

.wds-guest {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.wds-guestbar {
	background: var(--wds-color-surface);
	border-bottom: 1px solid var(--wds-color-line);
}

.wds-guestbar__inner {
	max-width: 1120px;
	margin: 0 auto;
	padding: var(--wds-space-3) var(--wds-space-5);
	display: flex;
	align-items: center;
	gap: var(--wds-space-5);
}

.wds-guestbar__nav {
	margin-left: auto;
}

.wds-guest .wds-brand {
	color: var(--wds-color-ink);
}

.wds-guest .wds-brand__mark {
	background: var(--wds-color-primary);
	color: #fff;
}

.wds-guest__content {
	flex: 1;
}

.wds-guest .wds-main {
	max-width: 720px;
}

/* ---------- Menu toggle ---------- */

.wds-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-left: auto;
	padding: 0;
	border: 0;
	border-radius: var(--wds-radius);
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.wds-menu-toggle .wds-icon {
	width: 24px;
	height: 24px;
}

.wds-menu-toggle__close,
.wds-menu-toggle[aria-expanded="true"] .wds-menu-toggle__open {
	display: none;
}

.wds-menu-toggle[aria-expanded="true"] .wds-menu-toggle__close {
	display: block;
}

/* ---------- Navigation ---------- */

.wds-nav__list,
.wds-nav__sub {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wds-nav__item {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.wds-nav__link {
	flex: 1;
	display: flex;
	align-items: center;
	gap: var(--wds-space-3);
	min-height: 44px;
	padding: var(--wds-space-2) var(--wds-space-3);
	border: 0;
	border-radius: var(--wds-radius);
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.wds-nav__label {
	flex: 1;
	min-width: 0;
}

.wds-nav__toggle:not(.wds-nav__link) {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: var(--wds-radius);
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.wds-nav__toggle .wds-icon {
	transition: transform 0.15s ease;
}

.wds-nav__toggle[aria-expanded="true"] .wds-icon:last-child {
	transform: rotate(90deg);
}

.wds-nav__sub {
	flex-basis: 100%;
	padding-left: var(--wds-space-5);
}

.wds-nav__sub[hidden] {
	display: none;
}

.wds-nav__badge {
	min-width: 22px;
	padding: 0 6px;
	border-radius: 11px;
	background: var(--wds-color-accent);
	color: var(--wds-color-primary-strong);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
}

/* Sidebar (dark) variant */
.wds-sidebar .wds-nav__link:hover,
.wds-sidebar .wds-nav__toggle:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

.wds-sidebar .wds-nav__link[aria-current="page"] {
	background: rgba(255, 255, 255, 0.14);
	box-shadow: inset 3px 0 0 var(--wds-color-accent);
	font-weight: 600;
}

.wds-sidebar .wds-nav__item.is-active > .wds-nav__link {
	font-weight: 600;
}

.wds-sidebar .wds-nav__toggle--label {
	margin-top: var(--wds-space-3);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.75;
}

/* Guest bar (light, horizontal on desktop) */
.wds-guestbar .wds-nav__list {
	display: flex;
	align-items: center;
	gap: var(--wds-space-1);
}

.wds-guestbar .wds-nav__link {
	color: var(--wds-color-ink);
}

.wds-guestbar .wds-nav__link:hover {
	background: var(--wds-color-primary-soft);
}

.wds-guestbar .wds-nav__link[aria-current="page"] {
	color: var(--wds-color-primary);
	font-weight: 600;
}

.wds-guestbar .wds-nav__item:last-child .wds-nav__link {
	background: var(--wds-color-primary);
	color: #fff;
	padding-inline: var(--wds-space-4);
}

/* Theme mode: navigation inherits the theme's colours. */
.wds-themed__nav .wds-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wds-space-1);
}

.wds-themed__nav .wds-nav__link[aria-current="page"] {
	font-weight: 600;
	text-decoration: underline;
}

.wds-themed {
	margin-block: var(--wds-space-5);
}

.wds-themed__nav {
	margin-bottom: var(--wds-space-4);
}

/* ---------- Cards and layout helpers ---------- */

.wds-card {
	display: block;
	background: var(--wds-color-surface);
	border: 1px solid var(--wds-color-line);
	border-radius: var(--wds-radius);
	box-shadow: var(--wds-shadow);
	padding: var(--wds-space-5);
	color: var(--wds-color-ink);
}

.wds-card--narrow {
	max-width: 440px;
	margin-inline: auto;
}

.wds-card--form {
	max-width: 720px;
}

.wds-card--flush {
	padding: 0;
	overflow: hidden;
}

.wds-card--link {
	display: flex;
	flex-direction: column;
	gap: var(--wds-space-1);
	text-decoration: none;
	transition: border-color 0.15s ease;
}

.wds-card--link:hover {
	border-color: var(--wds-color-primary);
}

.wds-card__title {
	display: block;
	font-size: 1.0625rem;
	font-weight: 700;
	margin: 0 0 var(--wds-space-3);
}

.wds-card--link .wds-card__title {
	margin: 0;
	color: var(--wds-color-primary);
}

.wds-stack {
	display: grid;
	gap: var(--wds-space-4);
	max-width: 720px;
}

.wds-columns {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: var(--wds-space-4);
	align-items: start;
}

/* Grid children may shrink below their content (wide tables scroll inside). */
.wds-columns > *,
.wds-grid-2 > *,
.wds-stack > * {
	min-width: 0;
}

.wds-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wds-space-4);
	align-items: start;
}

.wds-muted {
	color: var(--wds-color-ink-muted);
	font-size: 0.9375rem;
}

.wds-lead {
	font-size: 1.0625rem;
}

.wds-empty {
	text-align: center;
	color: var(--wds-color-ink-muted);
	padding-block: var(--wds-space-6);
}

.wds-back {
	text-decoration: none;
	font-weight: 600;
}

.wds-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wds-space-3);
	margin-bottom: var(--wds-space-4);
}

.wds-toolbar p {
	margin: 0;
}

/* ---------- Definition lists ---------- */

.wds-details {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: var(--wds-space-2) var(--wds-space-5);
	margin: 0 0 var(--wds-space-3);
}

.wds-details dt {
	color: var(--wds-color-ink-muted);
	font-size: 0.9375rem;
}

.wds-details dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.wds-details--compact {
	gap: var(--wds-space-1) var(--wds-space-4);
	font-size: 0.9375rem;
}

/* ---------- Forms ---------- */

.wds-form {
	display: grid;
	gap: var(--wds-space-4);
}

.wds-form--inline {
	margin-top: var(--wds-space-3);
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
}

.wds-fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	display: grid;
	gap: var(--wds-space-4);
}

.wds-fieldset legend {
	padding: 0;
	margin-bottom: var(--wds-space-3);
	font-weight: 700;
	font-size: 1.0625rem;
}

.wds-fieldset + .wds-fieldset {
	margin-top: var(--wds-space-3);
}

.wds-field {
	display: grid;
	gap: var(--wds-space-1);
	min-width: 0;
}

.wds-label {
	font-weight: 600;
	font-size: 0.9375rem;
}

.wds-required {
	color: var(--wds-color-danger);
}

.wds-hint {
	margin: 0 !important;
	color: var(--wds-color-ink-muted);
	font-size: 0.875rem;
}

.wds-input {
	width: 100%;
	min-height: 44px;
	padding: var(--wds-space-2) var(--wds-space-3);
	border: 1px solid #b9c4bf;
	border-radius: var(--wds-radius-sm);
	background: var(--wds-color-surface);
	color: var(--wds-color-ink);
	font: inherit;
	font-size: 16px; /* Prevents zoom on iOS. */
}

.wds-input:focus {
	border-color: var(--wds-color-primary);
	outline: 3px solid var(--wds-color-primary-soft);
	outline-offset: 0;
}

/* Date pickers keep a wide intrinsic size in Chromium; let them fit narrow columns. */
input[type="date"].wds-input {
	min-width: 0;
	max-width: 100%;
}

input[type="date"].wds-input::-webkit-datetime-edit {
	min-width: 0;
	overflow: hidden;
}

textarea.wds-input {
	min-height: 88px;
	resize: vertical;
}

.wds-field--invalid .wds-input {
	border-color: var(--wds-color-danger);
}

.wds-error {
	margin: 0 !important;
	color: var(--wds-color-danger);
	font-size: 0.875rem;
	font-weight: 600;
}

.wds-field--inline label {
	display: flex;
	align-items: flex-start;
	gap: var(--wds-space-2);
	cursor: pointer;
}

.wds-field--inline input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--wds-color-primary);
}

.wds-field--inline.wds-field--invalid label {
	color: var(--wds-color-danger);
}

.wds-honeypot {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wds-search .wds-input {
	flex: 1;
	min-width: 0;
}

.wds-search {
	display: flex;
	gap: var(--wds-space-2);
	margin-bottom: var(--wds-space-4);
	max-width: 560px;
}

/* ---------- Buttons ---------- */

.wds-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wds-space-2);
	min-height: 44px;
	padding: var(--wds-space-2) var(--wds-space-5);
	border: 1px solid var(--wds-color-primary);
	border-radius: var(--wds-radius-sm);
	background: var(--wds-color-primary);
	color: #fff !important;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	justify-self: start;
}

.wds-button:hover {
	background: var(--wds-color-primary-strong);
	border-color: var(--wds-color-primary-strong);
}

.wds-button--secondary {
	background: var(--wds-color-surface);
	color: var(--wds-color-primary) !important;
	border-color: #b9c4bf;
}

.wds-button--secondary:hover {
	background: var(--wds-color-primary-soft);
	border-color: var(--wds-color-primary);
}

.wds-button--danger {
	background: var(--wds-color-surface);
	color: var(--wds-color-danger) !important;
	border-color: var(--wds-color-danger);
}

.wds-button--danger:hover {
	background: var(--wds-color-danger-soft);
	border-color: var(--wds-color-danger);
}

.wds-button--link {
	min-height: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wds-color-primary) !important;
	font-weight: 600;
}

.wds-button--link:hover {
	background: none;
	text-decoration: underline;
}

.wds-button--block {
	width: 100%;
	justify-self: stretch;
}

/* A button that cannot be used yet (e.g. "Place order" below the minimum)
   must not look like one that can (1.2.1). */
.wds-button:disabled,
.wds-button[aria-disabled="true"] {
	border-color: var(--wds-color-line);
	background: var(--wds-color-line);
	color: var(--wds-color-ink-muted) !important;
	cursor: not-allowed;
}

.wds-button--link:disabled,
.wds-button--link[aria-disabled="true"] {
	background: none;
}

.wds-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wds-space-2);
}

/* ---------- Alerts ---------- */

.wds-alert {
	margin-bottom: var(--wds-space-4);
	padding: var(--wds-space-3) var(--wds-space-4);
	border-radius: var(--wds-radius);
	border-left: 4px solid var(--wds-color-info);
	background: var(--wds-color-info-soft);
	color: var(--wds-color-ink);
}

.wds-alert p:last-child,
.wds-alert ul:last-child {
	margin-bottom: 0;
}

.wds-alert ul {
	margin: var(--wds-space-1) 0 0;
	padding-left: var(--wds-space-5);
}

.wds-alert--success {
	border-color: var(--wds-color-success);
	background: var(--wds-color-success-soft);
}

.wds-alert--warning {
	border-color: var(--wds-color-warning);
	background: var(--wds-color-warning-soft);
}

.wds-alert--error {
	border-color: var(--wds-color-danger);
	background: var(--wds-color-danger-soft);
}

/* ---------- Status badges ---------- */

.wds-status {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.5;
	vertical-align: middle;
	background: var(--wds-color-info-soft);
	color: var(--wds-color-info);
	white-space: nowrap;
}

.wds-status--pending {
	background: var(--wds-color-warning-soft);
	color: var(--wds-color-warning);
}

.wds-status--active {
	background: var(--wds-color-success-soft);
	color: var(--wds-color-success);
}

.wds-status--suspended,
.wds-status--rejected {
	background: var(--wds-color-danger-soft);
	color: var(--wds-color-danger);
}

.wds-count {
	display: inline-block;
	min-width: 22px;
	margin-left: var(--wds-space-1);
	padding: 0 6px;
	border-radius: 11px;
	background: var(--wds-color-canvas);
	font-size: 0.75rem;
	line-height: 20px;
	text-align: center;
}

.wds-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-left: var(--wds-space-1);
	border-radius: 50%;
	background: var(--wds-color-accent);
	vertical-align: middle;
}

/* ---------- Switcher tabs ---------- */

.wds-switcher {
	display: flex;
	gap: var(--wds-space-1);
	margin-bottom: var(--wds-space-4);
	overflow-x: auto;
	border-bottom: 1px solid var(--wds-color-line);
}

.wds-switcher__item {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: var(--wds-space-2) var(--wds-space-4);
	border-bottom: 3px solid transparent;
	color: var(--wds-color-ink-muted) !important;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.wds-switcher__item:hover {
	color: var(--wds-color-ink) !important;
}

.wds-switcher__item.is-current {
	border-bottom-color: var(--wds-color-primary);
	color: var(--wds-color-primary) !important;
}

.wds-switcher__item.is-current .wds-count {
	background: var(--wds-color-primary-soft);
}

/* ---------- Tables ---------- */

.wds-table-scroll {
	overflow-x: auto;
}

.wds-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.wds-table th,
.wds-table td {
	padding: var(--wds-space-3) var(--wds-space-4);
	border-bottom: 1px solid var(--wds-color-line);
	text-align: left;
	vertical-align: top;
}

.wds-table th {
	background: var(--wds-color-canvas);
	color: var(--wds-color-ink-muted);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	white-space: nowrap;
}

.wds-table tbody tr:last-child td {
	border-bottom: 0;
}

.wds-table tbody tr:hover {
	background: #fafbfa;
}

.wds-table code,
.wds-details code {
	font-family: var(--wds-font-mono);
	font-size: 0.875em;
	white-space: nowrap;
}

.wds-pager {
	display: flex;
	align-items: center;
	gap: var(--wds-space-3);
	margin-top: var(--wds-space-4);
}

/* ---------- Lists ---------- */

.wds-list-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--wds-space-3);
}

.wds-notice {
	display: flex;
	gap: var(--wds-space-4);
	align-items: flex-start;
	justify-content: space-between;
	padding: var(--wds-space-4);
}

.wds-notice.is-unread {
	border-left: 4px solid var(--wds-color-accent);
}

.wds-notice__body {
	min-width: 0;
}

.wds-notice__title {
	margin: 0 0 var(--wds-space-1) !important;
	font-size: 1rem !important;
}

.wds-notice__title a {
	text-decoration: none;
}

.wds-notice p {
	margin-bottom: var(--wds-space-1);
}

.wds-plain-list {
	list-style: none;
	margin: 0 0 var(--wds-space-3);
	padding: 0;
}

.wds-plain-list li {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0 var(--wds-space-3);
	padding: var(--wds-space-2) 0;
	border-bottom: 1px solid var(--wds-color-line);
}

.wds-plain-list li:last-child {
	border-bottom: 0;
}

.wds-plain-list li > a {
	flex: 1;
	min-width: 0;
}

.wds-plain-list li.is-unread > a {
	font-weight: 600;
}

.wds-plain-list .wds-dot {
	align-self: center;
}

.wds-plain-list li > .wds-status {
	align-self: flex-start;
}

.wds-visit-list li > a {
	flex: 0 0 auto;
	white-space: nowrap;
}

.wds-visit-list li > .wds-muted {
	flex: 1 1 100%;
}

/* ---------- Dashboard widgets ---------- */

.wds-widgets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wds-space-4);
	align-items: start;
}

.wds-widget--small {
	grid-column: span 1;
}

.wds-widget--medium {
	grid-column: span 2;
}

.wds-widget--wide {
	grid-column: 1 / -1;
}

.wds-widget__lead {
	font-size: 1.125rem;
	font-weight: 600;
}

.wds-widget__footer {
	margin: var(--wds-space-3) 0 0 !important;
	padding-top: var(--wds-space-3);
	border-top: 1px solid var(--wds-color-line);
	font-weight: 600;
}

.wds-widget__footer a {
	text-decoration: none;
}

.wds-widget-welcome {
	background: linear-gradient(135deg, var(--wds-color-primary) 0%, var(--wds-color-primary-strong) 100%);
	border-color: var(--wds-color-primary);
	color: #fff;
}

.wds-widget-welcome .wds-card__title {
	color: var(--wds-color-accent);
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.wds-widget-welcome .wds-widget__lead {
	font-size: 1.5rem;
	color: #fff;
}

.wds-widget-welcome .wds-muted {
	color: rgba(255, 255, 255, 0.8);
}

.wds-stat {
	display: flex;
	align-items: baseline;
	gap: var(--wds-space-2);
}

.wds-stat__value {
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1;
	color: var(--wds-color-primary);
}

.wds-stat__label {
	color: var(--wds-color-ink-muted);
}

/* ---------- Auth pages ---------- */

.wds-auth__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--wds-space-2);
	margin: var(--wds-space-4) 0 0 !important;
	font-size: 0.9375rem;
}

.wds-guest .wds-page-title {
	text-align: center;
}

.wds-guest .wds-card--form {
	margin-inline: auto;
}

.wds-guest .wds-card--form ~ .wds-page-title,
.wds-guest .wds-main:has(.wds-card--form) .wds-page-title {
	text-align: left;
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
	.wds-widgets {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wds-widget--medium {
		grid-column: 1 / -1;
	}

	.wds-columns {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 782px) {
	.wds-app {
		display: block;
	}

	.wds-topbar {
		position: sticky;
		top: 0;
		z-index: 50;
		display: flex;
		align-items: center;
		gap: var(--wds-space-3);
		padding: var(--wds-space-2) var(--wds-space-4);
		background: var(--wds-color-primary);
		color: #fff;
	}

	.wds-menu-toggle {
		display: inline-flex;
	}

	.wds-js .wds-sidebar {
		display: none;
	}

	.wds-sidebar {
		position: fixed;
		top: 60px;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		height: auto;
		padding-top: var(--wds-space-3);
	}

	.wds-js .wds-sidebar.is-open {
		display: flex;
	}

	/* Without JavaScript the menus stay in the page flow, always visible. */
	html:not(.wds-js) .wds-sidebar {
		position: static;
	}

	html:not(.wds-js) .wds-menu-toggle {
		display: none;
	}

	.wds-sidebar__brand {
		display: none;
	}

	.wds-guestbar__inner {
		flex-wrap: wrap;
		gap: var(--wds-space-2);
		padding: var(--wds-space-2) var(--wds-space-4);
	}

	.wds-js .wds-guestbar__nav {
		display: none;
	}

	.wds-guestbar__nav {
		flex-basis: 100%;
		margin: 0;
		padding-bottom: var(--wds-space-2);
	}

	.wds-js .wds-guestbar__nav.is-open {
		display: block;
	}

	.wds-guestbar .wds-nav__list {
		flex-direction: column;
		align-items: stretch;
	}

	.wds-guestbar .wds-nav__item:last-child .wds-nav__link {
		justify-content: center;
		margin-top: var(--wds-space-2);
	}

	.wds-hide-mobile {
		display: none;
	}

	.wds-main {
		padding: var(--wds-space-5) var(--wds-space-4);
	}

	.wds-page-title {
		font-size: 1.375rem;
	}

	.wds-card {
		padding: var(--wds-space-4);
	}

	.wds-card--flush {
		padding: 0;
	}

	.wds-grid-2,
	.wds-widgets,
	.wds-form--inline {
		grid-template-columns: minmax(0, 1fr);
	}

	.wds-widget--small,
	.wds-widget--medium {
		grid-column: 1 / -1;
	}

	.wds-details {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.wds-details dd {
		margin-bottom: var(--wds-space-3);
	}

	.wds-notice {
		flex-direction: column;
		gap: var(--wds-space-2);
	}

	.wds-button {
		width: 100%;
		justify-self: stretch;
	}

	.wds-button--link {
		width: auto;
	}

	.wds-toolbar .wds-button,
	.wds-pager .wds-button,
	.wds-search .wds-button {
		width: auto;
	}

	/* Stack table rows into labelled cards. */
	.wds-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}

	.wds-table tr {
		display: block;
		padding: var(--wds-space-3) var(--wds-space-4);
		border-bottom: 1px solid var(--wds-color-line);
	}

	.wds-table td {
		display: grid;
		grid-template-columns: 110px minmax(0, 1fr);
		gap: var(--wds-space-3);
		padding: var(--wds-space-1) 0;
		border: 0;
	}

	.wds-table td[data-label]::before {
		content: attr(data-label);
		color: var(--wds-color-ink-muted);
		font-size: 0.8125rem;
		font-weight: 600;
	}

	.wds-table tbody tr:last-child {
		border-bottom: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wds-nav__toggle .wds-icon,
	.wds-card--link {
		transition: none;
	}
}

/* ---------- Catalogue (0.3.0) ---------- */

.wds-status--draft {
	background: var(--wds-color-canvas);
	color: var(--wds-color-ink-muted);
}

.wds-status--archived {
	background: var(--wds-color-line);
	color: var(--wds-color-ink);
}

.wds-status--enquiry-new {
	background: var(--wds-color-info-soft);
	color: var(--wds-color-info);
}

.wds-status--enquiry-contacted {
	background: var(--wds-color-warning-soft);
	color: var(--wds-color-warning);
}

.wds-status--enquiry-closed {
	background: var(--wds-color-line);
	color: var(--wds-color-ink);
}

.wds-enquiry-message {
	margin: 0 0 var(--wds-space-4);
	white-space: normal;
	overflow-wrap: anywhere;
}

.wds-status--featured {
	background: var(--wds-color-primary-soft);
	color: var(--wds-color-primary-strong);
}

.wds-stack--wide {
	max-width: none;
}

.wds-section-title {
	margin: var(--wds-space-5) 0 var(--wds-space-3);
	font-size: 1.0625rem;
}

.wds-help-list {
	margin: 0 0 var(--wds-space-3);
	padding-left: var(--wds-space-5);
}

.wds-help-list li + li {
	margin-top: var(--wds-space-1);
}

/* Product filters */

.wds-filters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: var(--wds-space-3);
	align-items: end;
	margin-bottom: var(--wds-space-4);
}

.wds-filters .wds-field {
	margin: 0;
}

.wds-filters__submit {
	display: flex;
	gap: var(--wds-space-2);
	align-items: center;
}

/* Thumbnails */

.wds-thumb-cell {
	width: 64px;
}

.wds-thumb {
	display: block;
	width: 48px;
	height: 48px;
	object-fit: contain;
	background: var(--wds-color-canvas);
	border: 1px solid var(--wds-color-line);
	border-radius: var(--wds-radius-sm);
}

.wds-thumb--empty {
	background:
		linear-gradient(135deg, transparent 47%, var(--wds-color-line) 47%, var(--wds-color-line) 53%, transparent 53%),
		var(--wds-color-canvas);
}

.wds-logo-preview {
	display: block;
	max-width: 160px;
	max-height: 80px;
	margin-bottom: var(--wds-space-2);
	padding: var(--wds-space-2);
	background: var(--wds-color-surface);
	border: 1px solid var(--wds-color-line);
	border-radius: var(--wds-radius-sm);
}

/* Category tree */

.wds-tree-cell {
	padding-left: calc(var(--depth, 0) * 20px);
}

.wds-check-tree {
	display: grid;
	gap: var(--wds-space-1);
	max-height: 320px;
	margin: 0;
	padding: var(--wds-space-2);
	overflow: auto;
	list-style: none;
	background: var(--wds-color-surface);
	border: 1px solid var(--wds-color-line);
	border-radius: var(--wds-radius-sm);
}

.wds-check-tree li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wds-space-2);
	padding: 4px 0 4px calc(var(--depth, 0) * 20px);
}

.wds-check-tree label {
	display: inline-flex;
	align-items: center;
	gap: var(--wds-space-2);
}

.wds-check-tree__primary {
	font-size: 0.8125rem;
	color: var(--wds-color-ink-muted);
}

/* Units */

.wds-units-table td {
	vertical-align: top;
}

@media (min-width: 1025px) {
	.wds-product-form .wds-columns {
		grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
	}
}

.wds-units-table select.wds-input {
	min-width: 150px;
}

.wds-units-table .wds-input--barcode {
	min-width: 150px;
}

.wds-input--number {
	width: 96px;
	font-variant-numeric: tabular-nums;
}

.wds-conversion {
	margin: var(--wds-space-3) 0 0;
	padding: var(--wds-space-2) var(--wds-space-3);
	background: var(--wds-color-primary-soft);
	border-radius: var(--wds-radius-sm);
	color: var(--wds-color-primary-strong);
	font-size: 0.9375rem;
}

/* Images */

.wds-image-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: var(--wds-space-3);
	margin: 0 0 var(--wds-space-3);
	padding: 0;
	list-style: none;
}

.wds-image-list__item {
	display: grid;
	gap: var(--wds-space-2);
	padding: var(--wds-space-2);
	background: var(--wds-color-surface);
	border: 1px solid var(--wds-color-line);
	border-radius: var(--wds-radius-sm);
	font-size: 0.875rem;
}

.wds-image-list__item img {
	width: 100%;
	height: 110px;
	object-fit: contain;
	background: var(--wds-color-canvas);
}

.wds-image-list__item label {
	display: flex;
	align-items: center;
	gap: var(--wds-space-2);
}

.wds-image-list__order .wds-input--number {
	width: 64px;
}

/* Import progress */

.wds-progress {
	height: 12px;
	margin: var(--wds-space-2) 0 var(--wds-space-3);
	overflow: hidden;
	background: var(--wds-color-canvas);
	border: 1px solid var(--wds-color-line);
	border-radius: 999px;
}

.wds-progress > span {
	display: block;
	height: 100%;
	background: var(--wds-color-accent);
}

@media (max-width: 782px) {
	.wds-tree-cell {
		padding-left: 0;
	}

	.wds-thumb-cell {
		width: auto;
	}

	.wds-units-table .wds-input,
	.wds-units-table select {
		width: 100%;
	}
}

/* Customers and pricing (0.4.0) */
.wds-columns--wide {
	grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
}

@media (max-width: 1024px) {
	.wds-columns--wide {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Forms first on narrow screens, so they are not below a long list. */
	.wds-columns--wide > :last-child {
		order: -1;
	}
}

.wds-check {
	display: inline-flex;
	align-items: flex-start;
	gap: var(--wds-space-2);
	font-weight: 600;
	cursor: pointer;
}

.wds-check input {
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--wds-color-primary);
	flex: none;
}

.wds-field--check .wds-hint {
	margin-left: 26px;
}

.wds-check-cell {
	width: 44px;
}

.wds-check-cell input {
	width: 18px;
	height: 18px;
	accent-color: var(--wds-color-primary);
}

.wds-bulk {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--wds-space-3);
	padding: var(--wds-space-4) var(--wds-space-5);
	border-top: 1px solid var(--wds-color-line);
}

.wds-bulk .wds-label {
	flex-basis: 100%;
	margin: 0;
}

.wds-bulk .wds-input {
	flex: 1 1 220px;
	max-width: 360px;
}

.wds-inline-form {
	display: inline;
	margin: 0;
}

.wds-link-button {
	padding: 0;
	border: 0;
	background: none;
	color: var(--wds-color-primary);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.wds-link-button:hover {
	text-decoration: underline;
}

.wds-link-button:focus-visible {
	outline: 3px solid var(--wds-color-accent);
	outline-offset: 2px;
}

.wds-disclosure {
	margin-top: var(--wds-space-4);
	border-top: 1px solid var(--wds-color-line);
	padding-top: var(--wds-space-3);
}

.wds-disclosure > summary {
	color: var(--wds-color-primary);
	font-weight: 600;
	cursor: pointer;
}

.wds-disclosure[open] > summary {
	margin-bottom: var(--wds-space-3);
}

details.wds-card > summary {
	margin: 0;
	cursor: pointer;
}

details.wds-card[open] > summary {
	margin-bottom: var(--wds-space-3);
}

.wds-stack--narrow {
	max-width: 640px;
}

.wds-section-gap {
	margin-top: var(--wds-space-4);
}

.wds-address {
	display: grid;
	gap: var(--wds-space-2);
}

.wds-address address {
	font-style: normal;
}

.wds-card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--wds-space-3);
	padding: var(--wds-space-4) var(--wds-space-5) 0;
}

.wds-card--flush > .wds-card__title {
	padding: var(--wds-space-4) var(--wds-space-5) 0;
}

.wds-card--flush > .wds-empty {
	padding-inline: var(--wds-space-5);
}

.wds-filters--inline {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--wds-space-3);
	padding: var(--wds-space-3) var(--wds-space-5);
	border: 0;
	background: none;
	box-shadow: none;
	margin: 0;
}

.wds-filters--inline .wds-field {
	flex: 1 1 220px;
	margin: 0;
}

.wds-num {
	text-align: right !important;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.wds-table--compact th,
.wds-table--compact td {
	padding: var(--wds-space-2) var(--wds-space-3);
}

.wds-row--win td {
	background: var(--wds-color-success-soft);
	font-weight: 600;
}

.wds-explain + .wds-explain {
	margin-top: var(--wds-space-4);
	padding-top: var(--wds-space-4);
	border-top: 1px solid var(--wds-color-line);
}

.wds-explain__title {
	margin: 0 0 var(--wds-space-2);
	font-size: 1rem;
}

.wds-explain .wds-table-scroll {
	border: 1px solid var(--wds-color-line);
	border-radius: var(--wds-radius);
}

@media (max-width: 782px) {
	.wds-num {
		text-align: left !important;
	}

	.wds-check-cell {
		width: auto;
	}

	.wds-bulk .wds-input {
		max-width: none;
	}
}

.wds-explain .wds-table td:first-child {
	min-width: 160px;
}

.wds-explain .wds-table td:last-child {
	white-space: nowrap;
}

.wds-card:not(.wds-card--flush) > .wds-filters--inline {
	padding-inline: 0;
}

/* Stock (0.5.0) */
.wds-status--posted,
.wds-status--approved,
.wds-status--received {
	background: var(--wds-color-success-soft);
	color: var(--wds-color-success);
}

.wds-status--submitted,
.wds-status--dispatched {
	background: var(--wds-color-warning-soft);
	color: var(--wds-color-warning);
}

.wds-status--cancelled,
.wds-status--inactive {
	background: var(--wds-color-canvas);
	color: var(--wds-color-ink-muted);
}

.wds-text-danger {
	color: var(--wds-color-danger);
}

.wds-held {
	display: inline-block;
	margin-top: 0.25rem;
	font-size: 0.8125rem;
	color: var(--wds-color-warning);
}

.wds-text-warning {
	color: var(--wds-color-warning);
}

.wds-row--warn td {
	background: var(--wds-color-warning-soft);
}

.wds-input--invalid {
	border-color: var(--wds-color-danger);
}

.wds-input--narrow {
	width: 6rem;
	min-width: 0;
	display: inline-block;
}

/* Contains the visually hidden labels, which would otherwise widen the page. */
.wds-table-scroll {
	position: relative;
}

.wds-lines .wds-table td {
	vertical-align: top;
}

.wds-lines .wds-input {
	min-width: 0;
	width: 100%;
	padding: 6px 8px;
}

.wds-lines__cell--s {
	width: 6.5rem;
}

.wds-lines__cell--m {
	width: 9rem;
}

.wds-lines__cell--l {
	width: 11rem;
}

/* Inputs keep a usable width; the grid scrolls sideways when it is wider than the card. */
.wds-lines__cell--s .wds-input {
	min-width: 5.5rem;
}

.wds-lines__cell--m .wds-input {
	min-width: 8rem;
}

.wds-lines__cell--l .wds-input {
	min-width: 10rem;
}

.wds-lines__table {
	min-width: 760px;
}

.wds-lines .wds-error {
	margin: 4px 0 0;
	font-size: 0.8125rem;
}

.wds-lines > p {
	margin: var(--wds-space-3) 0 0;
}

.wds-meta {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: var(--wds-space-1) var(--wds-space-3);
	margin: var(--wds-space-3) 0;
}

.wds-meta dt {
	color: var(--wds-color-ink-muted);
}

.wds-meta dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.wds-card__foot {
	padding: var(--wds-space-4) var(--wds-space-5);
	border-top: 1px solid var(--wds-color-line);
}

.wds-card--flush > .wds-card__title + .wds-table-scroll,
.wds-card--flush > form > .wds-table-scroll {
	margin-top: var(--wds-space-3);
}

@media (max-width: 782px) {
	.wds-lines__table {
		min-width: 0;
	}

	.wds-lines__cell--s,
	.wds-lines__cell--m,
	.wds-lines__cell--l {
		width: auto;
	}

	.wds-lines__cell .wds-input {
		min-width: 0;
	}

	.wds-meta {
		grid-template-columns: 1fr;
	}
}

/* Orders and payments (0.6.0) */
.wds-status--placed {
	background: var(--wds-color-info-soft);
	color: var(--wds-color-info);
}

.wds-status--confirmed,
.wds-status--pay-partly_paid {
	background: var(--wds-color-warning-soft);
	color: var(--wds-color-warning);
}

.wds-status--delivered,
.wds-status--completed,
.wds-status--verified,
.wds-status--pay-paid {
	background: var(--wds-color-success-soft);
	color: var(--wds-color-success);
}

.wds-status--pay-unpaid {
	background: var(--wds-color-canvas);
	color: var(--wds-color-ink-muted);
}

.wds-tabs {
	display: flex;
	gap: var(--wds-space-1);
	margin: 0 0 var(--wds-space-4);
	border-bottom: 1px solid var(--wds-color-line);
	overflow-x: auto;
	scrollbar-width: thin;
}

.wds-tabs__tab {
	display: inline-flex;
	align-items: center;
	gap: var(--wds-space-2);
	padding: var(--wds-space-2) var(--wds-space-3);
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
	color: var(--wds-color-ink-muted);
	text-decoration: none;
	white-space: nowrap;
}

.wds-tabs__tab:hover,
.wds-tabs__tab:focus-visible {
	color: var(--wds-color-ink);
}

.wds-tabs__tab.is-current {
	border-bottom-color: var(--wds-color-primary);
	color: var(--wds-color-primary);
	font-weight: 600;
}

.wds-tabs__count {
	min-width: 1.5rem;
	padding: 0 0.375rem;
	border-radius: 999px;
	background: var(--wds-color-canvas);
	font-size: 0.75rem;
	text-align: center;
}

.wds-totals {
	display: grid;
	grid-template-columns: 1fr auto;
	row-gap: var(--wds-space-2);
	margin: 0 0 var(--wds-space-4);
}

.wds-card.wds-fieldset {
	display: block;
	padding: var(--wds-space-5);
	border: 1px solid var(--wds-color-line);
}

/* Floated so the legend sits inside the card like other card titles. */
.wds-card.wds-fieldset > legend {
	float: left;
	width: 100%;
	margin-bottom: var(--wds-space-4);
}

.wds-card.wds-fieldset > legend + * {
	clear: both;
}

.wds-card.wds-fieldset > * + *:not(legend + *) {
	margin-top: var(--wds-space-3);
}

.wds-totals dt {
	color: var(--wds-color-ink-muted);
}

.wds-totals dd {
	margin: 0;
	padding-left: var(--wds-space-4);
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.wds-totals__total {
	padding-top: var(--wds-space-2);
	border-top: 1px solid var(--wds-color-line);
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--wds-color-ink) !important;
}

.wds-choices {
	display: grid;
	gap: var(--wds-space-2);
}

.wds-choice {
	display: flex;
	gap: var(--wds-space-3);
	align-items: flex-start;
	padding: var(--wds-space-3);
	border: 1px solid var(--wds-color-line);
	border-radius: var(--wds-radius);
	cursor: pointer;
}

.wds-choice input {
	margin-top: 0.2rem;
	flex: none;
}

.wds-choice:has(input:checked) {
	border-color: var(--wds-color-primary);
	background: var(--wds-color-primary-soft);
}

.wds-choice:has(input:focus-visible) {
	outline: 2px solid var(--wds-color-primary);
	outline-offset: 2px;
}

.wds-ordering-for {
	padding: var(--wds-space-2) var(--wds-space-3);
	border-radius: var(--wds-radius);
	background: var(--wds-color-info-soft);
	color: var(--wds-color-info);
}

.wds-checkout__lines {
	list-style: none;
	margin: 0 0 var(--wds-space-4);
	padding: 0;
}

.wds-checkout__lines li {
	display: flex;
	justify-content: space-between;
	gap: var(--wds-space-3);
	padding: var(--wds-space-2) 0;
	border-bottom: 1px solid var(--wds-color-line);
}

.wds-checkout__lines .wds-error {
	display: block;
}

.wds-checkout__summary,
.wds-cart__summary {
	position: sticky;
	top: var(--wds-space-4);
}

.wds-pad {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: var(--wds-space-3);
	align-items: start;
}

.wds-pad .wds-field {
	margin: 0;
}

.wds-pad__submit {
	padding-top: 1.6rem;
}

.wds-row--removed td {
	color: var(--wds-color-ink-muted);
	text-decoration: line-through;
}

.wds-row--removed td:last-child {
	text-decoration: none;
}

.wds-order-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: var(--wds-space-4);
	align-items: start;
	margin-bottom: var(--wds-space-4);
}

.wds-order-head > .wds-alert {
	grid-column: 1 / -1;
	margin: 0;
}

.wds-order-head__no {
	margin: 0 0 var(--wds-space-2);
	font-family: var(--wds-font-mono);
	font-size: 1.375rem;
}

.wds-order-head__main p {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wds-space-2);
	margin: 0;
}

.wds-timeline {
	list-style: none;
	margin: 0;
	padding: 0 0 0 var(--wds-space-4);
	border-left: 2px solid var(--wds-color-line);
}

.wds-timeline li {
	position: relative;
	padding: 0 0 var(--wds-space-3);
}

.wds-timeline li::before {
	content: "";
	position: absolute;
	left: calc(-1 * var(--wds-space-4) - 6px);
	top: 0.35rem;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wds-color-primary);
}

.wds-action {
	margin-bottom: var(--wds-space-2);
}

.wds-action > summary {
	display: flex;
	width: 100%;
	justify-content: center;
	list-style: none;
	cursor: pointer;
}

.wds-action > summary::-webkit-details-marker {
	display: none;
}

.wds-action--danger {
	color: var(--wds-color-danger) !important;
	border-color: var(--wds-color-danger) !important;
}

.wds-action__form {
	margin-top: var(--wds-space-2);
	padding: var(--wds-space-3);
	border: 1px solid var(--wds-color-line);
	border-radius: var(--wds-radius);
	background: var(--wds-color-canvas);
}

.wds-bank {
	padding: var(--wds-space-3);
	margin-bottom: var(--wds-space-4);
	border: 1px dashed var(--wds-color-primary);
	border-radius: var(--wds-radius);
	background: var(--wds-color-primary-soft);
}

.wds-bank > p:first-child {
	margin-top: 0;
}

/* Muted grey falls below 4.5:1 on the soft green of the bank details and of
   a chosen option, so text there uses the full ink colour (1.2.1). */
.wds-bank .wds-muted,
.wds-bank dt,
.wds-choice:has(input:checked) .wds-muted {
	color: var(--wds-color-ink);
}

.wds-copy {
	font-family: var(--wds-font-mono);
	letter-spacing: 0.05em;
	user-select: all;
}

.wds-payments {
	list-style: none;
	margin: 0 0 var(--wds-space-4);
	padding: 0;
}

.wds-payments li {
	padding: var(--wds-space-2) 0;
	border-bottom: 1px solid var(--wds-color-line);
}

.wds-proof {
	display: block;
	max-width: 100%;
	max-height: 480px;
	border: 1px solid var(--wds-color-line);
	border-radius: var(--wds-radius);
}

.wds-card__subtitle,
.wds-widget__subtitle {
	margin: var(--wds-space-4) 0 var(--wds-space-2);
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wds-color-ink-muted);
}

.wds-stat-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wds-space-2) var(--wds-space-5);
	margin-bottom: var(--wds-space-3);
}

.wds-stat-row .wds-stat {
	margin: 0;
}

.wds-list {
	list-style: none;
	margin: 0 0 var(--wds-space-3);
	padding: 0;
}

.wds-list li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wds-space-2);
	padding: var(--wds-space-2) 0;
	border-bottom: 1px solid var(--wds-color-line);
}

@media (max-width: 1024px) {
	/* The summary holds the checkout button, so it stays after the lines. */
	.wds-columns--wide.wds-cart > :last-child,
	.wds-columns--wide.wds-checkout > :last-child {
		order: 0;
	}

	.wds-checkout__summary,
	.wds-cart__summary {
		position: static;
	}
}

@media (max-width: 782px) {
	.wds-order-head {
		grid-template-columns: minmax(0, 1fr);
	}

	.wds-pad {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.wds-pad .wds-field:first-child {
		grid-column: 1 / -1;
	}

	.wds-pad__submit {
		padding-top: 0;
	}
}

details.wds-inline-form {
	display: block;
	margin-top: var(--wds-space-1);
}

details.wds-inline-form > summary {
	cursor: pointer;
}

details.wds-inline-form > summary:not(.wds-button) {
	display: inline;
	list-style: none;
	font-size: 0.875rem;
	color: var(--wds-color-danger);
	text-decoration: underline;
}

details.wds-inline-form > summary::-webkit-details-marker {
	display: none;
}

details.wds-inline-form[open] > form {
	margin-top: var(--wds-space-2);
	padding: var(--wds-space-3);
	border: 1px solid var(--wds-color-line);
	border-radius: var(--wds-radius);
	background: var(--wds-color-canvas);
}

/* Purchasing (0.7.0) */
.wds-status--po-draft,
.wds-status--po-closed,
.wds-status--po-cancelled {
	background: var(--wds-color-canvas);
	color: var(--wds-color-ink-muted);
}

.wds-status--po-awaiting_approval,
.wds-status--po-partly_received {
	background: var(--wds-color-warning-soft);
	color: var(--wds-color-warning);
}

.wds-status--po-approved,
.wds-status--po-sent {
	background: var(--wds-color-info-soft);
	color: var(--wds-color-info);
}

.wds-status--po-received,
.wds-status--preferred {
	background: var(--wds-color-success-soft);
	color: var(--wds-color-success);
}

.wds-late,
.wds-stat__value--alert {
	color: var(--wds-color-danger);
	font-weight: 600;
}

.wds-tabs__count--alert {
	background: var(--wds-color-danger-soft);
	color: var(--wds-color-danger);
}

.wds-flush-body {
	margin: 0;
	padding: var(--wds-space-3) var(--wds-space-5) var(--wds-space-4);
}

details.wds-flush-body > summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--wds-color-primary);
}

details.wds-flush-body[open] > form {
	margin-top: var(--wds-space-3);
}

.wds-toolbar > .wds-actions {
	display: inline-flex;
	flex-wrap: wrap;
	gap: var(--wds-space-2);
	margin-left: auto;
}

.wds-card--flush > .wds-table-scroll .wds-table tfoot th,
.wds-card--flush > .wds-table-scroll .wds-table tfoot td {
	border-top: 1px solid var(--wds-color-line);
}

.wds-table tfoot td {
	background: var(--wds-color-canvas);
}

.wds-grid-2 + .wds-grid-2 {
	margin-top: var(--wds-space-3);
}

/* Fulfilment card on the order page (0.8.0). */
.wds-flush-table .wds-num {
	white-space: nowrap;
}

.wds-flush-table td:first-child {
	min-width: 9rem;
}

.wds-panel-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wds-space-2);
	margin: var(--wds-space-4) 0 var(--wds-space-2);
}

.wds-panel-actions > form {
	margin: 0;
}

.wds-panel-actions + details.wds-inline-form,
.wds-flush-table + .wds-widget__subtitle,
.wds-panel-actions ~ .wds-widget__subtitle {
	margin-top: var(--wds-space-4);
}

/* Quantity and unit side by side in fulfilment forms (0.8.0). */
.wds-qty-unit {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wds-space-2);
	align-items: center;
}

.wds-qty-unit .wds-input--qty {
	flex: 0 0 5rem;
	width: 5rem;
}

.wds-qty-unit select.wds-input {
	flex: 1 1 7rem;
	min-width: 7rem;
}

.wds-table td select.wds-input {
	min-width: 10rem;
}

.wds-receive-foot > .wds-button {
	margin-top: var(--wds-space-3);
}

/* Finance (0.9.0) */
.wds-status--inv-open {
	background: var(--wds-color-info-soft);
	color: var(--wds-color-info);
}

.wds-status--inv-overdue {
	background: var(--wds-color-danger-soft);
	color: var(--wds-color-danger);
}

.wds-status--inv-paid {
	background: var(--wds-color-success-soft);
	color: var(--wds-color-success);
}

.wds-status--inv-credited {
	background: var(--wds-color-canvas);
	color: var(--wds-color-ink-muted);
}

/* Sales reps (0.10.0) */
.wds-status--visit-planned {
	background: var(--wds-color-info-soft);
	color: var(--wds-color-info);
}

.wds-status--visit-in_progress {
	background: var(--wds-color-warning-soft);
	color: var(--wds-color-warning);
}

.wds-status--visit-done {
	background: var(--wds-color-success-soft);
	color: var(--wds-color-success);
}

.wds-status--visit-missed {
	background: var(--wds-color-danger-soft);
	color: var(--wds-color-danger);
}

.wds-status--visit-cancelled {
	background: var(--wds-color-canvas);
	color: var(--wds-color-ink-muted);
}

.wds-progress--small {
	height: 6px;
	margin: var(--wds-space-1) 0;
	min-width: 80px;
}

.wds-card--flush > .wds-flush-note {
	padding: var(--wds-space-3) var(--wds-space-5) var(--wds-space-4);
	margin: 0;
}

.wds-filters--compact {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	margin-left: auto;
}

@media (max-width: 782px) {

	.wds-filters--compact {
		margin-left: 0;
	}
}

.wds-nowrap {
	white-space: nowrap;
}

.wds-plain-list li > a.wds-nowrap {
	flex: 0 0 auto;
}

/* Reports (0.11.0) */
.wds-small {
	font-size: 0.8125rem;
}

.wds-report-groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: var(--wds-space-4);
	align-items: start;
}

.wds-report-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wds-report-list li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: var(--wds-space-3) 0;
	border-top: 1px solid var(--wds-color-line);
}

.wds-report-list li:first-child {
	border-top: 0;
	padding-top: 0;
}

.wds-presets {
	margin: calc(-1 * var(--wds-space-2)) 0 var(--wds-space-4);
	font-size: 0.875rem;
}

.wds-presets a.is-current {
	font-weight: 700;
	text-decoration: none;
	color: var(--wds-color-ink);
}

.wds-table--report td.wds-num,
.wds-table--report th.wds-num {
	text-align: right;
	white-space: nowrap;
}

.wds-table--report td:first-child {
	min-width: 9rem;
}

.wds-negative {
	color: var(--wds-color-danger);
}

.wds-report-notes {
	max-width: 70ch;
	margin-top: var(--wds-space-5);
}

.wds-small-heading {
	margin: 0 0 var(--wds-space-2);
	font-size: 0.875rem;
	font-weight: 700;
}

.wds-bars {
	display: grid;
	gap: var(--wds-space-1);
	margin: var(--wds-space-3) 0;
	padding: 0;
	list-style: none;
}

.wds-bars__row {
	display: grid;
	grid-template-columns: 3.5rem minmax(0, 1fr) auto;
	gap: var(--wds-space-2);
	align-items: center;
	font-size: 0.8125rem;
}

.wds-bars__label {
	color: var(--wds-color-ink-muted);
	white-space: nowrap;
}

.wds-bars__track {
	height: 10px;
	border-radius: 5px;
	background: var(--wds-color-canvas);
	overflow: hidden;
}

.wds-bars__fill {
	display: block;
	height: 100%;
	border-radius: 5px;
	background: var(--wds-color-primary);
}

.wds-bars__value {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.wds-status--export-queued,
.wds-status--export-running {
	background: var(--wds-color-info-soft);
	color: var(--wds-color-info);
}

.wds-status--export-done {
	background: var(--wds-color-success-soft);
	color: var(--wds-color-success);
}

.wds-status--export-failed {
	background: var(--wds-color-danger-soft);
	color: var(--wds-color-danger);
}

@media (max-width: 782px) {

	.wds-table--report td.wds-num {
		text-align: left;
	}
}
