/* =====================================================================
   SUPREME LENDING — Chatbot styles
   All classes prefixed `slchat-` so they don't collide with theme styles.
   ===================================================================== */

/* FAB + tooltip + notification badge */
.slchat-fab {
	position: fixed; right: 24px; bottom: 24px; z-index: 99998;
	width: 64px; height: 64px;
	background: linear-gradient(135deg, #ff4040 0%, #d63232 100%);
	color: #ffffff;
	border: 0; border-radius: 0;
	font-family: 'Work Sans', Arial, sans-serif;
	font-size: 28px; font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 28px rgba(255,64,64,.35), 0 4px 12px rgba(0,26,64,.25);
	transition: transform .2s ease, box-shadow .2s ease;
	animation: slchatFabPulse 2.4s ease-in-out infinite;
}
.slchat-fab:hover {
	transform: translateY(-2px) scale(1.05);
	box-shadow: 0 12px 32px rgba(255,64,64,.45), 0 6px 16px rgba(0,26,64,.3);
	animation: none;
}
.slchat-fab.is-active { animation: none; transform: rotate(90deg); }

@keyframes slchatFabPulse {
	0%, 100% { box-shadow: 0 8px 28px rgba(255,64,64,.35), 0 4px 12px rgba(0,26,64,.25), 0 0 0 0 rgba(255,64,64,.5); }
	50%      { box-shadow: 0 8px 28px rgba(255,64,64,.35), 0 4px 12px rgba(0,26,64,.25), 0 0 0 14px rgba(255,64,64,0); }
}

.slchat-fab__badge {
	position: absolute; top: -6px; right: -6px;
	min-width: 22px; height: 22px;
	background: #50b0ff;
	color: #ffffff;
	font-family: 'Work Sans', sans-serif;
	font-size: 12px; font-weight: 800;
	display: flex; align-items: center; justify-content: center;
	border: 2px solid #ffffff;
	padding: 0 6px;
	box-shadow: 0 2px 6px rgba(0,26,64,.3);
}
.slchat-fab__badge.is-hidden { display: none; }

.slchat-fab__tip {
	position: absolute; right: 78px; top: 50%; transform: translateY(-50%);
	background: #001a40;
	color: #ffffff;
	font-family: 'Inter', Arial, sans-serif;
	font-size: 13px; font-weight: 500;
	padding: 8px 14px;
	white-space: nowrap;
	box-shadow: 0 6px 18px rgba(0,26,64,.25);
	opacity: 0; pointer-events: none;
	transition: opacity .25s ease;
}
.slchat-fab__tip::after {
	content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
	border: 6px solid transparent; border-left-color: #001a40;
}
.slchat-fab__tip.is-visible { opacity: 1; }

/* Window */
.slchat-window {
	position: fixed; right: 24px; bottom: 104px; z-index: 99998;
	width: 380px; max-width: calc(100vw - 48px);
	height: 540px; max-height: calc(100vh - 150px);
	background: #ffffff;
	border: 1px solid #e2e6ee;
	display: none;
	flex-direction: column;
	box-shadow: 0 16px 48px rgba(0,26,64,.22);
	transform-origin: bottom right;
	font-family: 'Inter', Arial, sans-serif;
	color: #001a40;
}
.slchat-window.is-open {
	display: flex;
	animation: slchatOpen .35s cubic-bezier(.2,.9,.3,1.2) both;
}
@keyframes slchatOpen {
	0%   { opacity: 0; transform: translateY(20px) scale(.94); }
	100% { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Header */
.slchat-header {
	background: linear-gradient(135deg, #001a40 0%, #002a66 60%, #003e8e 100%);
	color: #ffffff;
	padding: 14px 16px;
	display: flex; justify-content: space-between; align-items: center;
	position: relative;
	overflow: hidden;
}
.slchat-header::after {
	content: ''; position: absolute; top: 0; left: -100%;
	width: 50%; height: 100%;
	background: linear-gradient(90deg, transparent, rgba(80,176,255,.18), transparent);
	animation: slchatHeaderShine 5s ease-in-out infinite;
}
@keyframes slchatHeaderShine {
	0%, 70% { left: -50%; }
	85%, 100% { left: 150%; }
}
.slchat-header__id { display: flex; align-items: center; gap: 12px; }
.slchat-header__avatar {
	width: 36px; height: 36px;
	background: #ffffff;
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0;
}
.slchat-header__avatar svg { width: 22px; height: 22px; display: block; }
.slchat-header__title {
	font-family: 'Work Sans', Arial, sans-serif;
	font-weight: 700; font-size: 14px;
	letter-spacing: 1px; text-transform: uppercase;
	line-height: 1.1;
	color: #ffffff;
	margin: 0;
}
.slchat-header__status {
	font-family: 'Inter', Arial, sans-serif;
	font-weight: 400; font-size: 11px;
	color: #c8d2e2;
	display: flex; align-items: center; gap: 6px;
	margin-top: 3px;
	text-transform: none;
	letter-spacing: .3px;
}
.slchat-header__status::before {
	content: '';
	width: 8px; height: 8px;
	background: #4ade80;
	display: inline-block;
	box-shadow: 0 0 0 0 rgba(74,222,128,.6);
	animation: slchatStatusPulse 2s ease-out infinite;
}
@keyframes slchatStatusPulse {
	0%   { box-shadow: 0 0 0 0    rgba(74,222,128,.6); }
	70%  { box-shadow: 0 0 0 8px  rgba(74,222,128,0); }
	100% { box-shadow: 0 0 0 0    rgba(74,222,128,0); }
}
.slchat-header > button {
	background: transparent;
	border: 0;
	color: #ffffff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 6px;
	transition: opacity .15s ease;
	position: relative;
	z-index: 1;
}
.slchat-header > button:hover { opacity: .7; }

/* Body */
.slchat-body {
	flex: 1; overflow-y: auto; padding: 16px;
	background:
		radial-gradient(circle at 20% 0%, rgba(80,176,255,.06), transparent 40%),
		radial-gradient(circle at 80% 100%, rgba(255,64,64,.05), transparent 40%),
		#f5f7fb;
	font-size: 14px;
	line-height: 1.55;
	color: #001a40;
}
.slchat-body::-webkit-scrollbar { width: 6px; }
.slchat-body::-webkit-scrollbar-thumb { background: #c9d2e0; }

/* Messages */
.slchat-msg-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px; animation: slchatMsgIn .3s ease-out both; }
.slchat-msg-row.user { justify-content: flex-end; }
@keyframes slchatMsgIn {
	0%   { opacity: 0; transform: translateY(8px); }
	100% { opacity: 1; transform: translateY(0); }
}
.slchat-avatar {
	width: 28px; height: 28px;
	background: linear-gradient(135deg, #001a40, #003e8e);
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0;
}
.slchat-avatar svg { width: 16px; height: 16px; display: block; }
.slchat-msg {
	max-width: 78%;
	padding: 10px 13px;
	line-height: 1.45;
	font-size: 14px;
	font-family: 'Inter', Arial, sans-serif;
}
.slchat-msg.bot {
	background: #ffffff;
	border: 1px solid #e2e6ee;
	color: #001a40;
	box-shadow: 0 2px 6px rgba(0,26,64,.04);
}
.slchat-msg.user {
	background: linear-gradient(135deg, #001a40 0%, #002a66 100%);
	color: #ffffff;
	box-shadow: 0 2px 6px rgba(0,26,64,.18);
}

/* Typing indicator */
.slchat-typing {
	background: #ffffff;
	border: 1px solid #e2e6ee;
	padding: 12px 14px;
	display: inline-flex; gap: 4px;
	box-shadow: 0 2px 6px rgba(0,26,64,.04);
}
.slchat-typing span {
	width: 7px; height: 7px;
	background: #50b0ff;
	display: inline-block;
	animation: slchatTypingDot 1.2s ease-in-out infinite;
}
.slchat-typing span:nth-child(2) { animation-delay: .15s; }
.slchat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes slchatTypingDot {
	0%, 60%, 100% { opacity: .3; transform: translateY(0); }
	30%           { opacity: 1;  transform: translateY(-3px); }
}

/* Quick replies */
.slchat-quick {
	display: flex; flex-wrap: wrap; gap: 6px;
	padding: 10px 16px;
	border-top: 1px solid #e2e6ee;
	background: #ffffff;
}
.slchat-quick button {
	font-family: 'Work Sans', Arial, sans-serif;
	font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
	padding: 7px 12px;
	background: #ffffff;
	color: #001a40;
	border: 1px solid #e2e6ee;
	border-radius: 0;
	cursor: pointer;
	transition: all .15s ease;
}
.slchat-quick button:hover {
	background: #50b0ff;
	color: #ffffff;
	border-color: #50b0ff;
	transform: translateY(-1px);
	box-shadow: 0 3px 8px rgba(80,176,255,.3);
}

/* Input */
.slchat-input {
	display: flex; border-top: 1px solid #e2e6ee; background: #ffffff;
}
.slchat-input input {
	flex: 1; padding: 12px 14px; border: 0;
	font-family: 'Inter', Arial, sans-serif; font-size: 14px;
	color: #001a40; background: #ffffff;
}
.slchat-input input:focus { outline: none; box-shadow: inset 0 -2px 0 #50b0ff; }
.slchat-input button {
	padding: 0 18px;
	background: linear-gradient(135deg, #ff4040 0%, #d63232 100%);
	color: #ffffff;
	border: 0; border-radius: 0;
	font-family: 'Work Sans', sans-serif;
	font-weight: 700; font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
	cursor: pointer;
	transition: filter .15s ease;
}
.slchat-input button:hover { filter: brightness(1.1); }

.slchat-disclaimer {
	font-size: 11px; color: #6a7384; padding: 6px 16px 8px; background: #ffffff;
	border-top: 1px solid #e2e6ee;
	text-align: center;
	font-family: 'Inter', Arial, sans-serif;
}
