.csuk-assistant-drawer {
	position: fixed;
	top: auto;
	bottom: 72px;
	right: 42px;
	z-index: 100000;
	width: min(390px, calc(100vw - 56px));
	max-height: min(620px, calc(100vh - 128px));
	overflow: auto;
	background: #111827;
	color: #f9fafb;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-right: 0;
	border-radius: 8px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
	transform: translateX(calc(100% + 42px));
	transition: transform 180ms ease;
}

.csuk-assistant-drawer.is-open {
	transform: translateX(0);
}

.csuk-assistant-drawer-tabs {
	position: fixed;
	top: auto;
	bottom: 112px;
	right: 0;
	z-index: 100001;
	display: grid;
	gap: 8px;
}

.csuk-assistant-drawer-tab {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-right: 0;
	background: #2563eb;
	color: #fff;
	border-radius: 8px 0 0 8px;
	padding: 12px 7px;
	font: 700 12px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.csuk-assistant-drawer-tab:hover,
.csuk-assistant-drawer-tab:focus {
	background: #1d4ed8;
	outline: 3px solid rgba(147, 197, 253, 0.8);
	outline-offset: 2px;
}

.csuk-error-tab {
	background: #dc2626;
}

.csuk-error-tab:hover,
.csuk-error-tab:focus {
	background: #b91c1c;
}

.csuk-assistant-panel {
	display: none;
	background: transparent;
	color: inherit;
	font: 13px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.csuk-panel-header {
	display: block;
	width: 100%;
	text-align: left;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	background: #1f2937;
	color: #f9fafb;
	padding: 14px 16px;
	font: 800 15px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	cursor: pointer;
}

div.csuk-panel-header {
	cursor: default;
}

.csuk-error-header {
	background: #3b1619;
	color: #fecaca;
}

.csuk-success-header {
	background: #12301f;
	color: #bbf7d0;
}

.csuk-panel-body {
	padding: 14px 16px 18px;
}

.csuk-diagnostic-list,
.csuk-feedback-list {
	margin: 0;
	padding-left: 18px;
}

.csuk-diagnostic-item,
.csuk-feedback-list li {
	margin-bottom: 10px;
}

.csuk-diagnostic-item button {
	border: 0;
	background: transparent;
	color: #93c5fd;
	cursor: pointer;
	padding: 0;
	margin: 0 auto;
	text-align: left;
	font-weight: 700;
}

.csuk-diagnostic-item button:hover,
.csuk-diagnostic-item button:focus {
	color: #bfdbfe;
	text-decoration: underline;
	outline: none;
}

.csuk-diagnostic-item p {
	margin: 4px 0 0;
	color: #d1d5db;
}

.csuk-empty-state {
	margin: 0;
	color: #d1d5db;
}

.csuk-good {
	color: #bbf7d0;
}

.csuk-suggestion {
	color: #fde68a;
}

.csuk-error-row {
	margin-bottom: 14px;
}

.csuk-error-row h4 {
	margin: 0 0 5px;
	font-size: 12px;
	text-transform: uppercase;
	color: #c7d2fe;
	letter-spacing: 0;
}

.csuk-error-row pre {
	margin: 0;
	white-space: pre-wrap;
	font-family: inherit;
	color: #f9fafb;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 6px;
	padding: 9px 10px;
}

.csuk-secondary-btn {
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: #374151;
	color: #fff;
	border-radius: 6px;
	padding: 8px 11px;
	font: 700 12px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	cursor: pointer;
}

.csuk-secondary-btn:hover,
.csuk-secondary-btn:focus {
	background: #4b5563;
	outline: 3px solid rgba(147, 197, 253, 0.75);
	outline-offset: 2px;
}

.csuk-diagnostic-error {
	text-decoration: underline wavy #ef4444;
	text-decoration-thickness: 1.5px;
}

.csuk-diagnostic-warning {
	text-decoration: underline wavy #f59e0b;
	text-decoration-thickness: 1.5px;
}


.csuk-diagnostics-gutter {
	width: 24px;
}

.csuk-diagnostics-gutter .CodeMirror-gutter-elt {
	display: flex;
	align-items: center;
	justify-content: center;
}
.csuk-diagnostic-marker {
	display: block;
	width: 16px;
	height: 16px;
	border: 0;
	border-radius: 50%;
	background: #dc2626;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 16px;
	padding: 0;
	margin: 0 auto;
	cursor: pointer;
}

.csuk-line-flash {
	animation: csuk-line-flash 1.2s ease-out;
}

@keyframes csuk-line-flash {
	0% { background: rgba(255, 213, 79, 0.75); }
	100% { background: transparent; }
}

.csuk-hover-help {
	position: fixed;
	z-index: 100000;
	display: none;
	width: 260px;
	padding: 10px;
	background: #111827;
	color: #f9fafb;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
	font: 13px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	pointer-events: none;
}

.csuk-hover-help strong {
	color: #bfdbfe;
}

.csuk-hover-help p {
	margin: 5px 0;
	color: #e5e7eb;
}

.csuk-hover-help code,
.csuk-hover-help pre {
	display: block;
	margin: 6px 0 0;
	white-space: pre-wrap;
	color: #d2f5ff !important;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 5px;
	padding: 7px 8px;
	font-family: Consolas, Monaco, monospace;
}

.CodeMirror-activeline-background {
	background: rgba(114, 174, 230, 0.12);
}

@media (max-width: 720px) {
	.csuk-assistant-drawer {
		top: auto;
		bottom: 56px;
		width: calc(100vw - 42px);
		max-height: calc(100vh - 92px);
	}

	.csuk-assistant-drawer-tabs {
		top: auto;
		bottom: 84px;
	}
}

.csuk-quiet-tab {
	min-height: 30px;
	min-width: 28px;
	padding: 8px 6px;
	background: #475569;
	font-size: 0;
	display: grid;
	place-items: center;
}

.csuk-quiet-tab::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 0 10px rgba(34, 197, 94, 0.65);
}

.csuk-quiet-tab.is-quiet::before {
	background: #f59e0b;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 0 10px rgba(245, 158, 11, 0.68);
}

.csuk-quiet-tab.is-quiet {
	background: #0f766e;
}

.csuk-quiet-tab:hover,
.csuk-quiet-tab:focus {
	background: #334155;
}

.csuk-quiet-tab.is-quiet:hover,
.csuk-quiet-tab.is-quiet:focus {
	background: #0d9488;
}

.csuk-assistant-drawer-tab.has-unread {
	position: relative;
	box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.72), 0 0 18px rgba(250, 204, 21, 0.42), 0 8px 22px rgba(0, 0, 0, 0.24);
}

.csuk-assistant-drawer-tab.has-unread::after {
	content: "";
	position: absolute;
	top: 5px;
	left: 5px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #facc15;
	box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.9);
}