/* Web AI workspace — Microsoft Clarity presentation theme (no logic changes) */

body.ais-stitch-page.clarity-workspace {
	--clarity-bg: #f0f0f0;
	--clarity-surface: #ffffff;
	--clarity-border: #e1dfdd;
	--clarity-border-soft: #edebe9;
	--clarity-text: #242424;
	--clarity-muted: #605e5c;
	--clarity-purple: #742774;
	--clarity-purple-soft: rgba(116, 39, 116, 0.1);
	--clarity-blue: #0078d4;
	--clarity-blue-soft: rgba(0, 120, 212, 0.12);
	--clarity-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108);
	--clarity-shadow-hover: 0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108);

	--primary: var(--clarity-blue);
	--primary-hover: #106ebe;
	--border: var(--clarity-border);
	--text: var(--clarity-text);
	--text-muted: var(--clarity-muted);
	--surface: var(--clarity-surface);
	--info-bg: #faf9f8;
	--info-border: var(--clarity-border-soft);
	--bg: var(--clarity-bg);

	font-family: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
	color: var(--clarity-text) !important;
	background: var(--clarity-bg) !important;
}

body.ais-stitch-page.clarity-workspace .app-stage {
	background: var(--clarity-bg);
}

body.ais-stitch-page.clarity-workspace .app-main {
	background: var(--clarity-bg);
	padding: 16px 20px 32px;
}

/* Top bar — Clarity shell */
body.ais-stitch-page.clarity-workspace .ais-stitch-topbar {
	background: var(--clarity-surface);
	border-bottom: 1px solid var(--clarity-border);
	box-shadow: var(--clarity-shadow);
	padding: 12px 20px;
	gap: 12px 16px;
}

body.ais-stitch-page.clarity-workspace .ais-stitch-crumb-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--clarity-muted);
	text-transform: none;
	letter-spacing: 0;
}

body.ais-stitch-page.clarity-workspace .ais-stitch-topbar-left select {
	border: 1px solid var(--clarity-border);
	border-radius: 4px;
	padding: 6px 10px;
	font-size: 14px;
	min-height: 32px;
	background: var(--clarity-surface);
	color: var(--clarity-text);
}

body.ais-stitch-page.clarity-workspace .ais-stitch-topbar-left select:focus {
	outline: 2px solid var(--clarity-blue);
	outline-offset: 0;
	border-color: var(--clarity-blue);
}

body.ais-stitch-page.clarity-workspace .ais-stitch-url-wrap {
	background: var(--clarity-surface);
	border: 1px solid var(--clarity-border);
	border-radius: 4px;
	padding: 6px 12px;
	min-height: 32px;
}

body.ais-stitch-page.clarity-workspace .ais-stitch-url-wrap svg {
	color: var(--clarity-muted);
}

body.ais-stitch-page.clarity-workspace .ais-stitch-url-wrap input {
	color: var(--clarity-text);
	font-size: 13px;
}

body.ais-stitch-page.clarity-workspace .ais-stitch-icon-btn {
	border-radius: 4px;
	color: var(--clarity-muted);
}

body.ais-stitch-page.clarity-workspace .ais-stitch-icon-btn:hover {
	background: var(--clarity-blue-soft);
	color: var(--clarity-blue);
}

body.ais-stitch-page.clarity-workspace .ais-stitch-avatar {
	border: 1px solid var(--clarity-border);
}

/* Cards / panels */
body.ais-stitch-page.clarity-workspace .data-panel {
	background: var(--clarity-surface);
	border: 1px solid var(--clarity-border);
	border-radius: 4px;
	box-shadow: var(--clarity-shadow) !important;
	margin-bottom: 12px;
}

body.ais-stitch-page.clarity-workspace .data-panel-head {
	padding: 14px 20px;
	border-bottom: 1px solid var(--clarity-border-soft);
	font-size: 15px;
	font-weight: 600;
	color: var(--clarity-text);
	background: linear-gradient(180deg, #faf9f8 0%, var(--clarity-surface) 100%);
}

body.ais-stitch-page.clarity-workspace .data-panel-body {
	padding: 16px 20px;
}

body.ais-stitch-page.clarity-workspace .ais-stitch-activation {
	padding: 14px 20px;
	gap: 16px 24px;
}

body.ais-stitch-page.clarity-workspace .ais-stitch-section-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: var(--clarity-muted);
}

body.ais-stitch-page.clarity-workspace .ais-activation-item {
	font-size: 14px;
	font-weight: 500;
	color: var(--clarity-text);
}

/* Fold sections */
body.ais-stitch-page.clarity-workspace .data-panel-body--folds {
	padding: 0 !important;
}

body.ais-stitch-page.clarity-workspace .pop-fold {
	border: none;
	border-radius: 0;
	background: var(--clarity-surface);
	box-shadow: none;
}

body.ais-stitch-page.clarity-workspace .data-panel-body--folds .pop-fold + .pop-fold .pop-fold-head {
	border-top: 1px solid var(--clarity-border-soft);
}

body.ais-stitch-page.clarity-workspace .pop-fold-head {
	padding: 14px 20px;
	background: var(--clarity-surface);
	border-bottom: 1px solid var(--clarity-border-soft);
}

body.ais-stitch-page.clarity-workspace .pop-fold-head:hover {
	background: #faf9f8;
}

body.ais-stitch-page.clarity-workspace .pop-fold-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--clarity-text);
}

body.ais-stitch-page.clarity-workspace .pop-fold-preview {
	font-size: 12px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	color: var(--clarity-muted);
}

body.ais-stitch-page.clarity-workspace .pop-fold[data-expanded="true"] .pop-fold-head {
	border-bottom-color: var(--clarity-border-soft);
}

body.ais-stitch-page.clarity-workspace .pop-fold-body {
	padding: 20px;
	background: var(--clarity-surface);
}

body.ais-stitch-page.clarity-workspace .pop-card {
	border-bottom-color: var(--clarity-border-soft);
	padding-bottom: 20px;
	margin-bottom: 20px;
}

body.ais-stitch-page.clarity-workspace .pop-card h3 {
	font-size: 14px;
	font-weight: 600;
	color: var(--clarity-text);
}

body.ais-stitch-page.clarity-workspace .pop-fold-actions {
	border-top-color: var(--clarity-border-soft);
	padding-top: 16px;
	margin-top: 4px;
}

/* Labels & hints */
body.ais-stitch-page.clarity-workspace .field label,
body.ais-stitch-page.clarity-workspace .pop-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: var(--clarity-muted);
}

body.ais-stitch-page.clarity-workspace .help,
body.ais-stitch-page.clarity-workspace .pop-hint,
body.ais-stitch-page.clarity-workspace .small {
	color: var(--clarity-muted);
	font-size: 13px;
	line-height: 1.55;
}

body.ais-stitch-page.clarity-workspace .pop-hint-box {
	background: var(--clarity-blue-soft);
	border: 1px solid rgba(0, 120, 212, 0.22);
	border-radius: 4px;
	color: var(--clarity-text);
	font-style: normal;
}

/* Inputs */
body.ais-stitch-page.clarity-workspace .pop-input,
body.ais-stitch-page.clarity-workspace .pop-select,
body.ais-stitch-page.clarity-workspace .pop-textarea,
body.ais-stitch-page.clarity-workspace .field input[type="text"],
body.ais-stitch-page.clarity-workspace .field textarea,
body.ais-stitch-page.clarity-workspace input,
body.ais-stitch-page.clarity-workspace select,
body.ais-stitch-page.clarity-workspace textarea {
	border: 1px solid var(--clarity-border) !important;
	border-radius: 4px !important;
	background: var(--clarity-surface) !important;
	color: var(--clarity-text) !important;
	font-size: 14px;
	min-height: 32px;
}

body.ais-stitch-page.clarity-workspace .pop-input:focus,
body.ais-stitch-page.clarity-workspace .pop-select:focus,
body.ais-stitch-page.clarity-workspace .pop-textarea:focus,
body.ais-stitch-page.clarity-workspace .field input[type="text"]:focus,
body.ais-stitch-page.clarity-workspace .field textarea:focus,
body.ais-stitch-page.clarity-workspace input:focus,
body.ais-stitch-page.clarity-workspace select:focus,
body.ais-stitch-page.clarity-workspace textarea:focus {
	outline: 2px solid var(--clarity-blue) !important;
	outline-offset: 0 !important;
	border-color: var(--clarity-blue) !important;
	box-shadow: none !important;
}

/* Buttons */
body.ais-stitch-page.clarity-workspace .btn {
	border-radius: 4px;
	font-weight: 600;
	font-size: 13px;
	padding: 7px 14px;
	min-height: 32px;
}

body.ais-stitch-page.clarity-workspace .btn-primary {
	background: var(--clarity-blue) !important;
	border: 1px solid var(--clarity-blue) !important;
	color: #fff !important;
}

body.ais-stitch-page.clarity-workspace .btn-primary:hover {
	background: #106ebe !important;
	border-color: #106ebe !important;
	color: #fff !important;
}

body.ais-stitch-page.clarity-workspace .btn-secondary {
	background: var(--clarity-surface) !important;
	color: var(--clarity-text) !important;
	border: 1px solid var(--clarity-border) !important;
}

body.ais-stitch-page.clarity-workspace .btn-secondary:hover {
	background: var(--clarity-blue-soft) !important;
	border-color: var(--clarity-blue) !important;
	color: var(--clarity-blue) !important;
}

body.ais-stitch-page.clarity-workspace .pop-remove-btn {
	border-radius: 4px;
	border-color: #f1bbbc;
	background: #fdf3f4;
	color: #a4262c;
	font-size: 12px;
	padding: 6px 12px;
}

body.ais-stitch-page.clarity-workspace .pop-remove-btn:hover {
	background: #f9dadb;
	color: #750b1c;
}

/* Toggle switches */
body.ais-stitch-page.clarity-workspace .ais-switch input:checked + .ais-slider {
	background: var(--clarity-blue);
}

body.ais-stitch-page.clarity-workspace .ais-slider {
	background: #c8c6c4;
}

/* Condition rows & lead capture */
body.ais-stitch-page.clarity-workspace .pop-cond-row {
	border: 1px solid var(--clarity-border-soft);
	border-radius: 4px;
	background: #faf9f8;
	padding: 12px 14px;
}

body.ais-stitch-page.clarity-workspace .ais-lead-order-list li {
	border: 1px solid var(--clarity-border-soft);
	border-radius: 4px;
	background: var(--clarity-surface);
}

body.ais-stitch-page.clarity-workspace .ais-lead-check {
	color: var(--clarity-text);
}

body.ais-stitch-page.clarity-workspace .ais-lead-check input {
	accent-color: var(--clarity-blue);
}

/* Snippet block */
body.ais-stitch-page.clarity-workspace pre.snippet {
	background: #1b1a19;
	color: #f3f2f1;
	border-radius: 4px;
	border: 1px solid #323130;
	font-size: 12px;
	line-height: 1.5;
}

/* Links */
body.ais-stitch-page.clarity-workspace a {
	color: var(--clarity-blue);
}

body.ais-stitch-page.clarity-workspace a:hover {
	color: #106ebe;
}

/* Status text */
body.ais-stitch-page.clarity-workspace .inline-status,
body.ais-stitch-page.clarity-workspace .status {
	color: var(--clarity-muted);
	font-size: 13px;
}

/* Follow-up rules (popup builder injects markup) */
body.ais-stitch-page.clarity-workspace #aisFollowupRulesRoot .field label,
body.ais-stitch-page.clarity-workspace #aisFollowupRulesRoot label {
	color: var(--clarity-muted);
}

body.ais-stitch-page.clarity-workspace #ais_uw_rows .pop-cond-row {
	margin-bottom: 10px;
}

@media (max-width: 900px) {
	body.ais-stitch-page.clarity-workspace .app-main {
		padding: 12px 14px 24px;
	}
}

body.ais-stitch-page.clarity-workspace #selProject.is-loading {
	opacity: 0.72;
	cursor: wait;
}
