/* Upper Echelon Auto — Live Chat Assistant */
.ue-chat { position: fixed; right: 24px; bottom: 24px; z-index: 9990; font-family: var(--ue-ff-b); }
.ue-chat-launch {
	position: relative; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; color: var(--ue-ink);
	background: linear-gradient(135deg, var(--ue-gold-2), var(--ue-gold) 55%, var(--ue-gold-d));
	box-shadow: 0 16px 34px -10px rgba(156, 122, 44, .8), 0 0 0 0 rgba(201, 164, 76, .5);
	display: grid; place-items: center; transition: transform .4s cubic-bezier(.22, .8, .2, 1);
	animation: ueChatPulse 2.6s infinite;
}
.ue-chat-launch:hover { transform: scale(1.07) rotate(-6deg); }
.ue-chat-launch > span { grid-area: 1 / 1; display: grid; place-items: center; transition: transform .4s, opacity .3s; }
.ue-chat-ico-close { opacity: 0; transform: rotate(-90deg) scale(.5); }
.ue-chat.is-open .ue-chat-ico-open { opacity: 0; transform: rotate(90deg) scale(.5); }
.ue-chat.is-open .ue-chat-ico-close { opacity: 1; transform: none; }
.ue-chat.is-open .ue-chat-launch { animation: none; background: var(--ue-ink); color: var(--ue-gold); }
.ue-chat-badge {
	position: absolute !important; top: -2px; right: -2px; width: 22px; height: 22px; border-radius: 50%;
	background: #D33A3A; color: #fff; font-size: .72rem; font-weight: 800; border: 2px solid #fff;
}
.ue-chat.is-seen .ue-chat-badge { display: none; }

.ue-chat-tip {
	position: absolute; right: 0; bottom: 80px; width: 250px; padding: 14px 34px 14px 16px; border-radius: 14px 14px 4px 14px;
	background: #fff; color: var(--ue-text); box-shadow: 0 20px 50px -18px rgba(13, 16, 20, .45); font-size: .88rem; line-height: 1.45; cursor: pointer;
	opacity: 0; visibility: hidden; transform: translateY(12px) scale(.96); transform-origin: bottom right; transition: all .45s cubic-bezier(.22, .8, .2, 1);
	border-bottom: 3px solid var(--ue-gold);
}
.ue-chat-tip.is-show { opacity: 1; visibility: visible; transform: none; }
.ue-chat-tip strong { display: block; color: var(--ue-ink); font-size: .95rem; }
.ue-chat-tip-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.2rem; line-height: 1; color: #9aa0a8; cursor: pointer; }
.ue-chat.is-open .ue-chat-tip { display: none; }

.ue-chat-panel {
	position: absolute; right: 0; bottom: 82px; width: 380px; height: min(600px, calc(100vh - 140px));
	display: flex; flex-direction: column; overflow: hidden; border-radius: 22px;
	background: var(--ue-ivory); box-shadow: 0 40px 90px -30px rgba(5, 7, 9, .6); border: 1px solid rgba(13, 16, 20, .08);
	opacity: 0; visibility: hidden; transform: translateY(24px) scale(.96); transform-origin: bottom right;
	transition: all .45s cubic-bezier(.22, .8, .2, 1);
}
.ue-chat.is-open .ue-chat-panel { opacity: 1; visibility: visible; transform: none; }

.ue-chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px; background: var(--ue-ink); color: #fff; position: relative; }
.ue-chat-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--ue-gold-d), var(--ue-gold-2)); }
.ue-chat-avatar { width: 44px; height: 44px; border-radius: 12px; background: var(--ue-ink-3); display: grid; place-items: center; flex: none; border: 1px solid rgba(201, 164, 76, .4); }
.ue-chat-avatar img { width: 32px; height: 32px; }
.ue-chat-who { flex: 1; min-width: 0; line-height: 1.3; }
.ue-chat-who strong { display: block; font-family: var(--ue-ff-h); font-size: 1.25rem; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ue-chat-who span { font-size: .78rem; color: #AEB4BD; display: inline-flex; align-items: center; gap: 6px; }
.ue-chat-online { width: 8px; height: 8px; border-radius: 50%; background: #2BC17F; box-shadow: 0 0 0 3px rgba(43, 193, 127, .25); display: inline-block; }
.ue-chat-call, .ue-chat-min { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: var(--ue-gold-2); border: 0; cursor: pointer; transition: background .3s; }
.ue-chat-call:hover, .ue-chat-min:hover { background: var(--ue-gold); color: var(--ue-ink); }

.ue-chat-body { flex: 1; overflow-y: auto; padding: 18px 14px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.ue-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; animation: ueMsgIn .35s cubic-bezier(.22, .8, .2, 1); }
.ue-msg-av { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--ue-ink); display: grid; place-items: center; }
.ue-msg-av img { width: 20px; height: 20px; }
.ue-msg-bubble { padding: 11px 14px; border-radius: 16px; font-size: .92rem; line-height: 1.55; word-wrap: break-word; }
.ue-msg-bot .ue-msg-bubble { background: #fff; color: var(--ue-text); border-bottom-left-radius: 4px; box-shadow: 0 6px 16px -10px rgba(13, 16, 20, .35); }
.ue-msg-bot .ue-msg-bubble a { color: var(--ue-gold-d); font-weight: 700; }
.ue-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.ue-msg-user .ue-msg-bubble { background: var(--ue-ink); color: #fff; border-bottom-right-radius: 4px; }
.ue-open { color: #1F9D6B; font-weight: 700; }
.ue-closed { color: #B8442F; font-weight: 700; }
.ue-typing .ue-msg-bubble { display: flex; gap: 4px; padding: 14px 16px; }
.ue-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ue-gold); animation: ueType 1.2s infinite; }
.ue-typing i:nth-child(2) { animation-delay: .15s; }
.ue-typing i:nth-child(3) { animation-delay: .3s; }

.ue-chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px 10px; max-height: 128px; overflow-y: auto; }
.ue-chip {
	border: 1.5px solid rgba(201, 164, 76, .6); background: #fff; color: var(--ue-ink); border-radius: 30px; padding: 7px 12px;
	font: 600 .8rem/1.2 var(--ue-ff-b); cursor: pointer; transition: all .25s; animation: ueMsgIn .35s both;
}
.ue-chip:hover { background: var(--ue-ink); color: var(--ue-gold-2); border-color: var(--ue-ink); transform: translateY(-2px); }

.ue-chat-form { display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid rgba(13, 16, 20, .08); }
.ue-chat-input { flex: 1; border: 1.5px solid #E2DDD1; border-radius: 12px; padding: 11px 14px; font: inherit; font-size: .92rem; background: var(--ue-ivory); color: var(--ue-ink); }
.ue-chat-input:focus { outline: 0; border-color: var(--ue-gold); background: #fff; }
.ue-chat-send { width: 44px; border: 0; border-radius: 12px; cursor: pointer; display: grid; place-items: center; color: var(--ue-ink); background: linear-gradient(135deg, var(--ue-gold-2), var(--ue-gold)); transition: transform .25s; }
.ue-chat-send:hover { transform: scale(1.06); }
.ue-chat-foot { text-align: center; font-size: .68rem; color: #9aa0a8; padding: 0 0 8px; background: #fff; letter-spacing: .3px; }

@keyframes ueChatPulse { 0% { box-shadow: 0 16px 34px -10px rgba(156, 122, 44, .8), 0 0 0 0 rgba(201, 164, 76, .55); } 70% { box-shadow: 0 16px 34px -10px rgba(156, 122, 44, .8), 0 0 0 18px rgba(201, 164, 76, 0); } 100% { box-shadow: 0 16px 34px -10px rgba(156, 122, 44, .8), 0 0 0 0 rgba(201, 164, 76, 0); } }
@keyframes ueMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ueType { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

@media (max-width: 767px) {
	.ue-chat { right: 16px; bottom: 16px; }
	.ue-chat-launch { width: 58px; height: 58px; }
	.ue-chat-panel { position: fixed; right: 10px; left: 10px; bottom: 86px; width: auto; height: calc(100vh - 110px); height: calc(100dvh - 110px); }
	.ue-chat-tip { width: 220px; }
}
