/* Settings > Dropshipping > Overview: dashboard below the sales card. Everything is scoped to .wc-ds-odash. */

.wc-ds-odash {
	margin-top: 24px;
	color: #1d2327;
}

.wc-ds-odash *,
.wc-ds-odash *::before,
.wc-ds-odash *::after {
	box-sizing: border-box;
}

.wc-ds-odash__bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 6px;
	margin: 0 0 8px;
	font-size: 12px;
	color: #646970;
}

.wc-ds-odash__bar .button-link {
	font-size: 12px;
}

.wc-ds-odash__loading {
	margin: 8px 0 0;
	color: #646970;
	font-size: 13px;
}

/* Skeleton while loading */
.wc-ds-odash__skeleton {
	margin-bottom: 4px;
}

.wc-ds-odash__skel {
	border-radius: 6px;
	background: linear-gradient(90deg, #f0f0f1 25%, #f6f7f7 50%, #f0f0f1 75%);
	background-size: 200% 100%;
	animation: wc-ds-odash-shimmer 1.4s ease-in-out infinite;
}

.wc-ds-odash__skel--line {
	height: 44px;
	margin-bottom: 16px;
}

.wc-ds-odash__skel--tile {
	height: 96px;
}

.wc-ds-odash__skel--card {
	height: 180px;
}

@keyframes wc-ds-odash-shimmer {
	0% {
		background-position: 100% 0;
	}
	100% {
		background-position: -100% 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wc-ds-odash__skel {
		animation: none;
	}
}

.wc-ds-odash__results.is-loading > :not(.wc-ds-odash__skeleton):not(.wc-ds-odash__loading) {
	opacity: 0.6;
}

/* Today line */
.wc-ds-odash__line {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	align-items: center;
	padding: 12px 16px;
	margin-bottom: 16px;
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	border-radius: 6px;
	font-size: 14px;
}

.wc-ds-odash__line strong {
	font-weight: 600;
}

.wc-ds-odash__sep {
	color: #8c8f94;
}

.wc-ds-odash__up {
	color: #00a32a;
	font-weight: 600;
}

.wc-ds-odash__down,
.wc-ds-odash__down .woocommerce-Price-amount {
	color: #d63638;
	font-weight: 600;
}

.wc-ds-odash__muted {
	color: #646970;
}

.wc-ds-odash__small {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: #646970;
}

.wc-ds-odash__none {
	color: #8c8f94;
	cursor: help;
}

/* Tiles */
.wc-ds-odash__tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.wc-ds-odash__tile {
	min-width: 0;
	background: #fff;
	border: 1px solid #dcdcde;
	border-top: 3px solid #2271b1;
	border-radius: 6px;
	padding: 14px 16px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wc-ds-odash__tile--warn {
	border-top-color: #dba617;
}

.wc-ds-odash__tile--bad {
	border-top-color: #d63638;
}

.wc-ds-odash__tile--ok {
	border-top-color: #00a32a;
}

.wc-ds-odash__tile-label {
	font-size: 12px;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-weight: 600;
}

.wc-ds-odash__tile-value {
	font-size: 28px;
	font-weight: 600;
	line-height: 1.2;
	margin: 6px 0 2px;
}

.wc-ds-odash__tile-sub {
	font-size: 13px;
	color: #646970;
}

/* Cards */
.wc-ds-odash__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 16px;
	margin-bottom: 16px;
}

.wc-ds-odash__grid--one {
	grid-template-columns: minmax(0, 1fr);
}

.wc-ds-odash__card {
	min-width: 0;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	padding: 16px 18px;
}

.wc-ds-odash__card h3 {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 600;
}

.wc-ds-odash__desc {
	margin: 0 0 12px;
	color: #646970;
	font-size: 13px;
}

.wc-ds-odash__empty {
	margin: 0;
	padding: 10px 12px;
	background: #f6f7f7;
	border-radius: 4px;
	color: #50575e;
	font-size: 13px;
}

.wc-ds-odash__empty--ok {
	background: #edfaef;
	color: #00631d;
}

.wc-ds-odash__empty--error {
	background: #fcf0f1;
	color: #8a2424;
}

.wc-ds-odash a.wc-ds-odash__more {
	display: inline-block;
	margin-top: 10px;
	font-size: 13px;
	text-decoration: none;
}

/* Fix next */
.wc-ds-odash__fix-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wc-ds-odash__fix-item {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	gap: 10px;
	align-items: center;
	margin: 0;
	padding: 9px 0;
	border-top: 1px solid #f0f0f1;
	font-size: 13px;
}

.wc-ds-odash__fix-item:first-child {
	border-top: 0;
}

.wc-ds-odash__badge {
	display: inline-block;
	min-width: 72px;
	text-align: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}

.wc-ds-odash__badge--bad {
	background: #fcf0f1;
	color: #b32d2e;
}

.wc-ds-odash__badge--warn {
	background: #fcf9e8;
	color: #8a6d00;
}

.wc-ds-odash__badge--info {
	background: #f0f6fc;
	color: #135e96;
}

.wc-ds-odash__fix-text {
	overflow-wrap: anywhere;
}

.wc-ds-odash__risk {
	color: #646970;
	white-space: nowrap;
}

.wc-ds-odash__fix-item .button {
	white-space: nowrap;
}

/* Fix next as a priority cloud: tile size from WC_DS_Overview_Dashboard_Data::fix_tiers(), list order = priority. */
.wc-ds-odash__fix-list--cloud {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 18px 14px;
	padding: 8px 0 12px;
}

.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item {
	--wc-ds-fix-dy: 0px;
	--wc-ds-fix-count: 20px;
	--wc-ds-fix-label: 12px;
	--wc-ds-fix-min: 130px;
	--wc-ds-fix-max: 210px;
	--wc-ds-fix-pad: 8px 12px;
	display: block;
	flex: 0 1 auto;
	min-width: 0;
	max-width: 100%;
	padding: 0;
	border-top: 0;
	transform: translateY(var(--wc-ds-fix-dy));
}

/* Fixed (not random) offsets for a looser, cloud-like line-up. */
.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item:nth-child(4n+2) {
	--wc-ds-fix-dy: 6px;
}

.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item:nth-child(4n+3) {
	--wc-ds-fix-dy: -5px;
}

.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item:nth-child(4n) {
	--wc-ds-fix-dy: 3px;
}

.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item--tier-1 {
	--wc-ds-fix-count: 46px;
	--wc-ds-fix-label: 15px;
	--wc-ds-fix-min: 280px;
	--wc-ds-fix-max: 380px;
	--wc-ds-fix-pad: 20px 26px;
}

.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item--tier-2 {
	--wc-ds-fix-count: 38px;
	--wc-ds-fix-label: 14px;
	--wc-ds-fix-min: 210px;
	--wc-ds-fix-max: 280px;
	--wc-ds-fix-pad: 16px 22px;
}

.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item--tier-3 {
	--wc-ds-fix-count: 30px;
	--wc-ds-fix-label: 13px;
	--wc-ds-fix-min: 175px;
	--wc-ds-fix-max: 250px;
	--wc-ds-fix-pad: 13px 18px;
}

.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item--tier-4 {
	--wc-ds-fix-count: 24px;
	--wc-ds-fix-label: 12px;
	--wc-ds-fix-min: 150px;
	--wc-ds-fix-max: 230px;
	--wc-ds-fix-pad: 10px 14px;
}

.wc-ds-odash a.wc-ds-odash__fix-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: var(--wc-ds-fix-min);
	max-width: var(--wc-ds-fix-max);
	padding: var(--wc-ds-fix-pad);
	background: #f0f6fc;
	border: 1px solid rgba(34, 113, 177, 0.3);
	border-radius: 18px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	color: #1d2327;
	text-align: center;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.wc-ds-odash__fix-item--bad a.wc-ds-odash__fix-tile {
	background: #fcf0f1;
	border-color: rgba(214, 54, 56, 0.35);
}

.wc-ds-odash__fix-item--warn a.wc-ds-odash__fix-tile {
	background: #fcf9e8;
	border-color: rgba(219, 166, 23, 0.5);
}

.wc-ds-odash__fix-item--tier-1 a.wc-ds-odash__fix-tile {
	border-width: 2px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wc-ds-odash a.wc-ds-odash__fix-tile:hover {
	color: #1d2327;
	border-color: #2271b1;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.wc-ds-odash__fix-item--bad a.wc-ds-odash__fix-tile:hover {
	border-color: #d63638;
}

.wc-ds-odash__fix-item--warn a.wc-ds-odash__fix-tile:hover {
	border-color: #dba617;
}

.wc-ds-odash a.wc-ds-odash__fix-tile:focus {
	color: #1d2327;
	outline: 2px solid #2271b1;
	outline-offset: 3px;
	box-shadow: 0 0 0 1px #fff, 0 4px 12px rgba(0, 0, 0, 0.12);
}

.wc-ds-odash a.wc-ds-odash__fix-tile:focus:not(:focus-visible) {
	outline: none;
}

.wc-ds-odash__fix-tile .wc-ds-odash__badge {
	min-width: 0;
}

.wc-ds-odash__fix-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.wc-ds-odash__fix-count {
	font-size: var(--wc-ds-fix-count);
	font-weight: 700;
	line-height: 1;
	color: #135e96;
}

.wc-ds-odash__fix-item--bad .wc-ds-odash__fix-count {
	color: #b32d2e;
}

.wc-ds-odash__fix-item--warn .wc-ds-odash__fix-count {
	color: #8a6d00;
}

.wc-ds-odash__fix-label {
	font-size: var(--wc-ds-fix-label);
	font-weight: 500;
	line-height: 1.3;
}

.wc-ds-odash__fix-tile .wc-ds-odash__risk {
	font-size: 12px;
	font-weight: 600;
	color: #50575e;
	white-space: normal;
}

.wc-ds-odash__fix-item--bad .wc-ds-odash__risk {
	color: #b32d2e;
}

.wc-ds-odash__fix-cta {
	font-size: 12px;
	font-weight: 600;
	color: #2271b1;
}

.wc-ds-odash a.wc-ds-odash__fix-tile:hover .wc-ds-odash__fix-cta {
	text-decoration: underline;
}

@media (prefers-reduced-motion: no-preference) {
	.wc-ds-odash a.wc-ds-odash__fix-tile {
		transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
	}

	.wc-ds-odash a.wc-ds-odash__fix-tile:hover {
		transform: translateY(-2px);
	}
}

/* Fulfilment speed */
.wc-ds-odash__speed {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.wc-ds-odash__speed th,
.wc-ds-odash__speed td {
	padding: 8px 0;
	border-top: 1px solid #f0f0f1;
	vertical-align: middle;
	text-align: left;
	font-weight: 400;
}

.wc-ds-odash__speed tr:first-child th,
.wc-ds-odash__speed tr:first-child td {
	border-top: 0;
}

.wc-ds-odash__bar-cell {
	width: 34%;
	padding-left: 12px !important;
	padding-right: 12px !important;
}

.wc-ds-odash__meter {
	display: block;
	height: 8px;
	background: #f0f0f1;
	border-radius: 4px;
	overflow: hidden;
}

.wc-ds-odash__meter > span {
	display: block;
	height: 100%;
	background: #2271b1;
}

.wc-ds-odash__meter--ok > span {
	background: #00a32a;
}

.wc-ds-odash__val {
	font-weight: 600;
	text-align: right !important;
	white-space: nowrap;
}

/* Catalogue health */
.wc-ds-odash__health {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px;
}

.wc-ds-odash__health-item {
	min-width: 0;
	background: #f6f7f7;
	border-radius: 4px;
	padding: 10px 12px;
	font-size: 13px;
}

.wc-ds-odash__health-item b {
	display: block;
	margin-bottom: 2px;
	font-size: 20px;
	font-weight: 600;
}

.wc-ds-odash__health-item--bad b {
	color: #b32d2e;
}

.wc-ds-odash__health-item--warn b {
	color: #8a6d00;
}

.wc-ds-odash__prog {
	display: block;
	height: 6px;
	margin-top: 6px;
	background: #dcdcde;
	border-radius: 3px;
	overflow: hidden;
}

.wc-ds-odash__prog > span {
	display: block;
	height: 100%;
	background: #00a32a;
}

/* Tables */
.wc-ds-odash__table-wrap {
	max-width: 100%;
	overflow-x: auto;
}

.wc-ds-odash__tbl {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.wc-ds-odash__tbl th {
	text-align: left;
	font-weight: 600;
	color: #646970;
	font-size: 12px;
	padding: 6px;
	border-bottom: 1px solid #dcdcde;
}

.wc-ds-odash__tbl td {
	padding: 8px 6px;
	border-bottom: 1px solid #f0f0f1;
	overflow-wrap: anywhere;
}

.wc-ds-odash__tbl .num {
	text-align: right;
	white-space: nowrap;
}

.wc-ds-odash__tbl tr.is-negative td:first-child a,
.wc-ds-odash__tbl tr.is-negative td:first-child {
	color: #b32d2e;
}

.wc-ds-odash__tag {
	display: inline-block;
	margin-left: 4px;
	padding: 0 6px;
	border-radius: 999px;
	background: #f0f0f1;
	color: #50575e;
	font-size: 11px;
}

.wc-ds-odash__grade {
	display: inline-block;
	width: 24px;
	height: 24px;
	line-height: 24px;
	border-radius: 50%;
	text-align: center;
	font-weight: 700;
	font-size: 12px;
	color: #fff;
	background: #8c8f94;
}

.wc-ds-odash__grade--a {
	background: #00a32a;
}

.wc-ds-odash__grade--b {
	background: #2271b1;
}

.wc-ds-odash__grade--c {
	background: #dba617;
}

.wc-ds-odash__grade--d {
	background: #d63638;
}

/* System status strip */
.wc-ds-odash__status {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	font-size: 13px;
	color: #50575e;
}

.wc-ds-odash__dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 6px;
	border-radius: 50%;
	background: #00a32a;
	vertical-align: middle;
}

.wc-ds-odash__dot--warn {
	background: #dba617;
}

.wc-ds-odash__foot {
	margin: 10px 0 0;
	font-size: 12px;
	color: #646970;
}

/* Responsive */
@media (max-width: 1100px) {
	.wc-ds-odash__tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 960px) {
	.wc-ds-odash__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 600px) {
	.wc-ds-odash__tiles,
	.wc-ds-odash__health {
		grid-template-columns: minmax(0, 1fr);
	}

	.wc-ds-odash__fix-item {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.wc-ds-odash__fix-item .wc-ds-odash__risk {
		grid-column: 1 / 2;
		white-space: normal;
	}

	.wc-ds-odash__fix-item .button {
		justify-self: end;
	}

	.wc-ds-odash__fix-list--cloud {
		align-items: stretch;
		gap: 10px;
	}

	.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item,
	.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item:nth-child(n) {
		--wc-ds-fix-dy: 0px;
		--wc-ds-fix-min: 0;
	}

	/* Width by tier (no growing), so a low-priority tile never ends up wider than a higher one. */
	.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item--tier-1 {
		--wc-ds-fix-count: 36px;
		flex-basis: 100%;
	}

	.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item--tier-2 {
		--wc-ds-fix-count: 30px;
		flex-basis: calc(50% - 5px);
	}

	.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item--tier-3 {
		--wc-ds-fix-count: 26px;
		flex-basis: calc(50% - 5px);
	}

	.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item--tier-4 {
		--wc-ds-fix-count: 22px;
	}

	.wc-ds-odash__fix-list--cloud .wc-ds-odash__fix-item--tier-5 {
		--wc-ds-fix-count: 18px;
	}

	.wc-ds-odash a.wc-ds-odash__fix-tile {
		max-width: none;
		height: 100%;
	}

	.wc-ds-odash__bar-cell {
		width: 25%;
	}
}
