/* Charge status colours, shared by the dashboard, the charge lists and the charge headers.
   Semi-transparent fills so they read on the light and the dark theme. */
.cs-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
	white-space: nowrap;
	line-height: 1.4;
	border: 1px solid transparent;
}

.cs-created { border: 1px dashed rgba(128, 128, 128, 0.7); color: var(--bs-secondary-color, #6c757d); }
.cs-released { background: rgba(43, 120, 197, 0.18); color: #3a87d6; }
.cs-running { background: rgba(71, 134, 60, 0.22); color: #4f9a42; }
.cs-ready { background: rgba(217, 130, 43, 0.22); color: #d9822b; }
.cs-finished { background: rgba(128, 128, 128, 0.18); color: var(--bs-secondary-color, #6c757d); }

/* Left stripe for list rows and grid rows */
.cs-stripe-created { box-shadow: inset 4px 0 0 rgba(128, 128, 128, 0.45); }
.cs-stripe-released { box-shadow: inset 4px 0 0 #3a87d6; }
.cs-stripe-running { box-shadow: inset 4px 0 0 #4f9a42; }
.cs-stripe-ready { box-shadow: inset 4px 0 0 #d9822b; }
.cs-stripe-finished { box-shadow: inset 4px 0 0 rgba(128, 128, 128, 0.3); }

.cs-bar-released > div { background: #3a87d6; }
.cs-bar-running > div { background: #4f9a42; }
.cs-bar-ready > div { background: #d9822b; }
.cs-bar-finished > div { background: rgba(128, 128, 128, 0.6); }
.cs-bar-created > div { background: rgba(128, 128, 128, 0.6); }

.cs-tag {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 600;
	padding: 0 0.4rem;
	border-radius: 4px;
	border: 1px solid var(--bs-border-color, #dee2e6);
	color: var(--bs-secondary-color, #6c757d);
	vertical-align: middle;
}

.cs-tag-bio { border-color: #4f9a42; color: #4f9a42; }
.cs-tag-contract { border-color: #8a6fd1; color: #8a6fd1; }
.cs-tag-warn { border-color: #c0392b; color: #d9534f; }

/* Analysis status (AnalysisState): same tones and shapes as the charge status. */
.as-open { border: 1px dashed rgba(128, 128, 128, 0.7); color: var(--bs-secondary-color, #6c757d); }
.as-lab { background: rgba(43, 120, 197, 0.18); color: #3a87d6; }
/* Estimate: average from the database, not a measurement -> dashed, italic, no fill */
.as-estimate { border: 1px dashed #8a6fd1; color: #8a6fd1; font-style: italic; }
.as-choice { background: rgba(217, 130, 43, 0.22); color: #d9822b; }
.as-done { background: rgba(71, 134, 60, 0.22); color: #4f9a42; }

.as-stripe-open > td:first-child { box-shadow: inset 4px 0 0 rgba(128, 128, 128, 0.45); }
.as-stripe-lab > td:first-child { box-shadow: inset 4px 0 0 #3a87d6; }
/* hatched edge: visibly "not measured" */
.as-stripe-estimate > td:first-child {
	background-image: repeating-linear-gradient(180deg, #8a6fd1 0 5px, transparent 5px 9px);
	background-size: 4px 100%;
	background-repeat: no-repeat;
}
.as-stripe-choice > td:first-child { box-shadow: inset 4px 0 0 #d9822b; }
.as-stripe-done > td:first-child { box-shadow: inset 4px 0 0 #4f9a42; }

/* Tag for an estimated analysis value: a normal state, not an error */
.as-tag-estimate { font-style: italic; border-style: dashed; }
