/* TMS Free GBP Audit -- front-end form
   Matches the site's existing Google-brand palette (see
   website-build-summary.md): blue #4285F4/#1967D2, red #EA4335,
   yellow #FBBC05, green #34A853, navy #0F2A47 text, Plus Jakarta Sans
   for headings / Inter for body. Falls back gracefully if those fonts
   aren't enqueued elsewhere on the page. */

.tms-audit {
	--tms-blue: #4285F4;
	--tms-blue-dark: #1967D2;
	--tms-red: #EA4335;
	--tms-green: #34A853;
	--tms-yellow: #FBBC05;
	--tms-navy: #0F2A47;
	--tms-border: #E1E6ED;
	--tms-bg-soft: #F6F8FB;
	--tms-muted: #5A6B84;

	max-width: 620px;
	margin: 0 auto;
	padding: 32px;
	background: #fff;
	border: 1px solid var(--tms-border);
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(15, 42, 71, 0.06);
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	color: var(--tms-navy);
	box-sizing: border-box;
}

.tms-audit *,
.tms-audit *::before,
.tms-audit *::after {
	box-sizing: border-box;
}

.tms-audit [hidden] {
	display: none !important;
}

.tms-audit-title {
	font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
	font-size: 1.5rem;
	font-weight: 800;
	margin: 0 0 8px;
}

.tms-audit-sub {
	color: var(--tms-muted);
	font-size: 0.95rem;
	line-height: 1.5;
	margin: 0 0 20px;
}

.tms-audit-search-form,
.tms-audit-lead-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tms-audit input[type="text"],
.tms-audit input[type="email"],
.tms-audit input[type="tel"] {
	width: 100%;
	padding: 13px 16px;
	font-size: 1rem;
	border: 1.5px solid var(--tms-border);
	border-radius: 10px;
	box-sizing: border-box;
	font-family: inherit;
}

.tms-audit input:focus {
	outline: none;
	border-color: var(--tms-blue);
	box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
}

.tms-audit-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tms-audit-optin {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.85rem;
	line-height: 1.45;
	color: var(--tms-muted);
	cursor: pointer;
}

.tms-audit-optin input {
	margin: 3px 0 0;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	accent-color: #25D366;
}

.tms-audit button[type="submit"] {
	background: linear-gradient(135deg, var(--tms-blue), var(--tms-blue-dark));
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 14px 20px;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow: 0 10px 28px rgba(66, 133, 244, 0.3);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.tms-audit button[type="submit"]:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 14px 32px rgba(66, 133, 244, 0.4);
}

.tms-audit button[type="submit"]:disabled {
	opacity: 0.7;
	cursor: default;
}

.tms-audit-error {
	margin-top: 14px;
	padding: 12px 14px;
	background: #FEF1F0;
	border: 1px solid #F6C6C1;
	color: var(--tms-red);
	border-radius: 8px;
	font-size: 0.9rem;
}

.tms-audit-results {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tms-audit-result {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	width: 100%;
	text-align: left;
	padding: 14px 16px;
	background: var(--tms-bg-soft);
	border: 1.5px solid var(--tms-border);
	border-radius: 10px;
	cursor: pointer;
	font-family: inherit;
	color: var(--tms-navy);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.tms-audit-result:hover {
	border-color: var(--tms-blue);
	background: #EFF4FE;
}

.tms-audit-result-name {
	font-weight: 700;
	font-size: 0.98rem;
}

.tms-audit-result-address {
	color: var(--tms-muted);
	font-size: 0.85rem;
}

.tms-audit-result-meta {
	color: var(--tms-blue-dark);
	font-size: 0.8rem;
	font-weight: 600;
}

.tms-audit-panel[data-panel="generating"] {
	text-align: center;
	padding: 40px 0;
}

.tms-audit-spinner {
	width: 42px;
	height: 42px;
	margin: 0 auto 18px;
	border: 4px solid var(--tms-border);
	border-top-color: var(--tms-blue);
	border-radius: 50%;
	animation: tms-audit-spin 0.8s linear infinite;
}

@keyframes tms-audit-spin {
	to { transform: rotate(360deg); }
}

.tms-audit-teaser {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: linear-gradient(135deg, #0F2A47, #1967D2);
	color: #fff;
	border-radius: 14px;
	padding: 28px 20px;
	margin-bottom: 24px;
}

.tms-audit-teaser-label {
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.8;
}

.tms-audit-teaser-score {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 3rem;
	font-weight: 800;
	line-height: 1.1;
	margin: 6px 0;
}

.tms-audit-teaser-sub {
	font-size: 0.9rem;
	opacity: 0.85;
}

.tms-audit-panel h3 {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 1.2rem;
	margin: 0 0 8px;
}

.tms-audit-privacy {
	margin-top: 14px;
	font-size: 0.78rem;
	color: #8A93A6;
	text-align: center;
}

.tms-audit-admin-notice {
	max-width: 620px;
	margin: 0 auto;
	padding: 16px 20px;
	background: #FEF7E6;
	border: 1px solid #F6DE9C;
	border-radius: 10px;
	color: #8A5A00;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 0.9rem;
}

/* ---- v3: on-page overview ------------------------------------------ */

.tms-ov-kicker {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tms-blue-dark);
	margin-bottom: 6px;
}

.tms-ov-meta {
	color: var(--tms-muted);
	font-size: 0.88rem;
	margin: 0 0 20px;
}

.tms-ov-hero {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 20px;
	border-radius: 14px;
	background: linear-gradient(135deg, #0F2A47, #1967D2);
	color: #fff;
	margin-bottom: 14px;
}

.tms-ov-score {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 108px;
	height: 108px;
	border-radius: 50%;
	flex-shrink: 0;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.tms-ov-score-good { background: linear-gradient(135deg, #34A853, #1E7E39); }
.tms-ov-score-mid  { background: linear-gradient(135deg, #FBBC05, #C98A00); }
.tms-ov-score-poor { background: linear-gradient(135deg, #EA4335, #B0271B); }

.tms-ov-score-num {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 2.3rem;
	font-weight: 800;
	line-height: 1;
}

.tms-ov-score-label {
	font-size: 0.68rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	opacity: 0.9;
	margin-top: 4px;
}

.tms-ov-leak {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.tms-ov-leak-label {
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.8;
}

.tms-ov-leak-num {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 1.9rem;
	font-weight: 800;
	line-height: 1.2;
}

.tms-ov-leak-num small {
	font-size: 0.95rem;
	font-weight: 500;
	opacity: 0.8;
}

.tms-ov-leak-sub {
	font-size: 0.82rem;
	opacity: 0.85;
	margin-top: 2px;
}

.tms-ov-metrics {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-bottom: 22px;
}

.tms-ov-metric {
	background: var(--tms-bg-soft);
	border: 1px solid var(--tms-border);
	border-radius: 10px;
	padding: 12px 6px;
	text-align: center;
}

.tms-ov-metric span {
	display: block;
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 1.2rem;
	font-weight: 800;
}

.tms-ov-metric small {
	display: block;
	font-size: 0.72rem;
	color: var(--tms-muted);
	margin-top: 2px;
}

.tms-ov-issues h3,
.tms-ov-delivery h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 10px;
}

.tms-ov-issues ul,
.tms-ov-delivery ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tms-ov-issues li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--tms-border);
	font-size: 0.93rem;
	font-weight: 600;
}

.tms-ov-badge {
	display: inline-block;
	min-width: 68px;
	text-align: center;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.tms-ov-badge-critical { background: #FCE8E6; color: #C5221F; }
.tms-ov-badge-high     { background: #FDECE1; color: #B0530A; }
.tms-ov-badge-medium   { background: #FEF7E0; color: #B06000; }
.tms-ov-badge-low      { background: #EFF4FE; color: #1967D2; }

.tms-ov-more {
	margin: 10px 0 0;
	font-size: 0.86rem;
	color: var(--tms-muted);
}

.tms-ov-delivery {
	margin-top: 22px;
	padding: 18px;
	border: 1px dashed #BFD3F5;
	background: #F5F9FF;
	border-radius: 12px;
}

.tms-ov-dl {
	display: grid;
	grid-template-columns: 90px 1fr auto;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	font-size: 0.9rem;
}

.tms-ov-dl + .tms-ov-dl {
	border-top: 1px solid #DCE7FA;
}

.tms-ov-dl-channel {
	font-weight: 700;
}

.tms-ov-dl-to {
	color: var(--tms-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tms-ov-dl-state {
	font-size: 0.78rem;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 999px;
	background: #E8EEF7;
	color: var(--tms-navy);
	white-space: nowrap;
}

.tms-ov-dl-sending .tms-ov-dl-state::before {
	content: '';
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-right: 6px;
	vertical-align: -1px;
	border: 2px solid #9DB4DA;
	border-top-color: var(--tms-blue-dark);
	border-radius: 50%;
	animation: tms-audit-spin 0.8s linear infinite;
}

.tms-ov-dl-sent .tms-ov-dl-state,
.tms-ov-dl-delivered .tms-ov-dl-state { background: #E6F4EA; color: #1E7E39; }
.tms-ov-dl-failed .tms-ov-dl-state    { background: #FCE8E6; color: #C5221F; }

.tms-ov-help {
	margin: 10px 0 0;
	font-size: 0.82rem;
	color: var(--tms-muted);
}

.tms-ov-cta {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--tms-border);
}

.tms-ov-cta p {
	margin: 0 0 14px;
	font-size: 0.93rem;
	line-height: 1.5;
}

.tms-ov-cta-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.tms-ov-wa,
.tms-ov-call {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.95rem;
	text-decoration: none !important;
}

.tms-ov-wa {
	background: #25D366;
	color: #fff !important;
	box-shadow: 0 8px 22px rgba(37, 211, 102, 0.35);
}

.tms-ov-call {
	background: #fff;
	color: var(--tms-navy) !important;
	border: 1.5px solid var(--tms-border);
}

@media (max-width: 480px) {
	.tms-audit {
		padding: 22px;
		border-radius: 12px;
	}
	.tms-audit-teaser-score {
		font-size: 2.4rem;
	}
	.tms-ov-hero {
		flex-direction: column;
		text-align: center;
	}
	.tms-ov-leak {
		align-items: center;
	}
	.tms-ov-metrics {
		grid-template-columns: repeat(2, 1fr);
	}
	.tms-ov-dl {
		grid-template-columns: 1fr auto;
	}
	.tms-ov-dl-to {
		grid-column: 1 / -1;
		grid-row: 2;
	}
	.tms-ov-wa,
	.tms-ov-call {
		width: 100%;
	}
}
