/* =========================================================
   PEG STATO CANTIERI
========================================================= */

.peg-cantiere-status,
.peg-cantiere-status *,
.peg-cantiere-status *::before,
.peg-cantiere-status *::after {
	box-sizing: border-box;
}

.peg-cantiere-status {
	--peg-primary: #c96808;
	--peg-primary-dark: #9f5000;
	--peg-success: #3b9b62;
	--peg-muted: #737373;
	--peg-border: #e8e8e8;
	--peg-bg: #ffffff;

	position: relative;
	width: 100%;
	padding: 34px;

	background:
		linear-gradient(
			135deg,
			rgba(201, 104, 8, 0.055) 0%,
			rgba(255, 255, 255, 1) 42%
		);

	border: 1px solid var(--peg-border);
	border-radius: 20px;

	box-shadow:
		0 18px 45px rgba(0, 0, 0, 0.07);

	overflow: hidden;
}


/* Decorazione superiore */

.peg-cantiere-status::before {
	content: "";
	position: absolute;

	top: 0;
	left: 0;

	width: 100%;
	height: 4px;

	background:
		linear-gradient(
			90deg,
			var(--peg-primary),
			#ef9d45
		);
}


/* =========================================================
   TOP
========================================================= */

.peg-status-top {
	display: flex;
	align-items: flex-start;
	gap: 22px;
}


/* Icona */

.peg-status-icon {
	display: flex;
	align-items: center;
	justify-content: center;

	flex: 0 0 62px;

	width: 62px;
	height: 62px;

	background:
		linear-gradient(
			135deg,
			var(--peg-primary),
			var(--peg-primary-dark)
		);

	border-radius: 17px;

	box-shadow:
		0 12px 25px rgba(201, 104, 8, 0.22);
}

.peg-status-icon svg {
	width: 31px;
	height: 31px;

	fill: #ffffff;
}


/* Contenuto */

.peg-status-content {
	flex: 1;
	min-width: 0;
}


.peg-status-eyebrow {
	margin-bottom: 5px;

	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;

	letter-spacing: 1.3px;
	text-transform: uppercase;

	color: var(--peg-primary);
}


.peg-status-title {
	margin: 0 0 11px !important;
	padding: 0 !important;

	font-size: clamp(21px, 2vw, 27px) !important;
	line-height: 1.2 !important;
	font-weight: 700 !important;

	color: #202020;
}


.peg-status-current {
	display: inline-flex;
	align-items: center;
	gap: 8px;

	padding: 7px 13px;

	background: rgba(201, 104, 8, 0.09);

	border-radius: 50px;

	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;

	color: var(--peg-primary-dark);
}


.peg-status-dot {
	position: relative;

	width: 8px;
	height: 8px;

	background: var(--peg-primary);

	border-radius: 50%;
}


.peg-status-dot::after {
	content: "";

	position: absolute;

	top: 50%;
	left: 50%;

	width: 16px;
	height: 16px;

	border: 1px solid var(--peg-primary);

	border-radius: 50%;

	transform: translate(-50%, -50%);

	opacity: .35;
}


.peg-status-description {
	margin: 11px 0 0 !important;

	font-size: 15px;
	line-height: 1.6;

	color: var(--peg-muted);
}


/* =========================================================
   PROGRESS
========================================================= */

.peg-progress-wrapper {
	margin-top: 30px;
}


.peg-progress-header {
	display: flex;
	align-items: center;
	justify-content: space-between;

	margin-bottom: 9px;

	font-size: 13px;
	color: #777;
}


.peg-progress-header strong {
	font-size: 14px;
	color: var(--peg-primary);
}


.peg-progress {
	position: relative;

	width: 100%;
	height: 9px;

	background: #ededed;

	border-radius: 30px;

	overflow: hidden;
}


.peg-progress-bar {
	width: var(--peg-progress);
	height: 100%;

	background:
		linear-gradient(
			90deg,
			var(--peg-primary-dark),
			var(--peg-primary),
			#ed9841
		);

	border-radius: inherit;

	box-shadow:
		0 0 12px rgba(201, 104, 8, 0.28);

	transition: width .5s ease;
}


/* =========================================================
   STEPS
========================================================= */

.peg-status-steps {
	position: relative;

	display: grid;
	grid-template-columns: repeat(5, 1fr);

	margin-top: 35px;
}


.peg-status-steps::before {
	content: "";

	position: absolute;

	top: 14px;
	left: 10%;

	width: 80%;
	height: 2px;

	background: #e1e1e1;
}


.peg-status-step {
	position: relative;

	display: flex;
	flex-direction: column;
	align-items: center;

	z-index: 2;
}


.peg-step-marker {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 29px;
	height: 29px;

	background: #fff;

	border: 2px solid #d7d7d7;

	border-radius: 50%;

	transition:
		background .25s ease,
		border-color .25s ease,
		transform .25s ease;
}


.peg-step-marker span {
	width: 7px;
	height: 7px;

	background: #d2d2d2;

	border-radius: 50%;
}


.peg-step-marker svg {
	width: 15px;
	height: 15px;

	fill: #fff;
}


.peg-step-label {
	margin-top: 10px;

	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;

	text-align: center;

	color: #999;
}


/* Completati */

.peg-status-step.is-completed .peg-step-marker {
	background: var(--peg-primary);
	border-color: var(--peg-primary);
}


.peg-status-step.is-completed .peg-step-label {
	color: #5b5b5b;
}


/* Attuale */

.peg-status-step.is-current .peg-step-marker {
	background: #fff;

	border: 3px solid var(--peg-primary);

	box-shadow:
		0 0 0 5px rgba(201, 104, 8, 0.1);

	transform: scale(1.08);
}


.peg-status-step.is-current .peg-step-marker span {
	background: var(--peg-primary);
}


.peg-status-step.is-current .peg-step-label {
	font-weight: 700;
	color: var(--peg-primary);
}


/* =========================================================
   COMPLETATO
========================================================= */

.peg-status-completed {
	--peg-primary: #32925a;
	--peg-primary-dark: #257245;
}


.peg-status-completed .peg-status-current {
	background: rgba(50, 146, 90, .09);
}


/* =========================================================
   SOSPESO
========================================================= */

.peg-status-paused {
	--peg-primary: #8a8a8a;
	--peg-primary-dark: #626262;
}


.peg-paused-message {
	display: flex;
	align-items: center;
	gap: 10px;

	margin-top: 28px;
	padding: 15px 18px;

	background: #f5f5f5;

	border: 1px solid #e4e4e4;
	border-radius: 10px;

	font-size: 14px;
	font-weight: 600;

	color: #686868;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 767px) {

	.peg-cantiere-status {
		padding: 25px 20px;
		border-radius: 15px;
	}

	.peg-status-top {
		gap: 15px;
	}

	.peg-status-icon {
		flex-basis: 50px;

		width: 50px;
		height: 50px;

		border-radius: 13px;
	}

	.peg-status-icon svg {
		width: 25px;
		height: 25px;
	}

	.peg-status-steps {
		grid-template-columns: 1fr;

		gap: 12px;

		margin-top: 28px;
	}

	.peg-status-steps::before {
		top: 14px;
		left: 14px;

		width: 2px;
		height: calc(100% - 28px);
	}

	.peg-status-step {
		flex-direction: row;
		justify-content: flex-start;

		gap: 12px;
	}

	.peg-step-marker {
		flex: 0 0 29px;
	}

	.peg-step-label {
		margin-top: 0;

		font-size: 13px;
		text-align: left;
	}

}