/* "Evaluate a tender" page: only what differs from the shared /style.css (which the live check
   page also uses, so nothing shared is changed). Colours, corners and type follow aiconver.com,
   the website this page is embedded in. */

:root {
	--tc-bg: #f5f7fc;
	--tc-surface: #ffffff;
	--tc-text: #0d1633;
	--tc-muted: #5a6478;
	--tc-border: #dde3f0;
	--tc-accent: #2f5bd2;
	--tc-accent-soft: #eaf0fd;
	--tc-radius: 16px;
	--tc-shadow: 0 8px 24px rgb(13 22 51 / 6%);
	--tc-speed: 180ms;
	--altcha-border-radius: 10px;
	--altcha-color-border: var(--tc-border);
	--altcha-max-width: 300px;
	--altcha-checkbox-size: 20px;
	--altcha-checkbox-border-radius: 5px;
	--altcha-checkbox-border-width: 1.5px;
	--altcha-checkbox-border-color: #9aa6c2;
	--altcha-color-success: var(--tc-accent);
	--altcha-padding: 0.9rem;
}

.tc-try {
	max-width: 760px;
	padding: 32px 16px 40px;
}

/* ---------- header and stepper ---------- */

.tc-try-header {
	text-align: center;
	margin-bottom: 24px;
}

.tc-try h1 {
	font-size: clamp(1.75rem, 4vw, 2.4rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.15;
	margin: 0 0 10px;
}

.tc-try .tc-lead {
	max-width: 560px;
	margin: 0 auto;
	color: var(--tc-muted);
	font-size: 1.05rem;
	line-height: 1.55;
}

.tc-stepper {
	list-style: none;
	display: flex;
	gap: 8px;
	margin: 0 0 20px;
	padding: 0;
	counter-reset: none;
}

.tc-stepper li {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 10px;
	border-bottom: 3px solid var(--tc-border);
	color: var(--tc-muted);
	font-size: 0.9rem;
	font-weight: 600;
	transition: border-color var(--tc-speed), color var(--tc-speed);
}

.tc-stepper-dot {
	flex-shrink: 0;
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--tc-surface);
	border: 1.5px solid var(--tc-border);
	font-size: 0.85rem;
	transition: background var(--tc-speed), border-color var(--tc-speed), color var(--tc-speed);
}

.tc-stepper li.tc-current {
	color: var(--tc-text);
	border-color: var(--tc-accent);
}

.tc-stepper li.tc-current .tc-stepper-dot {
	background: var(--tc-accent);
	border-color: var(--tc-accent);
	color: #fff;
}

.tc-stepper li.tc-done {
	color: var(--tc-text);
	border-color: var(--tc-good);
}

.tc-stepper li.tc-done .tc-stepper-dot {
	background: var(--tc-good);
	border-color: var(--tc-good);
	color: transparent;
	/* A tick instead of the number. */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
	background-size: 16px;
	background-position: center;
	background-repeat: no-repeat;
}

@media (max-width: 560px) {
	.tc-stepper li span:last-child {
		display: none;
	}

	.tc-stepper li.tc-current span:last-child {
		display: inline;
	}
}

/* ---------- cards and form ---------- */

.tc-try .tc-card {
	border-radius: var(--tc-radius);
	box-shadow: var(--tc-shadow);
	padding: 28px;
}

@media (max-width: 560px) {
	.tc-try .tc-card {
		padding: 20px 16px;
	}
}

.tc-try h2 {
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0 0 4px;
}

.tc-section-head {
	margin-bottom: 16px;
}

.tc-section-head .tc-hint {
	margin: 0;
	font-size: 0.92rem;
}

.tc-tender-head {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--tc-border);
}

.tc-try input:not([type="checkbox"]),
.tc-try textarea {
	padding: 11px 13px;
	border-radius: 10px;
}

.tc-try label {
	font-weight: 600;
	color: var(--tc-text);
}

.tc-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.tc-email {
	gap: 6px;
}

#start-form .tc-consent {
	margin-top: 18px;
	font-weight: 400;
	color: var(--tc-muted);
	line-height: 1.5;
}

/* Both checkboxes (consent and "I'm a human") look the same: a square with a blue tick. */
.tc-try .tc-consent input[type="checkbox"] {
	appearance: none;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	padding: 0;
	flex-shrink: 0;
	border: 1.5px solid #9aa6c2;
	border-radius: 5px;
	background: var(--tc-surface) center / 14px no-repeat;
	cursor: pointer;
	transition: background-color var(--tc-speed), border-color var(--tc-speed);
}

.tc-try .tc-consent input[type="checkbox"]:checked {
	border-color: var(--tc-accent);
	background-color: var(--tc-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.tc-try .tc-consent input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--tc-accent);
	outline-offset: 2px;
}

/* The "I'm a human" box, below the consent and above the button, like the website's own forms. */
.tc-captcha {
	display: block;
	margin-top: 16px;
}

/* The widget's markup isn't in a shadow root, so the page's own label style would reach it. */
.tc-try .tc-captcha .altcha-checkbox-wrap {
	gap: 12px;
}

.tc-try .tc-captcha label {
	display: inline;
	font-weight: 500;
	font-size: 0.95rem;
}

.tc-try .tc-button {
	border-radius: 10px;
	padding: 12px 22px;
}

.tc-try .tc-primary:hover {
	box-shadow: 0 10px 24px rgb(47 91 210 / 22%);
}

.tc-wide-button {
	width: 100%;
	margin-top: 20px;
	padding: 15px 22px;
	font-size: 1.05rem;
}

.tc-center {
	text-align: center;
}

#start-error a {
	color: inherit;
	font-weight: 600;
}

/* A small "i": its explanation shows on hover or focus (text from data-tip, set by try.js). */
.tc-info {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1px solid var(--tc-muted);
	color: var(--tc-muted);
	font-size: 11px;
	font-weight: 700;
	font-style: normal;
	line-height: 1;
	cursor: help;
}

.tc-info:hover,
.tc-info:focus-visible {
	border-color: var(--tc-accent);
	color: var(--tc-accent);
	outline: none;
}

.tc-info::after {
	content: attr(data-tip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%);
	width: max-content;
	max-width: 280px;
	padding: 8px 10px;
	border-radius: 8px;
	background: var(--tc-text);
	color: var(--tc-surface);
	font-size: 0.8rem;
	font-weight: 400;
	line-height: 1.4;
	text-align: left;
	white-space: normal;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--tc-speed);
	z-index: 10;
}

.tc-info:hover::after,
.tc-info:focus-visible::after {
	opacity: 1;
}

/* ---------- stage 2: live progress, profile, tender ---------- */

.tc-live li {
	animation: tc-appear 220ms ease-out;
}

/* Grey rows where the profile will appear, gently pulsing while the website is read. */
.tc-skeleton {
	display: grid;
	gap: 8px;
}

.tc-skeleton span {
	display: block;
	height: 12px;
	width: 40%;
	border-radius: 6px;
	background: linear-gradient(90deg, var(--tc-border), #edf1f9, var(--tc-border));
	background-size: 200% 100%;
	animation: tc-shimmer 1.4s ease-in-out infinite;
}

.tc-skeleton span + span {
	height: 42px;
	width: 100%;
	border-radius: 10px;
}

@keyframes tc-shimmer {
	from {
		background-position: 100% 0;
	}
	to {
		background-position: -100% 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tc-skeleton span,
	.tc-live li {
		animation: none;
	}
}

#profile-fields label {
	animation: tc-appear 260ms ease-out;
}

.tc-try .tc-drop {
	border-radius: 14px;
	border-color: #c9d3ea;
	background: #fafbfe;
	padding: 28px 16px;
}

.tc-drop-icon {
	color: var(--tc-accent);
	margin-bottom: 6px;
}

.tc-tender-name {
	margin-top: 16px;
}

#tender-progress {
	margin-top: 8px;
}

/* ---------- stage 3: the overview ---------- */

/* The overall fit: a ring in the score's colour, the number counting up inside (try.js). */
.tc-gauge {
	position: relative;
	width: 148px;
	height: 148px;
	margin: 0 auto 24px;
	--tc-gauge-color: var(--tc-accent);
}

.tc-gauge.tc-fit-good {
	--tc-gauge-color: var(--tc-good);
}

.tc-gauge.tc-fit-mid {
	--tc-gauge-color: var(--tc-warn);
}

.tc-gauge.tc-fit-low {
	--tc-gauge-color: var(--tc-bad);
}

.tc-gauge svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.tc-gauge circle {
	fill: none;
	stroke-width: 10;
}

.tc-gauge-track {
	stroke: var(--tc-border);
}

.tc-gauge-fill {
	stroke: var(--tc-gauge-color);
	stroke-linecap: round;
}

.tc-gauge-text {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.tc-gauge-text strong {
	font-size: 2.6rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--tc-text);
	font-variant-numeric: tabular-nums;
}

.tc-gauge-text span {
	margin-top: 4px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--tc-muted);
}

.tc-fit-sections {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: grid;
	gap: 14px;
}

.tc-fit-head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-weight: 600;
}

.tc-fit-bar {
	height: 8px;
	margin: 6px 0;
	border-radius: 4px;
	background: var(--tc-border);
	overflow: hidden;
}

.tc-fit-bar span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 4px;
	transition: width 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tc-fit-bar.tc-fit-good span {
	background: var(--tc-good);
}

.tc-fit-bar.tc-fit-mid span {
	background: var(--tc-warn);
}

.tc-fit-bar.tc-fit-low span {
	background: var(--tc-bad);
}

.tc-fit-reason,
.tc-fit-summary {
	margin: 0;
	color: var(--tc-muted);
	font-size: 0.92rem;
	line-height: 1.5;
}

.tc-fit-summary {
	margin-bottom: 14px;
}

/* The locked part of the result: placeholder lines (no real text) under a blur, with the offer on top. */
.tc-locked {
	position: relative;
	margin-top: 18px;
	border: 1px solid var(--tc-border);
	border-radius: var(--tc-radius);
	overflow: hidden;
}

.tc-locked-body {
	list-style: none;
	margin: 0;
	padding: 18px;
	display: grid;
	gap: 16px;
	filter: blur(3px);
	user-select: none;
}

.tc-locked-body li {
	display: grid;
	gap: 6px;
}

.tc-locked-body span {
	display: block;
	height: 8px;
	border-radius: 4px;
	background: var(--tc-border);
}

.tc-locked-body span:nth-child(3) {
	width: 80%;
}

.tc-locked-body span:nth-child(4) {
	width: 60%;
}

.tc-locked-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 16px;
	text-align: center;
	background: color-mix(in srgb, var(--tc-surface) 72%, transparent);
}

.tc-locked-overlay h3 {
	margin: 0;
}

.tc-locked-overlay p {
	margin: 0;
	max-width: 440px;
}

.tc-lock {
	color: var(--tc-accent);
}

.tc-locked-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 8px;
}

/* .tc-button sets its own display, which would win over the hidden attribute. */
.tc-try [hidden] {
	display: none !important;
}
