/* LAskill ChatBot. Inherits the theme font so it matches the site. */
.lskcb {
	--lskcb-gold: var(--laskill-gold, var(--lsk-gold, #d99515));
	--lskcb-gold-deep: #b97a0c;
	--lskcb-ink: #232323;
	--lskcb-bg: #ffffff;
	--lskcb-surface: #faf6ee;
	--lskcb-text: #232323;
	--lskcb-muted: #6e665a;
	--lskcb-line: #ece3d1;
	--lskcb-user: #232323;
	--lskcb-user-text: #ffffff;
	--lskcb-shadow: 0 18px 50px rgba(35, 35, 35, .22), 0 2px 8px rgba(35, 35, 35, .08);
	position: fixed;
	z-index: 99990;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	right: 20px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--lskcb-text);
	-webkit-font-smoothing: antialiased;
}
.lskcb--left { right: auto; left: 20px; }
.lskcb *, .lskcb *::before, .lskcb *::after { box-sizing: border-box; }

/* Dark mode follows the LAskill theme toggle. */
html[data-theme="dark"] .lskcb, html.dark .lskcb, html.dark-mode .lskcb,
body.dark .lskcb, body.dark-mode .lskcb, body.laskill-dark .lskcb,
body[data-theme="dark"] .lskcb, .lskcb.lskcb--dark {
	--lskcb-bg: #000000;
	--lskcb-surface: #1c1c1c;
	--lskcb-text: #f4f1ea;
	--lskcb-muted: #b3ab9d;
	--lskcb-line: #2f2f2f;
	--lskcb-user: #d99515;
	--lskcb-user-text: #000000;
	--lskcb-shadow: 0 18px 50px rgba(0, 0, 0, .6);
}
@media (prefers-color-scheme: dark) {
	html:not([data-theme="light"]) .lskcb.lskcb--follow {
		--lskcb-bg: #000000; --lskcb-surface: #1c1c1c; --lskcb-text: #f4f1ea;
		--lskcb-muted: #b3ab9d; --lskcb-line: #2f2f2f; --lskcb-user: #d99515; --lskcb-user-text: #000000;
	}
}

/* Launcher */
.lskcb__launch {
	display: inline-flex; align-items: center; gap: 10px;
	height: 54px; padding: 0 22px 0 8px;
	border: 0; border-radius: 999px; cursor: pointer;
	background: var(--lskcb-gold); color: #232323;
	font: inherit; font-weight: 700; font-size: 15px; letter-spacing: .01em;
	box-shadow: 0 10px 28px rgba(217, 149, 21, .45);
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.lskcb__launch:hover { background: #e6a227; transform: translateY(-2px); box-shadow: 0 14px 32px rgba(217, 149, 21, .5); }
.lskcb__launch:focus-visible { outline: 3px solid var(--lskcb-ink); outline-offset: 3px; }
.lskcb__launch-icon {
	width: 40px; height: 40px; border-radius: 50%;
	background: #232323; color: var(--lskcb-gold);
	display: grid; place-items: center;
}
.lskcb__launch-icon svg { width: 20px; height: 20px; }
.lskcb__launch-icon.has-logo, .lskcb__avatar.has-logo { background: #000000; overflow: hidden; }
.lskcb__launch-icon img, .lskcb__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lskcb.is-open .lskcb__launch { display: none; }

/* Nudge bubble */
.lskcb__nudge {
	position: absolute; bottom: 66px; right: 0;
	width: max-content; max-width: 250px;
	background: var(--lskcb-bg); color: var(--lskcb-text);
	border: 1px solid var(--lskcb-line); border-radius: 16px 16px 4px 16px;
	padding: 12px 34px 12px 14px; font-size: 14px; font-weight: 600;
	box-shadow: var(--lskcb-shadow); cursor: pointer;
	animation: lskcb-pop .35s ease both;
}
.lskcb--left .lskcb__nudge { right: auto; left: 0; border-radius: 16px 16px 16px 4px; }
.lskcb__nudge-x {
	position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
	border: 0; background: transparent; color: var(--lskcb-muted); cursor: pointer; font-size: 16px; line-height: 1; border-radius: 50%;
}
.lskcb__nudge-x:hover { background: var(--lskcb-surface); }

/* Panel */
.lskcb__panel {
	position: absolute; bottom: 0; right: 0;
	width: 384px; height: min(640px, calc(100vh - 40px));
	display: none; flex-direction: column; overflow: hidden;
	background: var(--lskcb-bg);
	border: 1px solid var(--lskcb-line); border-radius: 22px;
	box-shadow: var(--lskcb-shadow);
	transform-origin: bottom right;
}
.lskcb--left .lskcb__panel { right: auto; left: 0; transform-origin: bottom left; }
.lskcb.is-open .lskcb__panel { display: flex; animation: lskcb-open .28s cubic-bezier(.2, .9, .3, 1.2) both; }

.lskcb__head {
	position: relative; display: flex; align-items: center; gap: 12px;
	padding: 16px 14px 16px 18px; background: #232323; color: #ffffff;
}
.lskcb__head::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
	background: linear-gradient(90deg, var(--lskcb-gold) 0%, var(--lskcb-gold) 38%, transparent 38%, transparent 42%, var(--lskcb-gold) 42%, var(--lskcb-gold) 64%, transparent 64%, transparent 68%, var(--lskcb-gold) 68%);
}
.lskcb__avatar {
	width: 40px; height: 40px; flex: none; border-radius: 12px;
	background: var(--lskcb-gold); color: #232323;
	display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.lskcb__who { flex: 1; min-width: 0; }
.lskcb__name { font-weight: 700; font-size: 15px; line-height: 1.25; margin: 0; color: #fff; }
.lskcb__status { font-size: 12px; color: #d8d2c6; display: flex; align-items: center; gap: 6px; }
.lskcb__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3ccf6e; }
.lskcb__icon-btn {
	width: 36px; height: 36px; border: 0; border-radius: 10px; cursor: pointer;
	background: transparent; color: #ffffff; display: grid; place-items: center;
}
.lskcb__icon-btn:hover { background: rgba(255, 255, 255, .1); }
.lskcb__icon-btn:focus-visible { outline: 2px solid var(--lskcb-gold); outline-offset: 1px; }
.lskcb__icon-btn svg { width: 18px; height: 18px; }

.lskcb__log {
	flex: 1; overflow-y: auto; padding: 18px 16px 8px;
	background: var(--lskcb-bg); scroll-behavior: smooth;
	overscroll-behavior: contain;
}
.lskcb__row { display: flex; margin: 0 0 12px; }
.lskcb__row--user { justify-content: flex-end; }
.lskcb__bubble {
	max-width: 86%; padding: 11px 14px; border-radius: 18px 18px 18px 6px;
	background: var(--lskcb-surface); color: var(--lskcb-text);
	border: 1px solid var(--lskcb-line);
	word-wrap: break-word; overflow-wrap: anywhere;
}
.lskcb__row--user .lskcb__bubble {
	background: var(--lskcb-user); color: var(--lskcb-user-text);
	border-color: transparent; border-radius: 18px 18px 6px 18px;
}
.lskcb__bubble p { margin: 0 0 8px; }
.lskcb__bubble p:last-child { margin-bottom: 0; }
.lskcb__bubble a { color: inherit; text-decoration: underline; text-decoration-color: var(--lskcb-gold); text-underline-offset: 2px; }
.lskcb__bubble strong { font-weight: 700; }
.lskcb__steps { margin: 6px 0 8px; padding-left: 20px; }
.lskcb__steps li { margin: 2px 0; }

.lskcb__sources { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--lskcb-line); font-size: 13px; }
.lskcb__sources-label { color: var(--lskcb-muted); font-size: 12px; margin-bottom: 4px; }
.lskcb__sources a { display: block; padding: 2px 0; text-decoration: none; font-weight: 600; color: var(--lskcb-text); }
.lskcb__sources a::before { content: "↗ "; color: var(--lskcb-gold); }
.lskcb__sources a:hover { color: var(--lskcb-gold); }

.lskcb__buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; }
.lskcb__btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 38px; padding: 8px 16px; border-radius: 999px;
	background: var(--lskcb-gold); color: #232323 !important;
	font-weight: 700; font-size: 14px; text-decoration: none !important;
	border: 0; cursor: pointer; font-family: inherit;
	transition: background .2s ease, transform .2s ease;
}
.lskcb__btn:hover { background: #e6a227; transform: translateY(-1px); }
.lskcb__btn--ghost { background: transparent; color: var(--lskcb-text) !important; box-shadow: inset 0 0 0 1.5px var(--lskcb-line); }
.lskcb__btn--ghost:hover { background: var(--lskcb-surface); box-shadow: inset 0 0 0 1.5px var(--lskcb-gold); }
.lskcb__btn:focus-visible, .lskcb__chip:focus-visible { outline: 2px solid var(--lskcb-ink); outline-offset: 2px; }

.lskcb__cards { display: grid; gap: 8px; margin: 0 0 12px; }
.lskcb__card {
	display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center;
	padding: 10px; border-radius: 16px; border: 1px solid var(--lskcb-line);
	background: var(--lskcb-bg); color: var(--lskcb-text) !important; text-decoration: none !important;
	transition: border-color .2s ease, transform .2s ease;
}
.lskcb__card:hover { border-color: var(--lskcb-gold); transform: translateY(-1px); }
.lskcb__card--noimg { grid-template-columns: 1fr; }
.lskcb__card-img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--lskcb-surface); }
.lskcb__card-title { font-weight: 700; font-size: 14px; line-height: 1.3; margin: 0 0 2px; }
.lskcb__card-text { font-size: 12.5px; color: var(--lskcb-muted); margin: 0 0 4px; line-height: 1.35; }
.lskcb__card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.lskcb__card-price { font-weight: 800; color: var(--lskcb-gold); }
.lskcb__card-cta { font-weight: 700; }

.lskcb__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.lskcb__chip {
	border: 1.5px solid var(--lskcb-gold); background: transparent; color: var(--lskcb-text);
	border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
.lskcb__chip:hover { background: var(--lskcb-gold); color: #232323; }

/* Typing */
.lskcb__typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.lskcb__typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--lskcb-gold); animation: lskcb-dot 1.1s infinite ease-in-out; }
.lskcb__typing span:nth-child(2) { animation-delay: .15s; }
.lskcb__typing span:nth-child(3) { animation-delay: .3s; }

/* Lead form */
.lskcb__form { display: grid; gap: 8px; margin-top: 10px; }
.lskcb__form-title { font-weight: 700; margin: 0; }
.lskcb__form input, .lskcb__form select, .lskcb__form textarea {
	width: 100%; font: inherit; font-size: 14px; color: var(--lskcb-text);
	background: var(--lskcb-bg); border: 1.5px solid var(--lskcb-line); border-radius: 12px; padding: 10px 12px;
}
.lskcb__form textarea { min-height: 70px; resize: vertical; }
.lskcb__form input:focus, .lskcb__form select:focus, .lskcb__form textarea:focus { outline: none; border-color: var(--lskcb-gold); }
.lskcb__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.lskcb__form-error { color: #c0392b; font-size: 13px; margin: 0; }

/* Composer */
.lskcb__composer { padding: 10px 12px 8px; border-top: 1px solid var(--lskcb-line); background: var(--lskcb-bg); }
.lskcb__inputwrap {
	display: flex; align-items: flex-end; gap: 8px;
	background: var(--lskcb-surface); border: 1.5px solid var(--lskcb-line); border-radius: 26px; padding: 5px 5px 5px 16px;
	transition: border-color .2s ease;
}
.lskcb__inputwrap:focus-within { border-color: var(--lskcb-gold); }
.lskcb__input {
	flex: 1; border: 0; background: transparent; color: var(--lskcb-text);
	font: inherit; font-size: 15px; resize: none; max-height: 110px; min-height: 24px; padding: 8px 0; line-height: 1.4;
}
.lskcb__input:focus { outline: none; }
.lskcb__input::placeholder { color: var(--lskcb-muted); }
.lskcb__send {
	width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
	background: var(--lskcb-gold); color: #232323; display: grid; place-items: center;
	transition: background .2s ease, opacity .2s ease;
}
.lskcb__send:disabled { opacity: .45; cursor: default; }
.lskcb__send:not(:disabled):hover { background: #e6a227; }
.lskcb__send svg { width: 18px; height: 18px; }
.lskcb__note { margin: 6px 4px 0; font-size: 11.5px; color: var(--lskcb-muted); text-align: center; }

.lskcb__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@keyframes lskcb-sheet { from { transform: translateY(100%); } to { transform: none; } }
.lskcb__backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .28); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.lskcb.is-open .lskcb__backdrop { opacity: 1; pointer-events: auto; }
@media (min-width: 521px) { .lskcb__backdrop { display: none !important; } }
@keyframes lskcb-open { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes lskcb-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes lskcb-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }

@media (max-width: 520px) {
	.lskcb { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
	.lskcb--left { left: 14px; }
	/* Bottom sheet: about three quarters of the screen, page stays visible above. */
	.lskcb.is-open .lskcb__panel {
		position: fixed; left: 12px; right: 12px; top: auto;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		width: auto; height: 75vh; height: 75dvh; max-height: calc(100vh - 56px);
		border-radius: 22px; border: 1px solid var(--lskcb-line);
		box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
		animation-name: lskcb-sheet;
	}
	.lskcb__head { padding-top: 20px; border-radius: 22px 22px 0 0; }
	.lskcb__head::before {
		content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
		width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .35);
	}
	.lskcb__backdrop { display: block; }
	.lskcb__input { font-size: 16px; } /* stops iOS zoom */
	.lskcb__launch { height: 50px; padding-right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.lskcb *, .lskcb *::before, .lskcb *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print { .lskcb { display: none !important; } }
