/*
File: frontend/styles/score-results-shell.css
Purpose: Shared shell alignment for live and replayed score results.
*/

:root {
	--vx-results-shell-max: 920px;
	--vx-results-gap: clamp(18px, 2.4vw, 28px);
	--vx-results-card-padding: clamp(18px, 2.2vw, 24px);
	--vx-results-bubble-max: 760px;
	--vx-results-bar-max: 620px;
	--vx-results-bar-reserve: clamp(38px, 4vw, 44px);
}

#resultSection {
	width: 100% !important;
	margin: 0 auto;
	padding: 0 !important;
}

#resultSection .score-results-shell {
	width: min(100%, var(--vx-results-shell-max));
	margin: 0 auto;
	display: grid;
	gap: var(--vx-results-gap);
}

#resultSection .score-results-head {
	display: grid;
	gap: 4px;
	text-align: center;
}

#resultSection .score-results-head--centered {
	justify-items: center;
}

#resultSection .score-results-head--centered .score-title,
#resultSection .score-results-head--centered #vinDisplay,
#resultSection .score-results-head--centered #vehicleInfo {
	width: 100%;
	max-width: min(100%, var(--vx-results-bar-max));
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

#resultSection .score-results-head--centered #vehicleInfo {
	display: grid;
	justify-items: center;
	gap: 4px;
}

#resultSection .score-results-head--centered #vehicleInfo .vehicle-line,
#resultSection .score-results-head--centered #vehicleInfo .tier-badge-wrap {
	width: 100%;
	text-align: center;
}

#resultSection .score-results-head #vehicleInfo {
	margin-bottom: 0;
}

#resultSection .score-results-flow {
	display: grid;
	gap: var(--vx-results-gap);
	align-items: start;
}

#resultSection .score-results-flow > * {
	min-width: 0;
}

#resultSection .score-results-flow > .score-container,
#resultSection .score-results-flow > #scoreMileageWarning,
#resultSection .score-results-flow > #score-upload-card,
#resultSection .score-results-flow > #ladyVerdictModule,
#resultSection .score-results-flow > .result-actions {
	width: 100%;
	max-width: none;
	margin: 0;
}

#resultSection .score-container {
	margin: 0;
}

#resultSection .score-container > #scoreBarMount {
	display: block;
	width: 100%;
	padding-top: var(--vx-results-bar-reserve);
}

#resultSection .score-container .score-bar-container {
	width: 100%;
	max-width: min(100%, var(--vx-results-bar-max));
	margin: 0 auto;
}

#resultSection #scoreMileageWarning {
	width: 100%;
	margin: 0;
}

#resultSection .score-mileage-warning {
	padding: 16px 20px 16px 24px;
}

#resultSection .score-results-flow > #score-upload-card,
#resultSection .score-results-flow > #ladyVerdictModule > #score-upload-card,
#resultSection .score-results-flow > #ladyVerdictModule > #maintenance-signals-card,
#resultSection .score-results-flow > #ladyVerdictModule > #vehicle-history-card,
#resultSection .score-results-flow > #ladyVerdictModule > #price-eval-card,
#resultSection .score-results-flow > #ladyVerdictModule > #warranty-card {
	padding: var(--vx-results-card-padding);
}

#resultSection .score-results-flow > #ladyVerdictModule {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
	overflow: visible;
	display: grid;
	justify-items: center;
	text-align: center;
	gap: var(--vx-results-gap);
}

#resultSection .score-results-flow > #ladyVerdictModule::before {
	display: none;
}

#resultSection .score-results-flow > #ladyVerdictModule > #VinDXitScore,
#resultSection .score-results-flow > #ladyVerdictModule > #score-upload-card,
#resultSection .score-results-flow > #ladyVerdictModule > #maintenance-signals-card,
#resultSection .score-results-flow > #ladyVerdictModule > #vehicle-history-card,
#resultSection .score-results-flow > #ladyVerdictModule > #price-eval-card,
#resultSection .score-results-flow > #ladyVerdictModule > #warranty-card {
	width: 100%;
	max-width: none;
	margin: 0;
}

#resultSection .score-results-flow > #ladyVerdictModule .speech-bubble {
	width: min(100%, var(--vx-results-bubble-max));
	max-width: 100%;
	margin: 0 auto;
}

#resultSection .score-results-flow > #ladyVerdictModule .lady-image {
	margin: 0 auto;
}

#resultSection .score-results-flow > #ladyVerdictModule > #VinDXitScore {
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	overflow: visible;
}

#resultSection .score-results-flow > #ladyVerdictModule > #VinDXitScore::before {
	display: none;
}

#resultSection .score-results-flow > #ladyVerdictModule > #VinDXitScore:hover {
	transform: none;
	box-shadow: none;
}

#resultSection .score-results-flow > #ladyVerdictModule > #VinDXitScore .vx-reasons {
	max-width: none;
	margin: 0;
}

#resultSection .score-results-flow > #ladyVerdictModule > #VinDXitScore .vx-reasons-glance {
	margin-left: 0;
	margin-right: 0;
}

#resultSection .score-results-flow > #ladyVerdictModule > #price-eval-card .price-values {
	gap: 12px;
}

#resultSection .score-results-flow > #ladyVerdictModule > #price-eval-card .price-row {
	padding: 14px 18px;
}

#resultSection .score-results-flow > .result-actions {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 0;
}

#resultSection .score-results-flow > .result-actions .button,
#resultSection .score-results-flow > .result-actions .bridge-control {
	flex: 0 0 auto;
	min-width: 176px;
}

#resultSection .vx-history-head,
#resultSection .vx-maint-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	gap: 16px;
}

#resultSection .vx-history-copy {
	max-width: 60ch;
}

#resultSection .vx-history-button,
#resultSection .vx-maint-pill-row {
	justify-self: end;
}

#resultSection .vx-history-button {
	min-width: 176px;
}

#resultSection .vx-history-stats,
#resultSection .vx-maint-meta,
#resultSection .vx-acc-cols {
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.recap-main {
	width: min(1160px, calc(100% - 64px));
	max-width: none;
	padding: 56px 0 80px;
}

@media (max-width: 860px) {
	.recap-main {
		width: calc(100% - 32px);
		padding: 44px 0 64px;
	}
}

@media (max-width: 768px) {
	#resultSection .score-results-flow {
		gap: 20px;
	}

	#resultSection .score-results-flow > #score-upload-card,
	#resultSection .score-results-flow > #ladyVerdictModule > #score-upload-card,
	#resultSection .score-results-flow > #ladyVerdictModule > #maintenance-signals-card,
	#resultSection .score-results-flow > #ladyVerdictModule > #vehicle-history-card,
	#resultSection .score-results-flow > #ladyVerdictModule > #price-eval-card,
	#resultSection .score-results-flow > #ladyVerdictModule > #warranty-card {
		padding: 18px;
	}

	#resultSection .score-results-flow > #ladyVerdictModule .speech-bubble {
		width: 100%;
	}

	#resultSection .score-results-flow > #ladyVerdictModule .lady-image {
		margin-top: 0;
	}

	#resultSection .score-mileage-warning {
		padding: 14px 16px 14px 20px;
	}
}

@media (max-width: 720px) {
	#resultSection .vx-history-head,
	#resultSection .vx-maint-head {
		grid-template-columns: 1fr;
	}

	#resultSection .vx-history-button,
	#resultSection .vx-maint-pill-row {
		justify-self: stretch;
	}

	#resultSection .vx-history-button {
		width: 100%;
		min-width: 0;
	}
}

@media (max-width: 640px) {
	#resultSection .score-results-flow > .result-actions .button,
	#resultSection .score-results-flow > .result-actions .bridge-control {
		width: 100%;
		min-width: 0;
	}
}
