/* ============================================================
   Assumed Affiliate Vetter — Frontend Styles
   ============================================================ */

/* ── Wrapper & Layout ─────────────────────────────────────── */
.aav-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	color: #1e293b;
	max-width: 1260px;
	margin: 0 auto;
}
.aav-hidden { display: none !important; }

/* ── Form ─────────────────────────────────────────────────── */
.aav-form-container {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 32px;
	margin-bottom: 24px;
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.aav-form-title {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
}
.aav-form-subtitle {
	margin: 0 0 24px;
	color: #64748b;
}
.aav-input-group {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.aav-url-input {
	flex: 1 1 260px;
	padding: 12px 16px;
	font-size: 15px;
	border: 2px solid #cbd5e1;
	border-radius: 8px;
	outline: none;
	transition: border-color .2s;
	min-width: 0;
}
.aav-url-input:focus { border-color: #3b82f6; }
.aav-submit-btn {
	padding: 12px 24px;
	background: #1e293b;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: background .2s;
	white-space: nowrap;
}
.aav-submit-btn:hover:not(:disabled) { background: #0f172a; }
.aav-submit-btn:disabled { opacity: .6; cursor: not-allowed; }
.aav-btn-icon { font-size: 16px; }
.aav-form-error {
	color: #dc2626;
	font-size: 13px;
	margin: 8px 0 0;
	min-height: 18px;
}
.aav-form-disclaimer {
	font-size: 12px;
	color: #94a3b8;
	margin: 12px 0 0;
}

/* ── Progress ─────────────────────────────────────────────── */
.aav-progress {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 20px 24px;
	margin-bottom: 24px;
}
.aav-progress-bar-outer {
	background: #e2e8f0;
	border-radius: 99px;
	height: 6px;
	overflow: hidden;
	margin-bottom: 10px;
}
.aav-progress-bar-inner {
	height: 100%;
	background: linear-gradient(90deg, #3b82f6, #6366f1);
	border-radius: 99px;
	width: 0%;
	transition: width .6s ease;
}
.aav-progress-label {
	font-size: 13px;
	color: #64748b;
	margin: 0;
}

/* ── Score Hero ───────────────────────────────────────────── */
.aav-results {
	animation: aav-fadein .3s ease;
}
@keyframes aav-fadein {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}
.aav-score-hero {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	padding: 28px 32px;
	border-radius: 12px;
	margin-bottom: 20px;
	color: #fff;
}
.aav-score-approve { background: linear-gradient(135deg, #15803d, #22c55e); }
.aav-score-review  { background: linear-gradient(135deg, #b45309, #f59e0b); }
.aav-score-reject  { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.aav-score-dial {
	display: flex;
	align-items: baseline;
	gap: 2px;
	line-height: 1;
}
.aav-score-number {
	font-size: 64px;
	font-weight: 800;
	letter-spacing: -2px;
}
.aav-score-denom {
	font-size: 20px;
	opacity: .8;
}
.aav-score-right { flex: 1; }
.aav-rec-badge {
	display: inline-block;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	background: rgba(255,255,255,.2);
	border-radius: 6px;
	padding: 4px 12px;
	margin-bottom: 8px;
}
.aav-domain-analyzed {
	margin: 0 0 10px;
	font-size: 15px;
	opacity: .9;
}
.aav-domain-analyzed a { color: #fff; text-decoration: underline; }
.aav-score-summary {
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}
.aav-score-summary li { font-size: 13px; opacity: .9; }
.aav-score-summary span { font-weight: 700; font-size: 16px; margin-right: 4px; }
.aav-meta-info { margin: 0; font-size: 12px; opacity: .75; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.aav-badge-cached,
.aav-badge-ai,
.aav-badge-time {
	background: rgba(255,255,255,.2);
	border-radius: 4px;
	padding: 2px 6px;
}
.aav-rerun-btn {
	background: rgba(255,255,255,.15);
	border: 1px solid rgba(255,255,255,.5);
	border-radius: 4px;
	color: inherit;
	cursor: pointer;
	font-size: 12px;
	padding: 2px 8px;
	margin-left: 6px;
	vertical-align: middle;
	transition: background .15s;
}
.aav-rerun-btn:hover {
	background: rgba(255,255,255,.3);
}
.aav-rerun-btn:disabled {
	opacity: .6;
	cursor: default;
}

/* ── AI Summary ───────────────────────────────────────────── */
.aav-ai-summary {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 20px;
}
.aav-key-concerns {
	margin-bottom: 16px;
}
.aav-key-concerns h4 {
	margin: 0 0 8px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #64748b;
}
.aav-key-concerns p {
	margin: 0 0 8px;
	color: #334155;
}
.aav-tcpa-risk-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 4px;
	font-weight: 600;
	font-size: 13px;
}
.aav-tcpa-low    { background: #dcfce7; color: #15803d; }
.aav-tcpa-medium { background: #fef9c3; color: #854d0e; }
.aav-tcpa-high   { background: #fee2e2; color: #991b1b; }
.aav-flags-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}
@media (max-width: 600px) {
	.aav-flags-row { grid-template-columns: 1fr; }
	.aav-score-hero { flex-direction: column; }
}
.aav-flags-col h4 {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
}
.aav-red-flags-col h4  { color: #dc2626; }
.aav-green-flags-col h4 { color: #16a34a; }
.aav-flag-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.aav-flag-list li {
	padding: 4px 0 4px 18px;
	position: relative;
	font-size: 14px;
	color: #334155;
}
.aav-red-flag-list li::before   { content: "\2022"; position: absolute; left: 4px; color: #ef4444; font-weight: 700; }
.aav-green-flag-list li::before { content: "\2022"; position: absolute; left: 4px; color: #22c55e; font-weight: 700; }

/* ── Tabs ─────────────────────────────────────────────────── */
.aav-tabs-wrapper {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 20px;
}
.aav-tab-nav {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;     /* allow tabs to flow onto a second row if needed */
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}
.aav-tab-item {
	padding: 11px 16px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	color: #64748b;
	border-bottom: 2px solid transparent;
	transition: color .15s, border-color .15s;
	display: flex;
	align-items: center;
	gap: 5px;
	user-select: none;
	white-space: nowrap;
}
.aav-tab-item:hover { color: #1e293b; }
.aav-tab-active {
	color: #1e293b;
	border-bottom-color: #3b82f6;
	background: #fff;
}
.aav-tab-badge {
	display: inline-block;
	min-width: 18px;
	height: 18px;
	border-radius: 9px;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	padding: 0 4px;
}
.aav-tab-badge-fail { background: #fee2e2; color: #dc2626; }
.aav-tab-badge-warn { background: #fef3c7; color: #d97706; }
.aav-tab-panel { padding: 0; display: none; }
.aav-tab-panel-active { display: block; }

/* ── Check Table ──────────────────────────────────────────── */
.aav-check-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.aav-check-table th {
	padding: 10px 14px;
	text-align: left;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #94a3b8;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}
.aav-check-row {
	border-bottom: 1px solid #f1f5f9;
	transition: background .1s;
}
.aav-check-row:last-child { border-bottom: none; }
.aav-check-row:hover { background: #fafafa; }
.aav-status-cell { width: 42px; text-align: center; padding: 12px 8px; }
.aav-label-cell  { padding: 12px 14px; font-weight: 600; width: 22%; color: #334155; }
.aav-value-cell  { padding: 12px 14px; width: 20%; color: #475569; }
.aav-detail-cell { padding: 12px 14px; color: #64748b; font-size: 13px; }
.aav-status-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

/* Status row colors */
.aav-check-row.aav-pass .aav-status-icon { background: #dcfce7; color: #16a34a; }
.aav-check-row.aav-warn .aav-status-icon { background: #fef3c7; color: #d97706; }
.aav-check-row.aav-fail .aav-status-icon { background: #fee2e2; color: #dc2626; }
.aav-check-row.aav-info .aav-status-icon { background: #dbeafe; color: #2563eb; }
.aav-check-row.aav-skip .aav-status-icon { background: #f3f4f6; color: #9ca3af; }
.aav-check-row.aav-fail { background: #fff5f5; }
.aav-check-row.aav-warn { background: #fffbf0; }

/* ── AI Detail ────────────────────────────────────────────── */
.aav-ai-detail { padding: 16px 20px; }
.aav-ai-reasoning {
	color: #475569;
	font-style: italic;
	margin: 0 0 16px;
	padding: 12px 16px;
	background: #f8fafc;
	border-left: 3px solid #3b82f6;
	border-radius: 0 6px 6px 0;
}

/* ── Upsell CTA ───────────────────────────────────────────── */
.aav-upsell {
	background: #0f172a;
	border-radius: 12px;
	margin-bottom: 16px;
	overflow: hidden;
}
.aav-upsell-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 24px 32px;
	flex-wrap: wrap;
}
.aav-upsell-text h3 {
	color: #fff;
	margin: 0 0 6px;
	font-size: 18px;
}
.aav-upsell-text p {
	color: #94a3b8;
	margin: 0;
	font-size: 14px;
}
.aav-upsell-btn {
	display: inline-block;
	background: #f59e0b;
	color: #0f172a;
	font-weight: 700;
	font-size: 15px;
	padding: 12px 24px;
	border-radius: 8px;
	text-decoration: none;
	white-space: nowrap;
	transition: background .2s;
}
.aav-upsell-btn:hover { background: #d97706; color: #0f172a; }

/* ── Footer & Notices ─────────────────────────────────────── */
.aav-results-footer {
	font-size: 12px;
	color: #94a3b8;
	text-align: right;
	margin: 0;
}
.aav-error-message {
	background: #fee2e2;
	border: 1px solid #fca5a5;
	color: #991b1b;
	border-radius: 8px;
	padding: 16px 20px;
	font-size: 14px;
}
.aav-notice {
	padding: 12px 16px;
	background: #f0f9ff;
	border: 1px solid #bae6fd;
	border-radius: 8px;
	color: #0c4a6e;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 600px) {
	.aav-form-container { padding: 20px 16px; }
	.aav-score-number   { font-size: 48px; }
	.aav-input-group    { flex-direction: column; }
	.aav-submit-btn     { width: 100%; justify-content: center; }
	.aav-tab-item       { padding: 10px 12px; font-size: 12px; }
	.aav-detail-cell    { display: none; }
	.aav-upsell-inner   { flex-direction: column; text-align: center; }
	.aav-upsell-btn     { width: 100%; text-align: center; }
}
