.cswidgets-admin {
	--cs-ink: #102d27;
	--cs-forest: #173f35;
	--cs-sage: #2f6b5b;
	--cs-mint: #e3ece8;
	--cs-canvas: #f4f7f5;
	--cs-paper: #ffffff;
	--cs-muted: #5f706a;
	--cs-border: #d9e3df;
	--cs-shadow: 0 18px 45px -34px rgba(16, 45, 39, 0.48);

	max-width: 1480px;
	margin: 0;
	padding: 26px 28px 48px 8px;
	color: var(--cs-ink);
}

.cswidgets-admin *,
.cswidgets-admin *::before,
.cswidgets-admin *::after {
	box-sizing: border-box;
}

.cswidgets-page-header {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin: 0 0 22px;
}

.cswidgets-brand-mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-top: 3px;
	border-radius: 15px;
	background: var(--cs-forest);
	box-shadow: 0 12px 26px -16px rgba(16, 45, 39, 0.9);
	color: #fff;
}

.cswidgets-brand-mark .dashicons {
	width: 23px;
	height: 23px;
	font-size: 23px;
}

.cswidgets-page-header h1 {
	margin: 1px 0 4px;
	padding: 0;
	color: var(--cs-ink);
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.2;
}

.cswidgets-page-header > div > p:last-child {
	max-width: 720px;
	margin: 0;
	color: var(--cs-muted);
	font-size: 14px;
	line-height: 1.6;
}

.cswidgets-eyebrow {
	margin: 0 0 3px;
	color: var(--cs-sage);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.3;
	text-transform: uppercase;
}

.cswidgets-admin .notice {
	margin: 0 0 18px;
	border-radius: 10px;
}

/* Connection panel */
.cswidgets-admin .card,
.cswidgets-connection {
	max-width: none;
}

.cswidgets-connection {
	position: relative;
	display: grid;
	grid-template-columns: minmax(220px, 0.75fr) minmax(420px, 1.6fr);
	column-gap: 32px;
	row-gap: 8px;
	margin: 0 0 20px;
	padding: 22px 24px;
	border: 1px solid var(--cs-border);
	border-radius: 18px;
	background: var(--cs-paper);
	box-shadow: var(--cs-shadow);
	overflow-wrap: anywhere;
}

.cswidgets-connection::before {
	position: absolute;
	top: 18px;
	left: 0;
	width: 4px;
	height: 46px;
	border-radius: 0 4px 4px 0;
	background: var(--cs-sage);
	content: "";
}

.cswidgets-connection h2 {
	grid-row: 1 / span 5;
	margin: 1px 0 0;
	color: var(--cs-ink);
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -0.015em;
}

.cswidgets-connection > p,
.cswidgets-connection > details,
.cswidgets-connection > .cswidgets-sync-progress,
.cswidgets-connection > .cswidgets-connection-actions {
	grid-column: 2;
	margin-top: 0;
	margin-bottom: 4px;
}

.cswidgets-connection-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
}

.cswidgets-connection-actions form,
.cswidgets-connection-actions .button {
	margin: 0 !important;
}

.cswidgets-connection > p:first-of-type {
	margin-bottom: 8px;
	font-size: 14px;
}

.cswidgets-connection form {
	vertical-align: middle;
}

.cswidgets-status {
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-inline-end: 7px;
	border-radius: 50%;
	font-size: 0;
	line-height: 1;
	vertical-align: 0;
}

.cswidgets-status-ok {
	background: #1e9a58;
	box-shadow: 0 0 0 4px rgba(30, 154, 88, 0.12);
}

.cswidgets-status-warn {
	background: #dba617;
	box-shadow: 0 0 0 4px rgba(219, 166, 23, 0.12);
}

.cswidgets-status-off {
	background: #8c8f94;
	box-shadow: 0 0 0 4px rgba(140, 143, 148, 0.12);
}

.cswidgets-connection-error {
	color: #b32d2e;
}

.cswidgets-pair-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}

.cswidgets-pair-form input[type="text"] {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	text-transform: uppercase;
}

.cswidgets-pair-fallback {
	margin-top: 8px;
}

.cswidgets-pair-fallback > summary {
	cursor: pointer;
	color: var(--cs-muted);
	font-size: 13px;
}

.cswidgets-admin .button,
.cswidgets-admin input[type="submit"] {
	min-height: 36px;
	border-radius: 8px;
	font-weight: 600;
}

.cswidgets-admin .button-primary,
.cswidgets-admin input.button-primary {
	border-color: var(--cs-forest);
	background: var(--cs-forest);
	color: #fff;
}

.cswidgets-admin .button-primary:hover,
.cswidgets-admin .button-primary:focus,
.cswidgets-admin input.button-primary:hover,
.cswidgets-admin input.button-primary:focus {
	border-color: #245447;
	background: #245447;
	color: #fff;
}

.cswidgets-admin .button:focus,
.cswidgets-admin input:focus,
.cswidgets-admin select:focus,
.cswidgets-admin textarea:focus,
.cswidgets-admin summary:focus-visible,
.cswidgets-tabs button:focus-visible {
	border-color: var(--cs-sage);
	box-shadow: 0 0 0 1px var(--cs-sage), 0 0 0 4px rgba(47, 107, 91, 0.13);
	outline: 0;
}

/* Settings workspace */
.cswidgets-editor {
	border: 1px solid var(--cs-border);
	border-radius: 22px;
	background: var(--cs-paper);
	box-shadow: var(--cs-shadow);
	overflow: hidden;
}

.cswidgets-tabs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 6px;
	padding: 10px;
	border-bottom: 1px solid var(--cs-border);
	background: var(--cs-canvas);
}

.cswidgets-tabs button {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 64px;
	padding: 10px 12px;
	border: 1px solid transparent;
	border-radius: 13px;
	background: transparent;
	color: var(--cs-muted);
	cursor: pointer;
	text-align: left;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.cswidgets-tabs button:hover {
	background: rgba(255, 255, 255, 0.7);
	color: var(--cs-ink);
}

.cswidgets-tabs button[aria-selected="true"] {
	border-color: var(--cs-border);
	background: #fff;
	box-shadow: 0 8px 20px -16px rgba(16, 45, 39, 0.6);
	color: var(--cs-ink);
}

.cswidgets-tabs .dashicons {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	font-size: 20px;
	color: #74867f;
}

.cswidgets-tabs button[aria-selected="true"] .dashicons {
	color: var(--cs-sage);
}

.cswidgets-tabs button span:last-child {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 2px;
}

.cswidgets-tabs strong {
	font-size: 13px;
	line-height: 1.25;
}

.cswidgets-tabs small {
	font-size: 11px;
	font-weight: 400;
	line-height: 1.25;
}

.cswidgets-workspace {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	align-items: start;
	gap: 22px;
	padding: 22px;
}

.cswidgets-panels {
	min-width: 0;
}

.cswidgets-panel[hidden],
.cswidgets-preview-scene[hidden] {
	display: none !important;
}

.cswidgets-panel > h2,
.cswidgets-advanced-body h2 {
	margin: 0;
	color: var(--cs-ink);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.cswidgets-panel > h2 + p,
.cswidgets-advanced-body h2 + p {
	margin: 5px 0 18px;
	color: var(--cs-muted);
	font-size: 13px;
	line-height: 1.55;
}

.cswidgets-panel .form-table,
.cswidgets-advanced .form-table {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
}

.cswidgets-panel .form-table tbody {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.cswidgets-panel .form-table tr {
	display: block;
	min-width: 0;
	padding: 15px;
	border: 1px solid var(--cs-border);
	border-radius: 14px;
	background: #fff;
}

/* The rules above (and the display:grid ones below) out-specify the browser's
   default [hidden] styling, so a dependent row toggled off by toggleDependentRow()
   would stay on screen without this. */
.cswidgets-panel .form-table tr[hidden] {
	display: none !important;
}

.cswidgets-panel .form-table th,
.cswidgets-panel .form-table td {
	display: block;
	width: 100%;
	padding: 0;
}

.cswidgets-panel .form-table th {
	margin-bottom: 8px;
	color: var(--cs-ink);
	font-size: 12px;
	font-weight: 650;
	line-height: 1.35;
}

.cswidgets-panel .form-table td {
	color: var(--cs-muted);
	font-size: 13px;
}

.cswidgets-panel .form-table tr.cswidgets-field-chat_enabled,
.cswidgets-panel .form-table tr.cswidgets-field-search_enabled,
.cswidgets-panel .form-table tr.cswidgets-field-ask_enabled,
.cswidgets-panel .form-table tr.cswidgets-field-chat_welcome_message,
.cswidgets-panel .form-table tr.cswidgets-field-chat_shortcode,
.cswidgets-panel .form-table tr.cswidgets-field-search_shortcode,
.cswidgets-panel .form-table tr.cswidgets-field-ask_shortcode,
.cswidgets-panel .form-table tr.cswidgets-field-chat_dynamic_params,
.cswidgets-panel .form-table tr.cswidgets-field-product_dynamic_params,
.cswidgets-panel .form-table tr.cswidgets-field-product_variant_filters {
	grid-column: 1 / -1;
}

.cswidgets-panel .form-table tr.cswidgets-field-chat_enabled,
.cswidgets-panel .form-table tr.cswidgets-field-search_enabled,
.cswidgets-panel .form-table tr.cswidgets-field-ask_enabled {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	background: var(--cs-canvas);
}

.cswidgets-panel .form-table tr.cswidgets-field-chat_enabled th,
.cswidgets-panel .form-table tr.cswidgets-field-search_enabled th,
.cswidgets-panel .form-table tr.cswidgets-field-ask_enabled th {
	margin: 0;
}

.cswidgets-panel .form-table tr.cswidgets-field-chat_enabled td,
.cswidgets-panel .form-table tr.cswidgets-field-search_enabled td,
.cswidgets-panel .form-table tr.cswidgets-field-ask_enabled td {
	width: auto;
}

.cswidgets-panel input[type="text"],
.cswidgets-panel input[type="url"],
.cswidgets-panel input[type="password"],
.cswidgets-panel input[type="number"],
.cswidgets-panel select,
.cswidgets-panel textarea,
.cswidgets-advanced input[type="text"],
.cswidgets-advanced input[type="url"],
.cswidgets-advanced input[type="password"] {
	width: 100%;
	max-width: none;
	min-height: 40px;
	border-color: #cdd9d4;
	border-radius: 8px;
	box-shadow: none;
}

.cswidgets-panel textarea {
	min-height: 92px;
	resize: vertical;
}

.cswidgets-panel input[type="number"] {
	width: 100%;
}

.cswidgets-panel input[type="color"] {
	width: 100%;
	height: 42px;
	padding: 3px;
	border: 1px solid #cdd9d4;
	border-radius: 9px;
	background: #fff;
	cursor: pointer;
}

.cswidgets-panel input[type="checkbox"],
.cswidgets-advanced input[type="checkbox"] {
	position: relative;
	width: 42px;
	height: 24px;
	margin: 0;
	border: 1px solid #aebdb7;
	border-radius: 999px;
	background: #c9d3cf;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease;
}

.cswidgets-panel input[type="checkbox"]::before,
.cswidgets-advanced input[type="checkbox"]::before {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	margin: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 45, 39, 0.25);
	content: "";
	transition: transform 160ms ease;
}

.cswidgets-panel input[type="checkbox"]:checked,
.cswidgets-advanced input[type="checkbox"]:checked {
	border-color: var(--cs-sage);
	background: var(--cs-sage);
}

.cswidgets-panel input[type="checkbox"]:checked::before,
.cswidgets-advanced input[type="checkbox"]:checked::before {
	width: 16px;
	height: 16px;
	margin: 0;
	transform: translateX(18px);
}

.cswidgets-panel .description,
.cswidgets-advanced .description {
	margin: 7px 0 0;
	color: var(--cs-muted);
	font-size: 12px;
	line-height: 1.5;
}

.cswidgets-shortcode-wrap .description {
	margin-bottom: 8px;
}

.cswidgets-shortcode-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cswidgets-shortcode-row code {
	display: block;
	min-width: 0;
	flex: 1;
	max-height: 82px;
	padding: 10px 12px;
	border: 1px solid #cdd9d4;
	border-radius: 9px;
	background: var(--cs-canvas);
	color: #31443e;
	font-size: 12px;
	line-height: 1.45;
	overflow: auto;
	white-space: normal;
	overflow-wrap: anywhere;
}

.cswidgets-dynamic-params-container {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.cswidgets-param-inputs,
.cswidgets-json-input {
	min-width: 0;
	padding: 13px;
	border: 1px solid var(--cs-border);
	border-radius: 11px;
	background: var(--cs-canvas);
}

.cswidgets-param-inputs h4,
.cswidgets-json-input h4 {
	margin: 0 0 9px;
	color: var(--cs-ink);
	font-size: 12px;
}

.cswidgets-param-inputs ul {
	margin: 8px 0;
}

.cswidgets-param-inputs .button {
	margin-top: 8px;
}

.cswidgets-advanced {
	margin-top: 14px;
	border: 1px solid var(--cs-border);
	border-radius: 14px;
	background: var(--cs-canvas);
	overflow: hidden;
}

.cswidgets-advanced > summary {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 15px;
	cursor: pointer;
	list-style: none;
}

.cswidgets-advanced > summary::-webkit-details-marker {
	display: none;
}

.cswidgets-advanced > summary::after {
	margin-left: auto;
	color: var(--cs-muted);
	font-size: 18px;
	content: "+";
}

.cswidgets-advanced[open] > summary::after {
	content: "−";
}

.cswidgets-advanced > summary > span:nth-child(2) {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cswidgets-advanced summary strong {
	color: var(--cs-ink);
	font-size: 13px;
}

.cswidgets-advanced summary small {
	color: var(--cs-muted);
	font-size: 11px;
}

.cswidgets-advanced-body {
	padding: 16px;
	border-top: 1px solid var(--cs-border);
	background: #fff;
}

.cswidgets-advanced-body .form-table th {
	width: 180px;
	padding: 14px 18px 14px 0;
	font-size: 12px;
}

.cswidgets-advanced-body .form-table td {
	padding: 10px 0;
}

/* Live preview */
.cswidgets-preview {
	position: sticky;
	top: 46px;
	min-width: 0;
	border: 1px solid #27473f;
	border-radius: 20px;
	background: var(--cs-ink);
	box-shadow: 0 26px 60px -38px rgba(16, 45, 39, 0.9);
	overflow: hidden;
}

.cswidgets-preview-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 50px;
	padding: 10px 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 13px;
	font-weight: 650;
}

.cswidgets-preview-head > span:first-child {
	display: flex;
	align-items: center;
	gap: 7px;
}

.cswidgets-live-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 8px;
	border-radius: 999px;
	background: rgba(184, 243, 214, 0.1);
	color: #b8f3d6;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.cswidgets-live-badge i {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #55d58e;
}

.cswidgets-preview-browser {
	margin: 12px;
	border-radius: 14px;
	background: #eef2ef;
	overflow: hidden;
}

.cswidgets-browser-bar {
	display: flex;
	align-items: center;
	gap: 5px;
	height: 34px;
	padding: 0 11px;
	border-bottom: 1px solid var(--cs-border);
	background: #fff;
}

.cswidgets-browser-bar i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #e36b64;
}

.cswidgets-browser-bar i:nth-child(2) {
	background: #e3bb4f;
}

.cswidgets-browser-bar i:nth-child(3) {
	background: #5fbe7b;
}

.cswidgets-browser-bar span {
	max-width: 180px;
	margin: 0 auto;
	padding: 3px 12px;
	border-radius: 5px;
	background: #f0f3f1;
	color: #70817b;
	font-size: 9px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cswidgets-preview-stage {
	position: relative;
	min-height: 470px;
	padding: 18px;
	background:
		linear-gradient(90deg, transparent 49%, rgba(122, 143, 135, 0.08) 50%, transparent 51%),
		linear-gradient(rgba(255, 255, 255, 0.75), rgba(239, 243, 240, 0.82));
}

.cswidgets-preview-stage::before,
.cswidgets-preview-stage::after {
	position: absolute;
	left: 20px;
	height: 10px;
	border-radius: 999px;
	background: #d9e2de;
	content: "";
}

.cswidgets-preview-stage::before {
	top: 25px;
	width: 90px;
}

.cswidgets-preview-stage::after {
	top: 50px;
	width: 200px;
	background: #fff;
}

.cswidgets-preview-scene {
	position: relative;
	z-index: 1;
	min-height: 430px;
}

.cswidgets-preview-overview,
.cswidgets-discovery-preview {
	display: flex;
	max-width: 290px;
	margin: 90px auto 0;
	padding: 22px;
	border: 1px solid var(--cs-border);
	border-radius: 17px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 22px 50px -38px rgba(16, 45, 39, 0.7);
	flex-direction: column;
	gap: 13px;
}

.cswidgets-preview-overview > .dashicons,
.cswidgets-discovery-preview > .dashicons {
	width: 34px;
	height: 34px;
	color: var(--cs-sage);
	font-size: 34px;
}

.cswidgets-preview-overview > p,
.cswidgets-discovery-preview > p {
	margin: 0 0 4px;
	color: var(--cs-ink);
	font-size: 17px;
	font-weight: 700;
}

.cswidgets-preview-overview > div,
.cswidgets-discovery-preview > div {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding-top: 11px;
	border-top: 1px solid var(--cs-border);
	color: var(--cs-muted);
	font-size: 12px;
}

.cswidgets-preview-overview strong,
.cswidgets-discovery-preview strong {
	color: var(--cs-ink);
}

.cswidgets-widget-card {
	position: absolute;
	right: 0;
	bottom: 0;
	width: min(320px, 100%);
	border: 1px solid var(--cs-border);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 24px 55px -27px rgba(16, 45, 39, 0.65);
	overflow: hidden;
	transition: inset 200ms ease;
}

.cswidgets-widget-card.is-widget-disabled,
.cswidgets-search-preview-window.is-widget-disabled,
.cswidgets-ask-preview-window.is-widget-disabled {
	opacity: 0.48;
	filter: grayscale(0.35);
}

.cswidgets-widget-card[data-position="bottom-left"] {
	right: auto;
	left: 0;
}

.cswidgets-widget-card[data-position="top-right"] {
	top: 80px;
	bottom: auto;
}

.cswidgets-widget-card[data-position="top-left"] {
	top: 80px;
	right: auto;
	bottom: auto;
	left: 0;
}

.cswidgets-widget-head {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 66px;
	padding: 13px 15px;
	color: #fff;
	transition: background-color 160ms ease;
}

.cswidgets-widget-head > span:last-child {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 2px;
}

.cswidgets-widget-head strong,
.cswidgets-widget-head small {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cswidgets-widget-head strong {
	font-size: 13px;
}

.cswidgets-widget-head small {
	color: rgba(255, 255, 255, 0.76);
	font-size: 11px;
}

.cswidgets-preview-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
}

.cswidgets-preview-avatar.is-hidden {
	display: none;
}

.cswidgets-widget-conversation {
	min-height: 230px;
	padding: 16px;
	background: #f7f7f2;
}

.cswidgets-widget-conversation p {
	max-width: 82%;
	margin: 0;
	padding: 11px 12px;
	border: 1px solid var(--cs-border);
	border-radius: 14px 14px 14px 4px;
	background: #fff;
	box-shadow: 0 8px 18px -15px rgba(16, 45, 39, 0.5);
	color: #31443e;
	font-size: 12px;
	line-height: 1.45;
}

.cswidgets-widget-input,
.cswidgets-ask-preview-window > div {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	margin: 9px;
	padding: 7px 8px 7px 11px;
	border: 1px solid var(--cs-border);
	border-radius: 11px;
	color: #87958f;
	font-size: 11px;
}

.cswidgets-widget-input > span,
.cswidgets-ask-preview-window > div > span {
	min-width: 0;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cswidgets-widget-input i,
.cswidgets-ask-preview-window > div i {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 7px;
	color: #fff;
	font-style: normal;
}

.cswidgets-search-preview-window,
.cswidgets-ask-preview-window {
	max-width: 320px;
	margin: 92px auto 0;
	padding: 14px;
	border: 1px solid var(--cs-border);
	border-radius: 17px;
	background: #fff;
	box-shadow: 0 22px 50px -38px rgba(16, 45, 39, 0.7);
}

.cswidgets-search-preview-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 8px 11px;
	border: 1px solid var(--cs-border);
	border-radius: 10px;
	color: #788983;
	font-size: 11px;
}

.cswidgets-search-preview-window > p {
	margin: 14px 0 8px;
	color: var(--cs-ink);
	font-size: 12px;
	font-weight: 650;
}

.cswidgets-search-results {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 7px;
}

.cswidgets-search-results i {
	display: block;
	aspect-ratio: 1;
	border-radius: 8px;
	background: linear-gradient(135deg, #dce6e1, #f0f4f2);
}

.cswidgets-search-preview-window button {
	width: 100%;
	min-height: 35px;
	margin-top: 10px;
	border: 0;
	border-radius: 8px;
	color: #fff;
	font-size: 11px;
	font-weight: 650;
}

.cswidgets-ask-preview-window {
	padding-top: 22px;
	text-align: center;
}

.cswidgets-ask-preview-window > .dashicons {
	width: 32px;
	height: 32px;
	font-size: 32px;
}

.cswidgets-ask-preview-window > strong {
	display: block;
	margin-top: 8px;
	color: var(--cs-ink);
	font-size: 16px;
}

.cswidgets-ask-preview-window > p {
	margin: 5px 0 14px;
	color: var(--cs-muted);
	font-size: 11px;
}

.cswidgets-ask-preview-window > div {
	margin: 0;
	text-align: left;
}

.cswidgets-preview-note {
	margin: 0;
	padding: 0 15px 13px;
	color: rgba(255, 255, 255, 0.58);
	font-size: 10px;
	line-height: 1.4;
	text-align: center;
}

.cswidgets-save-bar {
	display: flex;
	position: sticky;
	z-index: 10;
	bottom: 0;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 66px;
	padding: 12px 22px;
	border-top: 1px solid var(--cs-border);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 -14px 32px -30px rgba(16, 45, 39, 0.6);
	backdrop-filter: blur(8px);
}

.cswidgets-save-bar > span {
	display: flex;
	align-items: center;
	gap: 7px;
	color: var(--cs-muted);
	font-size: 12px;
}

.cswidgets-save-bar > span.is-dirty {
	color: #9a6700;
	font-weight: 600;
}

.cswidgets-save-bar > span.is-dirty .dashicons {
	color: #dba617;
}

.cswidgets-save-bar .dashicons {
	color: var(--cs-sage);
}

.cswidgets-save-bar .submit {
	margin: 0;
	padding: 0;
}

.cswidgets-save-bar .button-primary {
	min-height: 40px;
	padding: 0 20px;
}

/* Sync progress */
.cswidgets-sync-progress {
	max-width: 520px;
}

.cswidgets-progress-track {
	height: 8px;
	border-radius: 999px;
	background: #dce4e0;
	overflow: hidden;
}

.cswidgets-progress-bar {
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: var(--cs-sage);
	transition: width 0.4s ease;
}

.cswidgets-sync-progress.is-failed .cswidgets-progress-bar {
	background: #d63638;
}

.cswidgets-progress-label {
	margin: 6px 0 0;
	color: var(--cs-muted);
	font-size: 12px;
}

@media (max-width: 1200px) {
	.cswidgets-tabs {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.cswidgets-workspace {
		grid-template-columns: minmax(0, 1fr) 340px;
	}
}

@media (max-width: 960px) {
	.cswidgets-workspace {
		grid-template-columns: 1fr;
	}

	.cswidgets-preview {
		position: relative;
		top: auto;
	}

	.cswidgets-connection {
		grid-template-columns: 1fr;
	}

	.cswidgets-connection h2,
	.cswidgets-connection > p,
	.cswidgets-connection > details,
	.cswidgets-connection > .cswidgets-sync-progress,
	.cswidgets-connection > .cswidgets-connection-actions {
		grid-column: 1;
		grid-row: auto;
	}
}

@media (max-width: 782px) {
	.cswidgets-admin {
		padding: 18px 12px 36px 2px;
	}

	.cswidgets-page-header h1 {
		font-size: 23px;
	}

	.cswidgets-brand-mark {
		width: 42px;
		height: 42px;
	}

	.cswidgets-connection {
		padding: 18px;
	}

	.cswidgets-tabs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cswidgets-tabs button {
		min-height: 56px;
	}

	.cswidgets-tabs small {
		display: none;
	}

	.cswidgets-workspace {
		padding: 14px;
	}

	.cswidgets-panel .form-table tbody,
	.cswidgets-dynamic-params-container {
		grid-template-columns: 1fr;
	}

	.cswidgets-panel .form-table tr {
		grid-column: 1 !important;
	}

	.cswidgets-save-bar {
		align-items: stretch;
		flex-direction: column;
		gap: 8px;
	}

	.cswidgets-save-bar .button-primary {
		width: 100%;
	}

	.cswidgets-shortcode-row {
		align-items: stretch;
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cswidgets-admin *,
	.cswidgets-admin *::before,
	.cswidgets-admin *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
