/* Silque AI Assistant — chat widget (theme-proof) */
.sq-chat {
	--sq-primary: #6C8065;
	--sq-dark: #222223;
	--sq-muted: #7A7D78;
	--sq-soft: #F3F5F1;
	--sq-line: #E6E9E3;
	position: fixed !important; bottom: 24px; right: 24px; z-index: 999999;
	font-family: "Figtree", -apple-system, "Segoe UI", Roboto, sans-serif !important;
	font-size: 15px; line-height: 1.5; color: var(--sq-dark);
	-webkit-font-smoothing: antialiased;
}
.sq-chat.sq-left { right: auto; left: 24px; }
.sq-chat *, .sq-chat *::before, .sq-chat *::after { box-sizing: border-box; font-family: inherit; }

/* Hard reset of theme button / input / link styles */
.sq-chat button,
.sq-chat button:hover,
.sq-chat button:focus,
.sq-chat button:active {
	margin: 0 !important; padding: 0; border: 0 !important; outline: none !important;
	box-shadow: none; text-transform: none !important; letter-spacing: normal !important;
	font-family: inherit !important; line-height: 1 !important; min-height: 0 !important;
	text-decoration: none !important; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.sq-chat button:focus-visible { box-shadow: 0 0 0 3px rgba(108,128,101,.35) !important; }
.sq-chat a, .sq-chat a:hover, .sq-chat a:visited { color: inherit !important; box-shadow: none !important; }

/* ---------- Launcher ---------- */
.sq-chat .sq-launch {
	display: flex !important; align-items: center; justify-content: center; gap: 10px;
	height: 56px !important; padding: 0 22px 0 18px !important; border-radius: 999px !important;
	background: var(--sq-primary) !important; color: #fff !important;
	font-size: 15px !important; font-weight: 600 !important;
	box-shadow: 0 10px 28px rgba(34,34,35,.20) !important;
	transition: transform .2s ease, box-shadow .2s ease, width .2s ease;
}
.sq-chat .sq-launch:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(34,34,35,.24) !important; }
.sq-chat .sq-launch svg { width: 22px; height: 22px; flex: none; }
.sq-chat.sq-open .sq-launch { width: 56px !important; padding: 0 !important; }
.sq-chat.sq-open .sq-launch-label { display: none; }

/* ---------- Panel ---------- */
.sq-chat .sq-panel {
	position: absolute; bottom: 72px; right: 0;
	width: 380px; height: 580px; max-height: calc(100vh - 120px);
	display: flex; flex-direction: column; overflow: hidden;
	background: #fff; border-radius: 20px; border: 1px solid var(--sq-line);
	box-shadow: 0 24px 60px rgba(34,34,35,.16), 0 2px 8px rgba(34,34,35,.05);
	opacity: 0; visibility: hidden; transform: translateY(12px);
	transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.sq-chat.sq-left .sq-panel { right: auto; left: 0; }
.sq-chat.sq-open .sq-panel { opacity: 1; visibility: visible; transform: none; }

/* Header */
.sq-chat .sq-head {
	display: flex; align-items: center; gap: 12px;
	padding: 16px 14px 16px 18px; background: var(--sq-primary); color: #fff;
}
.sq-chat .sq-avatar {
	width: 42px; height: 42px; border-radius: 50%; flex: none;
	background: #fff center/80% no-repeat; box-shadow: 0 0 0 2px rgba(255,255,255,.35);
}
.sq-chat .sq-head-text { flex: 1; min-width: 0; }
.sq-chat .sq-head-name { font-weight: 600; font-size: 16px; line-height: 1.2; color: #fff; }
.sq-chat .sq-head-status { margin-top: 3px; font-size: 12.5px; color: rgba(255,255,255,.85); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.sq-chat .sq-head-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #CFE8C6; flex: none; }
.sq-chat .sq-close {
	width: 34px !important; height: 34px !important; border-radius: 50% !important; flex: none;
	display: grid !important; place-items: center;
	background: rgba(255,255,255,.14) !important; color: #fff !important;
	transition: background .15s;
}
.sq-chat .sq-close:hover { background: rgba(255,255,255,.26) !important; }
.sq-chat .sq-close svg { width: 16px; height: 16px; }

/* Messages */
.sq-chat .sq-body {
	flex: 1; overflow-y: auto; padding: 20px 16px 10px;
	display: flex; flex-direction: column; gap: 10px; background: #FCFCFB;
	scrollbar-width: thin; scrollbar-color: #D5DAD2 transparent;
}
.sq-chat .sq-body::-webkit-scrollbar { width: 6px; }
.sq-chat .sq-body::-webkit-scrollbar-thumb { background: #D5DAD2; border-radius: 6px; }
.sq-chat .sq-msg {
	max-width: 82%; padding: 11px 15px; border-radius: 18px; font-size: 14.5px; line-height: 1.55;
	white-space: pre-wrap; overflow-wrap: break-word; animation: sq-in .25s ease;
}
.sq-chat .sq-bot { align-self: flex-start; background: var(--sq-soft); color: var(--sq-dark); border-bottom-left-radius: 6px; }
.sq-chat .sq-user { align-self: flex-end; background: var(--sq-primary); color: #fff; border-bottom-right-radius: 6px; }
.sq-chat .sq-msg a { font-weight: 600; text-decoration: underline !important; text-decoration-thickness: 1px !important; text-underline-offset: 3px; overflow-wrap: anywhere; }
.sq-chat .sq-msg a.sq-tel { white-space: nowrap; overflow-wrap: normal; }
.sq-chat .sq-bot a { color: var(--sq-primary) !important; }
.sq-chat .sq-msg strong { font-weight: 600; }

.sq-chat .sq-typing { display: inline-flex; gap: 4px; padding: 15px 16px; }
.sq-chat .sq-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--sq-primary); opacity: .35; animation: sq-dot 1.2s infinite; }
.sq-chat .sq-typing span:nth-child(2) { animation-delay: .15s; }
.sq-chat .sq-typing span:nth-child(3) { animation-delay: .3s; }

/* Quick replies */
.sq-chat .sq-chips {
	display: flex; gap: 6px; overflow-x: auto; margin: 0 -14px 10px; padding: 0 14px 2px;
	scrollbar-width: none; -webkit-overflow-scrolling: touch;
	mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
}
.sq-chat .sq-chips::-webkit-scrollbar { display: none; }
.sq-chat .sq-chip {
	flex: none; white-space: nowrap;
	padding: 7px 13px !important; border-radius: 999px !important;
	border: 1px solid var(--sq-primary) !important; background: #fff !important; color: var(--sq-primary) !important;
	font-size: 13px !important; font-weight: 500 !important; line-height: 1.2 !important;
	transition: background .15s, color .15s;
}
.sq-chat .sq-chip:hover { background: var(--sq-primary) !important; color: #fff !important; }

/* Footer / input */
.sq-chat .sq-foot { border-top: 1px solid var(--sq-line); background: #fff; padding: 12px 14px 10px; }
.sq-chat .sq-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.sq-chat textarea.sq-input,
.sq-chat textarea.sq-input:focus {
	flex: 1; resize: none; height: 44px; min-height: 44px; max-height: 110px; margin: 0; overflow-y: hidden; scrollbar-width: none;
	border: 1px solid var(--sq-line) !important; border-radius: 22px !important;
	padding: 11px 16px !important; background: var(--sq-soft) !important; color: var(--sq-dark) !important;
	font-size: 15px !important; line-height: 1.4 !important; outline: none !important; box-shadow: none !important;
	transition: border-color .15s, background .15s;
}
.sq-chat textarea.sq-input:focus { border-color: var(--sq-primary) !important; background: #fff !important; }
.sq-chat textarea.sq-input::placeholder { color: var(--sq-muted); opacity: 1; }
.sq-chat .sq-send {
	width: 44px !important; height: 44px !important; flex: none; border-radius: 50% !important;
	display: grid !important; place-items: center;
	background: var(--sq-primary) !important; color: #fff !important; transition: opacity .15s, transform .15s;
}
.sq-chat .sq-send:hover:not(:disabled) { transform: scale(1.05); }
.sq-chat .sq-send:disabled { opacity: .4; cursor: default; }
.sq-chat .sq-send svg { width: 18px; height: 18px; }
.sq-chat .sq-book {
	display: block; text-align: center; margin-top: 8px; font-size: 12.5px;
	color: var(--sq-muted) !important; text-decoration: none !important;
}
.sq-chat .sq-book b { color: var(--sq-primary); font-weight: 600; }
.sq-chat .sq-book:hover b { text-decoration: underline; }

/* End chat */
.sq-chat .sq-end {
	height: 30px !important; padding: 0 12px !important; border-radius: 999px !important; flex: none;
	background: rgba(255,255,255,.14) !important; color: #fff !important;
	font-size: 12.5px !important; font-weight: 600 !important; transition: background .15s;
}
.sq-chat .sq-end:hover { background: rgba(255,255,255,.26) !important; }
.sq-chat [hidden] { display: none !important; }

/* Rating screen */
.sq-chat.sq-rating .sq-body, .sq-chat.sq-rating .sq-foot, .sq-chat.sq-rating .sq-end { display: none !important; }
.sq-chat .sq-rate {
	flex: 1; min-height: 0; overflow-y: auto; background: #fff;
	display: flex; align-items: center; justify-content: center; padding: 28px 26px;
	animation: sq-in .2s ease;
}
.sq-chat .sq-rate-step { width: 100%; max-width: 300px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.sq-chat .sq-rate-title { font-size: 20px; font-weight: 600; color: var(--sq-dark); }
.sq-chat .sq-rate-sub { margin-top: 4px; font-size: 14px; color: var(--sq-muted); }
.sq-chat .sq-stars { display: flex; gap: 6px; margin: 22px 0 18px; }
.sq-chat .sq-star {
	width: 40px !important; height: 40px !important; padding: 4px !important; border-radius: 10px !important;
	background: transparent !important; color: #D9DDD6 !important; transition: transform .12s, color .12s;
}
.sq-chat .sq-star svg { width: 100%; height: 100%; fill: currentColor; }
.sq-chat .sq-star.on, .sq-chat .sq-star.hover { color: var(--sq-primary) !important; }
.sq-chat .sq-star:hover { transform: scale(1.1); }
.sq-chat textarea.sq-fb, .sq-chat textarea.sq-fb:focus {
	width: 100%; resize: none; margin: 0 0 16px; padding: 12px 14px !important;
	border: 1px solid var(--sq-line) !important; border-radius: 12px !important;
	background: var(--sq-soft) !important; color: var(--sq-dark) !important;
	font-size: 14px !important; line-height: 1.45 !important; outline: none !important; box-shadow: none !important;
}
.sq-chat textarea.sq-fb:focus { border-color: var(--sq-primary) !important; background: #fff !important; }
.sq-chat .sq-btn {
	width: 100%; height: 46px !important; border-radius: 999px !important;
	background: var(--sq-primary) !important; color: #fff !important;
	font-size: 15px !important; font-weight: 600 !important; transition: opacity .15s;
}
.sq-chat .sq-btn:disabled { opacity: .4; cursor: default; }
.sq-chat .sq-link {
	margin-top: 12px !important; padding: 4px 8px !important; background: transparent !important;
	color: var(--sq-muted) !important; font-size: 13.5px !important; font-weight: 500 !important;
}
.sq-chat .sq-link:hover { color: var(--sq-dark) !important; }
.sq-chat .sq-back { margin-top: 4px !important; }
.sq-chat .sq-done-ico { font-size: 36px; line-height: 1; margin-bottom: 12px; }
.sq-chat .sq-rate-done .sq-btn { margin-top: 22px !important; }

@keyframes sq-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sq-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 480px) {
	.sq-chat { bottom: 16px; right: 16px; }
	.sq-chat.sq-left { left: 16px; }
	.sq-chat .sq-panel { position: fixed; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
	.sq-chat.sq-open .sq-launch { display: none !important; }
	.sq-chat textarea.sq-input { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
	.sq-chat .sq-panel, .sq-chat .sq-msg, .sq-chat .sq-launch, .sq-chat .sq-typing span { transition: none; animation: none; }
}
