/*
 * All selectors are scoped to #sab-widget (ID = high specificity) and the
 * layout/typography-critical properties carry. This is
 * intentional: WordPress themes and page builders (Elementor, etc.) often
 * ship global styles for headings, buttons, and form fields that otherwise
 * bleed into this widget and silently override its design.
 */

#sab-widget {
	--sab-bg: #0d0d10;
	--sab-panel: #17171b;
	--sab-border: #2a2a30;
	--sab-accent: #ec1c5b;
	--sab-accent-dark: #6e1030;
	--sab-blue: #6d7bff;
	--sab-text: #f2f2f4;
	--sab-muted: #9a9aa2;
	--sab-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	max-width: 640px;
	margin: 0 auto;
	background: var(--sab-bg);
	color: var(--sab-text);
	font-family: var(--sab-font);
	padding: 26px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 6px;
	box-sizing: border-box;
	position: relative;
	text-align: left;
	line-height: normal;
}

#sab-widget, #sab-widget * {
	box-sizing: border-box;
	font-family: var(--sab-font);
	text-shadow: none;
	letter-spacing: normal;
}

#sab-widget button {
	all: unset;
	box-sizing: border-box;
	font-family: var(--sab-font);
	cursor: pointer;
}

/* ---------- Corner tick marks ---------- */
#sab-widget .sab-corner { position: absolute; width: 14px; height: 14px; pointer-events: none; }
#sab-widget .sab-corner::before, #sab-widget .sab-corner::after { content: ''; position: absolute; background: rgba(255, 255, 255, 0.55); }
#sab-widget .sab-corner::before { width: 100%; height: 1px; top: 50%; left: 0; transform: translateY(-50%); }
#sab-widget .sab-corner::after { width: 1px; height: 100%; left: 50%; top: 0; transform: translateX(-50%); }
#sab-widget .sab-corner-tl { top: -7px; left: -7px; }
#sab-widget .sab-corner-tr { top: -7px; right: -7px; }
#sab-widget .sab-corner-bl { bottom: -7px; left: -7px; }
#sab-widget .sab-corner-br { bottom: -7px; right: -7px; }

/* ---------- Landing screen ---------- */
#sab-widget .sab-badge-row { display: flex; align-items: center; gap: 8px; margin: 0 0 15px; }
#sab-widget .sab-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sab-accent); display: inline-block; flex-shrink: 0; }
#sab-widget .sab-brand { font-weight: 700; font-size: 18px; color: var(--sab-accent); line-height: 1; }
#sab-widget .sab-trial-tag { margin-left: auto; font-size: 11px; color: var(--sab-muted); }

#sab-widget .sab-pill {
	display: flex;
	align-items: center;
	gap: 6px;
	width: fit-content;
	margin: 0 auto 18px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 11px;
	color: var(--sab-muted);
	background: transparent;
}
#sab-widget .sab-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sab-accent); flex-shrink: 0; }

#sab-widget .sab-hero-title {
	font-size: 30px;
	line-height: 1.25;
	font-weight: 800;
	margin: 5px 0 8px;
	color: var(--sab-text);
}
#sab-widget .sab-highlight { color: var(--sab-accent); font-weight: 800; }

#sab-widget .sab-hero-sub { color: var(--sab-muted); font-size: 14px; line-height: 1.5; margin: 0 0 18px; max-width: 520px; font-weight: 400; }

#sab-widget .sab-progress {
	height: 4px;
	background: var(--sab-border);
	border-radius: 4px;
	overflow: hidden;
	margin: 0 0 7px;
}
#sab-widget .sab-progress-fill { height: 100%; width: 55%; background: linear-gradient(90deg, var(--sab-accent), #fff); }

#sab-widget .sab-progress-labels {
	display: flex;
	justify-content: space-between;
	font-size: 10px;
	letter-spacing: .04em;
	color: var(--sab-muted);
	margin: 0 0 18px;
}

#sab-widget .sab-stats-box {
	border: 1px solid var(--sab-blue);
	border-radius: 10px;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	padding: 17px 10px;
	margin: 0 0 18px;
	gap: 10px;
	background: transparent;
}
#sab-widget .sab-stat { text-align: center; }
#sab-widget .sab-stat-num { font-size: 26px; font-weight: 800; color: var(--sab-text); line-height: 1.2; }
#sab-widget .sab-stat-num-sm { font-size: 22px; font-weight: 800; }
#sab-widget .sab-stat-label { font-size: 10px; color: var(--sab-muted); letter-spacing: .03em; margin-top: 4px; font-weight: 400; }

#sab-widget .sab-service-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 0 0 8px; }
#sab-widget .sab-service-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 1 auto;
	background: transparent;
	border: 1px solid var(--sab-accent);
	color: var(--sab-accent);
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.2;
	transition: background .15s ease, color .15s ease;
}
#sab-widget .sab-service-btn:hover, #sab-widget .sab-service-btn.active {
	background: var(--sab-accent);
	color: #fff;
}

#sab-widget .sab-service-hint { text-align: center; color: var(--sab-muted); font-size: 12px; margin: 5px 0 13px; }

#sab-widget .sab-see-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: fit-content;
	background: linear-gradient(180deg, #2a2a32, #131316);
	border: 1px solid rgba(255, 255, 255, 0.16);
	color: var(--sab-text);
	padding: 10px 12px 10px 24px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 400;
	margin: 3px auto 12px;
	text-decoration: none;
}
#sab-widget .sab-see-btn:hover { background: linear-gradient(180deg, #34343d, #1a1a1e); }
#sab-widget .sab-see-btn span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	color: #111;
	font-size: 12px;
	line-height: 1;
}

#sab-widget .sab-fine-print { text-align: center; font-size: 11px; color: var(--sab-muted); margin: 0; }

/* ---------- Brief screen ---------- */
#sab-widget .sab-brief-box {
	border: 1px solid var(--sab-blue);
	border-radius: 12px;
	padding: 24px;
	margin: 0 0 20px;
	background: transparent;
}
#sab-widget .sab-brief-title { font-size: 22px; font-weight: 800; margin: 0 0 6px; color: var(--sab-text); }
#sab-widget .sab-brief-sub { color: var(--sab-muted); font-size: 13px; margin: 0 0 18px; font-weight: 400; }

#sab-widget .sab-label { display: block; font-size: 12px; color: var(--sab-muted); margin: 14px 0 6px; font-weight: 400; }
#sab-widget .sab-selected-service { color: var(--sab-accent); font-weight: 600; }

#sab-widget .sab-textarea,
#sab-widget .sab-input,
#sab-widget .sab-select {
	width: 100%;
	background: #1c1c22;
	border: 1px solid var(--sab-border);
	color: var(--sab-text);
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 13px;
	font-family: var(--sab-font);
	box-shadow: none;
	height: auto;
}
#sab-widget .sab-textarea:focus,
#sab-widget .sab-input:focus,
#sab-widget .sab-select:focus {
	outline: none;
	border-color: var(--sab-accent);
	box-shadow: none;
}

#sab-widget .sab-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

#sab-widget .sab-generate-btn {
	display: block;
	width: 100%;
	text-align: center;
	margin: 20px 0 0;
	background: var(--sab-accent-dark);
	border: 1px solid var(--sab-accent);
	color: #fff;
	padding: 12px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
}
#sab-widget .sab-generate-btn:hover { background: var(--sab-accent); }
#sab-widget .sab-generate-btn:disabled { opacity: .6; cursor: not-allowed; }

#sab-widget .sab-back-btn {
	display: block;
	width: 100%;
	margin: 10px 0 0;
	background: transparent;
	border: none;
	color: var(--sab-muted);
	padding: 6px;
	font-size: 12px;
	text-align: center;
}
#sab-widget .sab-back-btn:hover { color: var(--sab-text); }

#sab-widget .sab-result-box {
	background: var(--sab-panel);
	border-radius: 12px;
	padding: 26px 20px;
	text-align: center;
	min-height: 140px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
#sab-widget .sab-result-dots { display: flex; gap: 6px; margin: 0 0 16px; }
#sab-widget .sab-rd { width: 6px; height: 6px; border-radius: 50%; background: var(--sab-border); }
#sab-widget .sab-rd.active { background: var(--sab-accent); }

#sab-widget .sab-result-placeholder { color: var(--sab-muted); font-size: 13px; max-width: 420px; line-height: 1.6; margin: 0; font-weight: 400; }
#sab-widget .sab-result-content { color: var(--sab-text); font-size: 13px; line-height: 1.7; white-space: pre-wrap; text-align: left; width: 100%; }

@media (max-width: 480px) {
	#sab-widget .sab-two-col { grid-template-columns: 1fr; }
	#sab-widget .sab-hero-title { font-size: 24px; }
	#sab-widget .sab-stats-box { grid-template-columns: 1fr; }
}
