/* SEOUL – Trợ lý tra cứu. Mọi quy tắc nằm trong .stl để không ảnh hưởng theme. */
.stl {
	--stl-chili: #c8161d;
	--stl-broth: #6b0f14;
	--stl-gold: #f5b82e;
	--stl-paper: #fff8ee;
	--stl-ink: #2b1b17;
	--stl-muted: #7a625a;
	--stl-line: #ecdcc6;
	--stl-bottom: 24px;
	--stl-font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--stl-fs: 15px;

	position: fixed;
	bottom: var(--stl-bottom);
	z-index: 99990;
	font-family: var(--stl-font);
	font-size: var(--stl-fs);
	line-height: 1.5;
	color: var(--stl-ink);
	text-align: left;
}
.stl--left { left: 20px; }
.stl--right { right: 20px; }
.stl *, .stl *::before, .stl *::after { box-sizing: border-box; }
.stl [hidden] { display: none !important; }
.stl h2, .stl p, .stl ul, .stl li {
	margin: 0;
	padding: 0;
	font-family: inherit;
	color: inherit;
	text-transform: none;
	letter-spacing: normal;
	background: none;
	border: 0;
}
.stl .stl-sr {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.stl .stl-ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.stl button {
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	margin: 0;
	-webkit-tap-highlight-color: transparent;
}
.stl button:focus-visible,
.stl a:focus-visible,
.stl input:focus-visible {
	outline: 3px solid var(--stl-gold);
	outline-offset: 2px;
}

/* ---------- Launcher ---------- */
.stl .stl-launcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 54px;
	padding: 0 22px 0 18px;
	border: 0;
	border-radius: 999px;
	background: var(--stl-chili);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 0 0 3px var(--stl-gold), 0 8px 24px rgba(60, 8, 10, .35);
	transition: background-color .15s, transform .15s;
}
.stl .stl-launcher:hover { background: var(--stl-broth); transform: translateY(-1px); }
.stl .stl-launcher .stl-ico { color: var(--stl-gold); }

/* ---------- Bong bóng chat ---------- */
.stl .stl-bubble {
	position: relative;
	justify-content: center;
	width: var(--stl-bsize, 60px);
	height: var(--stl-bsize, 60px);
	padding: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 3px var(--stl-gold), 0 10px 26px rgba(60, 8, 10, .38);
	transition: transform .18s, background-color .15s;
}
.stl .stl-bubble:hover { transform: scale(1.07); background: var(--stl-chili); }
.stl .stl-bubble__ico { width: 52%; height: 52%; color: #fff; stroke-width: 0; fill: currentColor; }
.stl .stl-bubble__ico circle { fill: var(--stl-chili); }
.stl .stl-bubble__img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
.stl .stl-bubble__dot { position: absolute; right: 1px; bottom: 1px; width: 15px; height: 15px; border-radius: 50%; background: #22c55e; border: 2.5px solid #fff; }
.stl .stl-bubble__badge { position: absolute; top: -5px; right: -5px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px; background: #ff3b30; color: #fff; border: 2px solid #fff; font-size: 12px; font-weight: 800; line-height: 17px; text-align: center; }
.stl .stl-bubble::before { content: ""; position: absolute; inset: 0; border-radius: 50%; animation: stl-pulse 2.6s ease-out infinite; pointer-events: none; }
.stl .stl-bubble.is-seen::before { animation: none; }
@keyframes stl-pulse { 0% { box-shadow: 0 0 0 0 rgba(200, 22, 29, .45); } 70%, 100% { box-shadow: 0 0 0 16px rgba(200, 22, 29, 0); } }

.stl .stl-teaser {
	position: absolute;
	bottom: calc(var(--stl-bsize, 60px) + 16px);
	width: max-content;
	max-width: min(270px, calc(100vw - 40px));
	padding: 12px 34px 12px 14px;
	border-radius: 16px;
	background: #fff;
	color: var(--stl-ink);
	font-size: 14px;
	line-height: 1.45;
	box-shadow: 0 10px 30px rgba(40, 6, 8, .22);
	cursor: pointer;
	animation: stl-pop .35s cubic-bezier(.2, 1.4, .4, 1);
}
.stl--left .stl-teaser { left: 0; border-bottom-left-radius: 4px; }
.stl--right .stl-teaser { right: 0; border-bottom-right-radius: 4px; }
.stl .stl-teaser::after { content: ""; position: absolute; bottom: -7px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); }
.stl--left .stl-teaser::after { left: calc(var(--stl-bsize, 60px) / 2 - 7px); }
.stl--right .stl-teaser::after { right: calc(var(--stl-bsize, 60px) / 2 - 7px); }
.stl .stl-teaser__x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--stl-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.stl .stl-teaser__x:hover { background: var(--stl-paper); color: var(--stl-ink); }
@keyframes stl-pop { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
.stl.is-open .stl-teaser { display: none; }
/* Bong bóng đã được kéo đi chỗ khác */
.stl.is-free { bottom: auto; right: auto; }
.stl.is-dragging .stl-bubble { cursor: grabbing; transform: scale(1.12); box-shadow: 0 0 0 3px var(--stl-gold), 0 16px 34px rgba(60, 8, 10, .45); }
.stl.is-dragging .stl-bubble::before { animation: none; }
.stl.is-snapping { transition: left .28s cubic-bezier(.3, 1.3, .5, 1), top .28s; }
.stl.stl--tbelow .stl-teaser { bottom: auto; top: calc(var(--stl-bsize, 60px) + 16px); }
.stl.stl--tbelow .stl-teaser::after { bottom: auto; top: -7px; }
.stl.stl--tbelow.stl--left .stl-teaser { border-bottom-left-radius: 16px; border-top-left-radius: 4px; }
.stl.stl--tbelow.stl--right .stl-teaser { border-bottom-right-radius: 16px; border-top-right-radius: 4px; }

/* ---------- Panel ---------- */
.stl .stl-panel {
	display: flex;
	flex-direction: column;
	width: min(380px, calc(100vw - 40px));
	height: min(600px, calc(100vh - var(--stl-bottom) - 40px));
	background: var(--stl-paper);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 18px 50px rgba(40, 6, 8, .35);
}

.stl .stl-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 14px 14px 20px;
	background: var(--stl-broth);
	color: #fff;
}
.stl .stl-head__title { font-size: 18px; font-weight: 800; line-height: 1.2; color: #fff; }
.stl .stl-head__sub { font-size: 13px; color: var(--stl-gold); }

.stl .stl-iconbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}
.stl .stl-close { color: #fff; }
.stl .stl-close:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Messages ---------- */
.stl .stl-log {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 18px 16px 8px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.stl .stl-msg {
	max-width: 88%;
	padding: 10px 14px;
	border-radius: 16px;
	font-size: 15px;
	overflow-wrap: anywhere;
}
.stl .stl-msg p + p, .stl .stl-msg p + ul, .stl .stl-msg ul + p { margin-top: 6px; }
.stl .stl-msg ul { list-style: none; }
.stl .stl-msg li { position: relative; padding-left: 14px; margin-top: 4px; }
.stl .stl-msg li::before { content: ""; position: absolute; left: 2px; top: .65em; width: 5px; height: 5px; border-radius: 50%; background: var(--stl-chili); }
.stl .stl-msg a { color: var(--stl-chili); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.stl .stl-msg a:hover { color: var(--stl-broth); }
.stl .stl-msg strong { font-weight: 700; }

.stl .stl-msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--stl-line); border-bottom-left-radius: 4px; }
.stl .stl-msg--user { align-self: flex-end; background: var(--stl-chili); color: #fff; border-bottom-right-radius: 4px; }
.stl .stl-msg--error { background: #fdf0e0; border-color: #f2d2a4; color: var(--stl-broth); }

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

.stl .stl-msg--ai { border-color: color-mix(in srgb, var(--stl-chili) 22%, var(--stl-line)); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.stl .stl-msg--ai.is-typing > :last-child::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--stl-chili); animation: stl-caret .8s steps(2) infinite; }
@keyframes stl-caret { 50% { opacity: 0; } }
.stl .stl-hold { display: none !important; }
.stl .stl-fb { display: flex; align-items: center; gap: 4px; margin: -4px 0 2px 4px; font-size: 12px; color: var(--stl-muted); }
.stl .stl-fb__b { width: 30px; height: 28px; padding: 0; border: 1px solid var(--stl-line); border-radius: 8px; background: #fff; font-size: 14px; line-height: 1; cursor: pointer; filter: grayscale(.4); }
.stl .stl-fb__b:hover { filter: none; border-color: var(--stl-chili); }
.stl .stl-note { margin: 0; padding: 0 12px 8px; background: #fff; font-size: 11px; line-height: 1.35; color: var(--stl-muted); text-align: center; }

/* ---------- Quick replies ---------- */
.stl .stl-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 12px; }
.stl .stl-chip {
	padding: 8px 14px;
	border: 1.5px solid var(--stl-chili);
	border-radius: 999px;
	background: #fff;
	color: var(--stl-chili);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}
.stl .stl-chip:hover { background: var(--stl-chili); color: #fff; }

/* ---------- Input ---------- */
.stl .stl-form {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	margin: 0;
	padding: 10px 10px 10px 8px;
	border-top: 1px solid var(--stl-line);
	background: #fff;
}
.stl .stl-loc { color: var(--stl-muted); }
.stl .stl-loc:hover { color: var(--stl-chili); background: var(--stl-paper); }
.stl .stl-loc.is-on { color: var(--stl-chili); }
.stl .stl-loc.is-busy { opacity: .5; cursor: progress; }
.stl .stl-input {
	flex: 1;
	height: 44px;
	margin: 0;
	padding: 10px 12px;
	border: 1.5px solid var(--stl-line);
	border-radius: 14px;
	background: #fff;
	color: var(--stl-ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	box-shadow: none;
}
.stl .stl-input:focus { border-color: var(--stl-chili); outline: none; }
.stl .stl-send { background: var(--stl-chili); color: #fff; }
.stl .stl-send:hover { background: var(--stl-broth); }
.stl .stl-send:disabled { opacity: .5; cursor: progress; }
.stl .stl-send .stl-ico { width: 20px; height: 20px; }

.stl .stl-unused { padding: 6px 16px 10px; background: #fff; color: var(--stl-muted); font-size: 12px; line-height: 1.4; }


/* ---------- Tin nhắn phụ ---------- */
.stl .stl-msg--small { font-size: 13px; color: var(--stl-muted); background: transparent; border: 0; padding: 0 4px; }
.stl .stl-msg--small a { color: var(--stl-chili); }

/* ---------- Thẻ quán, thẻ việc làm ---------- */
.stl .stl-cards { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.stl .stl-card {
	padding: 12px 14px;
	background: #fff;
	border: 1px solid var(--stl-line);
	border-left: 3px solid var(--stl-chili);
	border-radius: 12px;
}
.stl .stl-card--job { border-left-color: var(--stl-gold); }
.stl .stl-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stl .stl-card__name { font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--stl-ink); }
.stl .stl-card__dist { flex: none; font-size: 14px; font-weight: 800; color: var(--stl-broth); font-variant-numeric: tabular-nums; }
.stl .stl-card__addr { margin-top: 3px; font-size: 14px; color: var(--stl-ink); opacity: .85; }
.stl .stl-card__roles { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--stl-ink); }
.stl .stl-card__pay { margin-top: 2px; font-size: 14px; color: var(--stl-broth); }
.stl .stl-card__meta { margin-top: 2px; font-size: 12px; color: var(--stl-muted); }
.stl .stl-card__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stl .stl-btn {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1.5px solid transparent;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}
.stl .stl-btn--primary { background: var(--stl-chili); color: #fff; }
.stl .stl-btn--primary:hover { background: var(--stl-broth); color: #fff; }
.stl .stl-btn--ghost { background: #fff; color: var(--stl-broth); border-color: var(--stl-line); }
.stl .stl-btn--ghost:hover { border-color: var(--stl-broth); color: var(--stl-broth); }

.stl .stl-badge { display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.stl .stl-badge--soon { background: var(--stl-gold); color: var(--stl-broth); }
.stl .stl-badge--new { color: var(--stl-chili); box-shadow: inset 0 0 0 1.5px var(--stl-chili); }

.stl .stl-card--promo { border-left-color: var(--stl-gold); background: #fffaf0; }
.stl .stl-card__offer { margin-top: 4px; font-size: 14px; color: var(--stl-ink); }
.stl .stl-promo { margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: #fff4d6; border: 1px dashed #e7b64a; font-size: 13px; line-height: 1.4; }
.stl .stl-promo__tag { display: block; color: var(--stl-chili); font-weight: 800; }
.stl .stl-promo__text { display: block; color: var(--stl-ink); }

.stl .stl-chips { padding: 0; }
.stl a.stl-chip { text-decoration: none; display: inline-flex; align-items: center; }
.stl .stl-chip { display: inline-flex; align-items: center; gap: 6px; }
.stl .stl-chip--loc { background: var(--stl-chili); color: #fff; }
.stl .stl-chip--loc:hover { background: var(--stl-broth); }
.stl .stl-ico--sm { width: 16px; height: 16px; }

/* ---------- Thẻ gọn ---------- */
.stl .stl-cards { gap: 6px; }
.stl .stl-card { padding: 9px 11px; border-radius: 10px; }
.stl .stl-card__name { font-size: 14px; }
.stl .stl-card__dist { font-size: 13px; }
.stl .stl-card__addr,
.stl .stl-card__offer,
.stl .stl-card__roles,
.stl .stl-card__pay { font-size: 13px; margin-top: 2px; }
.stl .stl-card__addr { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stl .stl-card__meta { font-size: 11.5px; }
.stl .stl-card__no { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--stl-line); color: var(--stl-muted); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.stl .stl-badge { margin-top: 3px; font-size: 11.5px; padding: 1px 8px; }
.stl .stl-card__acts { gap: 5px; margin-top: 7px; }
.stl .stl-btn { min-height: 30px; padding: 4px 11px; font-size: 12.5px; }
.stl .stl-promo { margin-top: 5px; padding: 5px 9px; font-size: 12.5px; }
.stl .stl-more {
	align-self: flex-start;
	padding: 6px 14px;
	border: 1.5px solid var(--stl-line);
	border-radius: 999px;
	background: #fff;
	color: var(--stl-broth);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}
.stl .stl-more:hover { border-color: var(--stl-broth); }

.stl .stl-links { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.stl .stl-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}
.stl .stl-link--msg { background: #0866ff; color: #fff; }
.stl .stl-link--msg:hover { background: #0653c9; color: #fff; }
.stl .stl-link--phone { background: #fff; color: var(--stl-broth); border: 1.5px solid var(--stl-line); }
.stl .stl-link--phone:hover { border-color: var(--stl-broth); }
.stl .stl-fix { align-self: flex-start; margin: 0 4px -4px; font-size: 12px; font-style: italic; color: var(--stl-muted); }

/* ---------- Mobile: khung chat toàn màn hình ---------- */
@media (max-width: 599px) {
	.stl .stl-launcher:not(.stl-bubble) { height: 50px; padding: 0 18px 0 14px; font-size: 15px; }
	.stl.is-open { inset: 0; }
	.stl.is-open .stl-panel {
		width: 100%;
		height: 100%;
		height: 100dvh;
		border-radius: 0;
	}
	.stl .stl-head { padding-top: max(14px, env(safe-area-inset-top)); }
	.stl .stl-unused { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
	.stl .stl-input { font-size: 16px; } /* tránh iOS tự phóng to */
}

@media (prefers-reduced-motion: reduce) {
	.stl * { transition: none !important; animation: none !important; }
}
