/* Website assistant (SyncDesk). Scoped under .sidc so it doesn't touch the theme. */
.sidc {
	--sidc-accent: #1f4e79;
	--sidc-bottom: 16px;
	--sidc-ink: #1b1f24;
	--sidc-muted: #5b6470;
	--sidc-bg: #ffffff;
	--sidc-soft: #f3f5f8;
	--sidc-line: #dde2e8;
	position: fixed;
	bottom: var(--sidc-bottom);
	right: 16px;
	z-index: 99990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--sidc-ink);
}
.sidc--left { right: auto; left: 16px; align-items: flex-start; }
.sidc *, .sidc *::before, .sidc *::after { box-sizing: border-box; }
.sidc button { font: inherit; cursor: pointer; }
.sidc a { color: var(--sidc-accent); text-decoration: underline; text-underline-offset: 2px; }

.sidc-launcher {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 18px 0 14px;
	border: 0;
	border-radius: 999px;
	background: var(--sidc-accent);
	color: #fff;
	font-weight: 600;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
	transition: transform .15s ease;
}
.sidc-launcher:hover { transform: translateY(-1px); }
.sidc-launcher:focus-visible, .sidc button:focus-visible, .sidc-input:focus-visible, .sidc a:focus-visible {
	outline: 3px solid var(--sidc-accent);
	outline-offset: 2px;
}
.sidc-launcher:focus-visible { outline-color: var(--sidc-ink); }
.sidc.is-open .sidc-launcher span { display: none; }
.sidc.is-open .sidc-launcher { padding: 0 13px; }

.sidc-panel {
	width: min(380px, calc(100vw - 32px));
	height: min(560px, calc(100vh - var(--sidc-bottom) - 90px));
	display: flex;
	flex-direction: column;
	background: var(--sidc-bg);
	border: 1px solid var(--sidc-line);
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
	overflow: hidden;
}
.sidc-panel[hidden] { display: none; }

.sidc-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 14px 12px 16px;
	background: var(--sidc-accent);
	color: #fff;
}
.sidc-head h2 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 700; color: #fff; }
.sidc-head p { margin: 2px 0 0; font-size: 12.5px; opacity: .9; color: #fff; }
.sidc-close {
	flex: none;
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, .15);
	color: #fff;
}
.sidc-close:hover { background: rgba(255, 255, 255, .25); }

.sidc-log {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--sidc-soft);
	overscroll-behavior: contain;
}
.sidc-msg {
	max-width: 85%;
	padding: 10px 13px;
	border-radius: 14px;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.sidc-msg--bot { align-self: flex-start; background: var(--sidc-bg); border: 1px solid var(--sidc-line); border-bottom-left-radius: 4px; }
.sidc-msg--me { align-self: flex-end; background: var(--sidc-accent); color: #fff; border-bottom-right-radius: 4px; }

.sidc-typing { display: inline-flex; gap: 4px; padding: 14px 14px; }
.sidc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--sidc-muted); animation: sidc-dot 1.2s infinite ease-in-out; }
.sidc-typing span:nth-child(2) { animation-delay: .15s; }
.sidc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sidc-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.sidc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; background: var(--sidc-soft); }
.sidc-chips:not(:empty) { padding-bottom: 12px; }
.sidc-chip {
	padding: 7px 12px;
	border: 1px solid var(--sidc-accent);
	border-radius: 999px;
	background: var(--sidc-bg);
	color: var(--sidc-accent);
	font-size: 13.5px;
	line-height: 1.3;
	text-align: left;
}
.sidc-chip:hover { background: var(--sidc-accent); color: #fff; }

.sidc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--sidc-line); background: var(--sidc-bg); }
.sidc-input {
	flex: 1;
	min-height: 42px;
	max-height: 120px;
	padding: 10px 12px;
	border: 1px solid var(--sidc-line);
	border-radius: 10px;
	resize: none;
	font: inherit;
	font-size: 16px; /* stops iPhone zooming in */
	color: var(--sidc-ink);
	background: var(--sidc-bg);
}
.sidc-send {
	flex: none;
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 10px;
	background: var(--sidc-accent);
	color: #fff;
}
.sidc-send:disabled { opacity: .5; cursor: default; }

.sidc-note { margin: 0; padding: 0 14px 10px; font-size: 11.5px; line-height: 1.4; color: var(--sidc-muted); background: var(--sidc-bg); }
.sidc-note a { color: var(--sidc-muted); }

@media (max-width: 480px) {
	.sidc.is-open { left: 8px; right: 8px; bottom: 8px; }
	.sidc.is-open .sidc-panel { width: 100%; height: calc(100vh - 80px); height: calc(100dvh - 80px); }
	.sidc-launcher span { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.sidc-launcher, .sidc-typing span { transition: none; animation: none; }
}
