/**
 * Frontend SaaS Interface Styles for Contractor GBP & Local SEO Audit.
 */

:root {
	--cgbp-primary: #2563eb;
	--cgbp-primary-hover: #1d4ed8;
	--cgbp-dark: #0f172a;
	--cgbp-slate: #1e293b;
	--cgbp-muted: #64748b;
	--cgbp-light: #f8fafc;
	--cgbp-border: #e2e8f0;
	--cgbp-success: #16a34a;
	--cgbp-warning: #d97706;
	--cgbp-danger: #dc2626;
	--cgbp-radius: 12px;
	--cgbp-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

.cgbp-audit-container {
	max-width: 1080px;
	margin: 20px auto 40px auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
	color: var(--cgbp-dark);
	box-sizing: border-box;
}

.cgbp-audit-container * {
	box-sizing: border-box;
}

/* ----------------------------------------------------
 * HERO & FORM CARD
 * ---------------------------------------------------- */
.cgbp-form-card {
	background: #ffffff;
	border: 1px solid var(--cgbp-border);
	border-radius: var(--cgbp-radius);
	padding: 40px;
	box-shadow: var(--cgbp-shadow);
}

.cgbp-hero-header {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 36px auto;
}

.cgbp-hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #eff6ff;
	color: var(--cgbp-primary);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 6px 14px;
	border-radius: 9999px;
	margin-bottom: 16px;
	border: 1px solid #bfdbfe;
}

.cgbp-pulse-dot {
	width: 8px;
	height: 8px;
	background: var(--cgbp-primary);
	border-radius: 50%;
	display: inline-block;
	box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
	animation: cgbp-pulse 2s infinite;
}

@keyframes cgbp-pulse {
	0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
	70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
	100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.cgbp-hero-title {
	font-size: 32px;
	font-weight: 800;
	color: var(--cgbp-dark);
	line-height: 1.25;
	margin: 0 0 14px 0;
}

.cgbp-hero-subtitle {
	font-size: 16px;
	color: var(--cgbp-muted);
	line-height: 1.6;
	margin: 0;
}

/* Form Grid */
.cgbp-form-grid {
	display: flex;
	flex-wrap: wrap;
	margin: -10px;
}

.cgbp-col-12 {
	flex: 0 0 100%;
	max-width: 100%;
	padding: 10px;
}

.cgbp-col-md-6 {
	flex: 0 0 100%;
	max-width: 100%;
	padding: 10px;
}

@media (min-width: 768px) {
	.cgbp-col-md-6 {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

.cgbp-field label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 6px;
}

.cgbp-req {
	color: var(--cgbp-danger);
}

.cgbp-opt {
	font-size: 12px;
	color: #94a3b8;
	font-weight: 400;
}

.cgbp-field input[type="text"],
.cgbp-field input[type="url"],
.cgbp-field input[type="tel"],
.cgbp-field select {
	width: 100%;
	height: 48px;
	padding: 10px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 15px;
	color: var(--cgbp-dark);
	background: #ffffff;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.cgbp-field input:focus,
.cgbp-field select:focus {
	outline: none;
	border-color: var(--cgbp-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cgbp-form-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: var(--cgbp-danger);
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	margin-top: 16px;
}

.cgbp-form-actions {
	text-align: center;
	margin-top: 28px;
}

.cgbp-btn-primary {
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #ffffff;
	border: none;
	border-radius: 8px;
	padding: 16px 36px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: transform 0.15s, box-shadow 0.15s;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.cgbp-btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.cgbp-trust-badges {
	display: flex;
	justify-content: center;
	gap: 24px;
	margin-top: 28px;
	color: var(--cgbp-muted);
	font-size: 13px;
	font-weight: 500;
	flex-wrap: wrap;
}

/* ----------------------------------------------------
 * PROGRESS CARD
 * ---------------------------------------------------- */
.cgbp-progress-card {
	background: #ffffff;
	border: 1px solid var(--cgbp-border);
	border-radius: var(--cgbp-radius);
	padding: 36px;
	box-shadow: var(--cgbp-shadow);
	margin-top: 24px;
}

.cgbp-progress-header {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 24px;
}

.cgbp-spinner {
	width: 44px;
	height: 44px;
	border: 4px solid #e2e8f0;
	border-top: 4px solid var(--cgbp-primary);
	border-radius: 50%;
	animation: cgbp-spin 0.8s linear infinite;
	flex-shrink: 0;
}

@keyframes cgbp-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.cgbp-progress-title-wrap {
	flex-grow: 1;
}

.cgbp-progress-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 4px 0;
}

.cgbp-progress-subtitle {
	font-size: 14px;
	color: var(--cgbp-muted);
	margin: 0;
}

.cgbp-progress-percent {
	font-size: 24px;
	font-weight: 800;
	color: var(--cgbp-primary);
}

.cgbp-progress-bar-track {
	background: #f1f5f9;
	height: 10px;
	border-radius: 9999px;
	overflow: hidden;
	margin-bottom: 24px;
}

.cgbp-progress-bar-fill {
	background: linear-gradient(90deg, #38bdf8 0%, #2563eb 100%);
	height: 100%;
	transition: width 0.4s ease;
}

.cgbp-steps-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cgbp-step-item {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	color: #64748b;
	transition: color 0.2s;
}

.cgbp-step-item.cgbp-step-active {
	color: var(--cgbp-primary);
	font-weight: 600;
}

.cgbp-step-item.cgbp-step-done {
	color: var(--cgbp-success);
}

.cgbp-step-item.cgbp-step-done .cgbp-step-icon {
	color: var(--cgbp-success);
}

/* ----------------------------------------------------
 * REPORT CARD
 * ---------------------------------------------------- */
.cgbp-report-card {
	background: #ffffff;
	border: 1px solid var(--cgbp-border);
	border-radius: var(--cgbp-radius);
	padding: 36px;
	box-shadow: var(--cgbp-shadow);
	margin-top: 24px;
}

.cgbp-report-topbar {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--cgbp-border);
	margin-bottom: 30px;
	flex-wrap: wrap;
	gap: 20px;
}

.cgbp-report-tag {
	font-size: 11px;
	font-weight: 700;
	color: var(--cgbp-primary);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	background: #eff6ff;
	padding: 4px 10px;
	border-radius: 4px;
	display: inline-block;
	margin-bottom: 6px;
}

.cgbp-report-biz-name {
	font-size: 28px;
	font-weight: 800;
	margin: 0 0 6px 0;
	color: var(--cgbp-dark);
}

.cgbp-report-submeta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--cgbp-muted);
	flex-wrap: wrap;
}

.cgbp-report-link {
	color: var(--cgbp-primary);
	text-decoration: none;
	font-weight: 600;
}

.cgbp-report-actions-top {
	display: flex;
	gap: 10px;
}

.cgbp-btn-download-pdf {
	background: #0f172a;
	color: #ffffff;
	padding: 10px 18px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background 0.2s;
}

.cgbp-btn-download-pdf:hover {
	background: #1e293b;
	color: #fff;
}

.cgbp-btn-secondary {
	background: #f1f5f9;
	color: #334155;
	border: 1px solid #cbd5e1;
	padding: 10px 16px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

/* Hero Score dial + Category grid */
.cgbp-score-hero {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	margin-bottom: 36px;
}

@media (min-width: 900px) {
	.cgbp-score-hero {
		grid-template-columns: 280px 1fr;
		align-items: center;
	}
}

.cgbp-gauge-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	text-align: center;
}

.cgbp-gauge-svg-wrap {
	position: relative;
	width: 140px;
	height: 140px;
	margin: 0 auto 14px auto;
}

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

.cgbp-gauge-bg {
	fill: none;
	stroke: #e2e8f0;
	stroke-width: 10;
}

.cgbp-gauge-fill {
	fill: none;
	stroke-width: 10;
	stroke-linecap: round;
	transition: stroke-dashoffset 1s ease-in-out;
}

.cgbp-gauge-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
}

.cgbp-gauge-number {
	font-size: 34px;
	font-weight: 900;
	color: var(--cgbp-dark);
	display: block;
	line-height: 1;
}

.cgbp-gauge-max {
	font-size: 12px;
	color: #94a3b8;
	font-weight: 600;
}

.cgbp-score-badge-label {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 8px;
}

.cgbp-score-desc {
	font-size: 12px;
	color: #64748b;
	line-height: 1.4;
	margin: 0;
}

/* Category Grid */
.cgbp-cat-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

@media (min-width: 600px) {
	.cgbp-cat-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.cgbp-cat-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 16px;
	transition: box-shadow 0.2s;
}

.cgbp-cat-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.cgbp-cat-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.cgbp-cat-title {
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
}

.cgbp-cat-score {
	font-size: 13px;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 6px;
}

.cgbp-cat-progress {
	background: #f1f5f9;
	height: 6px;
	border-radius: 9999px;
	overflow: hidden;
	margin-bottom: 8px;
}

.cgbp-cat-progress-bar {
	height: 100%;
	border-radius: 9999px;
}

.cgbp-cat-footer {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: #94a3b8;
}

/* Callouts Grid */
.cgbp-callouts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-bottom: 36px;
}

@media (min-width: 768px) {
	.cgbp-callouts-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.cgbp-callout-box {
	border-radius: 10px;
	padding: 20px 24px;
}

.cgbp-callout-critical {
	background: #fef2f2;
	border: 1px solid #fecaca;
}

.cgbp-callout-wins {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
}

.cgbp-callout-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
}

.cgbp-callout-header h3 {
	font-size: 16px;
	margin: 0;
	font-weight: 800;
}

.cgbp-callout-critical h3 { color: #991b1b; }
.cgbp-callout-wins h3 { color: #166534; }

.cgbp-issue-list {
	margin: 0;
	padding-left: 18px;
	font-size: 13px;
	line-height: 1.6;
}

.cgbp-callout-critical .cgbp-issue-list { color: #7f1d1d; }
.cgbp-callout-wins .cgbp-issue-list { color: #14532d; }

.cgbp-issue-empty {
	margin: 0;
	font-size: 13px;
	color: #64748b;
}

/* Section Box */
.cgbp-section-box {
	border-top: 1px solid var(--cgbp-border);
	padding-top: 32px;
	margin-bottom: 36px;
}

.cgbp-section-title {
	font-size: 20px;
	font-weight: 800;
	margin: 0 0 6px 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.cgbp-section-subtitle {
	font-size: 14px;
	color: var(--cgbp-muted);
	margin: 0 0 20px 0;
}

/* Competitor Table */
.cgbp-table-responsive {
	overflow-x: auto;
}

.cgbp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.cgbp-table th, .cgbp-table td {
	padding: 12px 16px;
	border-bottom: 1px solid #e2e8f0;
	text-align: left;
}

.cgbp-table th {
	background: #f8fafc;
	font-weight: 700;
	color: #334155;
}

.cgbp-opp-current {
	font-weight: 700;
	color: #b91c1c;
}

.cgbp-opp-bench {
	font-weight: 700;
	color: #15803d;
}

/* Category Detail Blocks */
.cgbp-cat-detail-block {
	margin-bottom: 24px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
}

.cgbp-cat-detail-header {
	background: #f8fafc;
	padding: 14px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #e2e8f0;
}

.cgbp-cat-detail-header h4 {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
}

.cgbp-cat-detail-score {
	font-size: 12px;
	font-weight: 700;
	color: #475569;
}

.cgbp-check-row {
	border-bottom: 1px solid #f1f5f9;
}

.cgbp-check-row:last-child {
	border-bottom: none;
}

.cgbp-check-summary {
	padding: 12px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.cgbp-check-title-group {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.cgbp-check-name {
	font-size: 14px;
	font-weight: 600;
	color: #1e293b;
}

.cgbp-toggle-evidence-btn {
	background: none;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 600;
	color: #475569;
	cursor: pointer;
}

.cgbp-check-body {
	display: none;
	padding: 0 20px 16px 20px;
	background: #fcfdfe;
}

.cgbp-check-body.cgbp-open {
	display: block;
}

.cgbp-evidence-box, .cgbp-rec-box {
	margin-top: 10px;
	font-size: 13px;
}

.cgbp-ev-label, .cgbp-rec-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: #64748b;
	margin-bottom: 4px;
}

.cgbp-ev-content {
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	padding: 10px 12px;
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
	color: #0f172a;
	white-space: pre-wrap;
	word-break: break-word;
	margin: 0;
}

.cgbp-rec-content {
	margin: 0;
	color: #334155;
	line-height: 1.5;
}

/* Badges */
.cgbp-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 4px;
}

.cgbp-badge-pass {
	background: #dcfce7;
	color: #15803d;
}

.cgbp-badge-warning {
	background: #fef3c7;
	color: #b45309;
}

.cgbp-badge-fail {
	background: #fee2e2;
	color: #b91c1c;
}

.cgbp-badge-unavailable {
	background: #f1f5f9;
	color: #64748b;
}

.cgbp-priority-badge {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 2px 6px;
	border-radius: 3px;
}

.cgbp-priority-critical { background: #fee2e2; color: #991b1b; }
.cgbp-priority-high { background: #ffedd5; color: #9a3412; }
.cgbp-priority-medium { background: #fef9c3; color: #854d0e; }
.cgbp-priority-low { background: #f1f5f9; color: #475569; }
.cgbp-priority-info { background: #f1f5f9; color: #64748b; }

/* Email Section */
.cgbp-email-bar {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 24px;
	margin-bottom: 32px;
}

.cgbp-email-text h4 {
	font-size: 16px;
	margin: 0 0 4px 0;
}

.cgbp-email-text p {
	font-size: 13px;
	color: #64748b;
	margin: 0 0 14px 0;
}

.cgbp-email-form {
	display: flex;
	gap: 10px;
	max-width: 500px;
}

.cgbp-email-form input {
	flex-grow: 1;
	height: 42px;
	padding: 8px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
}

.cgbp-btn-email {
	background: #0f172a;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0 20px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
}

.cgbp-email-msg {
	margin-top: 10px;
	font-size: 13px;
	font-weight: 600;
}

/* Agency Lead CTA Card */
.cgbp-cta-card {
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	color: #ffffff;
	border-radius: 12px;
	padding: 40px;
	text-align: center;
}

.cgbp-cta-badge {
	display: inline-block;
	background: rgba(56, 189, 248, 0.15);
	color: #38bdf8;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	padding: 4px 12px;
	border-radius: 20px;
	margin-bottom: 12px;
}

.cgbp-cta-title {
	font-size: 24px;
	font-weight: 800;
	margin: 0 0 10px 0;
	color: #fff;
}

.cgbp-cta-desc {
	font-size: 15px;
	color: #cbd5e1;
	max-width: 650px;
	margin: 0 auto 28px auto;
	line-height: 1.6;
}

.cgbp-cta-buttons {
	display: flex;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
}

.cgbp-btn-cta-primary {
	background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
	color: #ffffff;
	padding: 14px 28px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cgbp-btn-cta-whatsapp {
	background: #22c55e;
	color: #ffffff;
	padding: 14px 24px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cgbp-btn-cta-phone {
	background: rgba(255,255,255,0.12);
	color: #ffffff;
	padding: 14px 24px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid rgba(255,255,255,0.2);
}
