@import '~heading.less';

.RiskProfile {
	display: flex;
	width: 100%;
	line-height: 16px;
	padding: 0 10px 12px;

	.Titles {
		flex: 0 1 auto;
		text-align: right;
		margin-right: 10px;
		padding-right: 10px;
		border-right: 1px solid darken(@greyLight, 10%);

		div {
			height: 18px;
			line-height: 16px;
			white-space: nowrap;

			&.Heading {
				font-weight: 700;
				color: @black;
			}
		}
	}

	.Times {
		flex: 0 1 auto;
		text-align: right;
		padding-right: 10px;
		border-right: 1px solid darken(@greyLight, 10%);

		div {
			height: 18px;
			line-height: 16px;
			white-space: nowrap;
		}
	}

	.Visuals {
		flex: 2 1 auto;
		position: relative;

		.DueDate {
			position: absolute;
			top: 0;
			left: 0;
			bottom: 0;
			border-right: 1px dashed darken(@greyLight, 15%);
			z-index: 1;

			span {
				position: absolute;
				bottom: -18px;
				left: 100%;
				transform: translate(-50%, 0);
				text-align: center;
				white-space: nowrap;
				color: darken(@greyLight, 25%);
				font-size: 9px;
				font-weight: 700;
				text-transform: uppercase;
			}
		}

		.Bars {
			position: relative;
			z-index: 2;

			div {
				height: 8px;
				margin: 4px 0 10px;
				background: @greyMedium;
				width: 0;

				&:global(:last-child) {
					margin-bottom: 5px;
				}

				&:global(.atRisk) {
					background: @yellow;
				}

				&:global(.noRisk) {
					background: @positive;
				}

				&:global(.total) {
					background: @primary;
				}
			}
		}
	}
}