/* Hoffer Electric – Live Chat Bot */
.hb { position: fixed; right: 22px; bottom: 22px; z-index: 9999; font-family: var(--he-font-body, system-ui, sans-serif); }
.hb *, .hb *::before, .hb *::after { box-sizing: border-box; }

.hb-launch {
	position: relative; width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
	background: linear-gradient(135deg, #ffc21a, #ffb000); color: #0a1a33;
	box-shadow: 0 14px 30px rgba(255, 176, 0, .45); transition: transform .3s;
	display: grid; place-items: center;
}
.hb-launch:hover { transform: scale(1.07); }
.hb-launch__icon { position: absolute; display: grid; place-items: center; transition: transform .35s, opacity .35s; }
.hb-launch__icon svg { width: 28px; height: 28px; }
.hb-launch__icon--close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.hb.is-open .hb-launch__icon--chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.hb.is-open .hb-launch__icon--close { opacity: 1; transform: none; }
.hb-dot { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: #22c55e; border: 3px solid #fff; }
.hb-launch::after { content: ""; position: absolute; inset: 0; border-radius: 50%; animation: hb-pulse 2.4s infinite; }
@keyframes hb-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 194, 26, .6); } 70%, 100% { box-shadow: 0 0 0 18px rgba(255, 194, 26, 0); } }
.hb.is-open .hb-launch::after { animation: none; }

.hb-teaser {
	position: absolute; right: 74px; bottom: 10px; width: max-content; max-width: 240px;
	background: #fff; color: #13213a; padding: 12px 32px 12px 16px; border-radius: 16px 16px 4px 16px;
	font-size: 14px; font-weight: 600; box-shadow: 0 14px 36px rgba(10, 26, 51, .18); cursor: pointer;
	opacity: 0; visibility: hidden; transform: translateX(10px); transition: .35s;
}
.hb-teaser.is-show { opacity: 1; visibility: visible; transform: none; }
.hb-teaser button { position: absolute; right: 6px; top: 4px; border: 0; background: none; font-size: 18px; line-height: 1; color: #8a96ad; cursor: pointer; }

.hb-panel {
	position: absolute; right: 0; bottom: 78px; width: 370px; height: 560px; max-height: calc(100vh - 120px);
	background: #fff; border-radius: 22px; overflow: hidden; display: flex; flex-direction: column;
	box-shadow: 0 30px 70px rgba(10, 26, 51, .28);
	opacity: 0; visibility: hidden; transform: translateY(16px) scale(.97); transform-origin: bottom right; transition: .35s cubic-bezier(.2, .7, .2, 1);
}
.hb.is-open .hb-panel { opacity: 1; visibility: visible; transform: none; }

.hb-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: linear-gradient(120deg, #0a1a33, #183563); color: #fff; }
.hb-avatar { width: 42px; height: 42px; border-radius: 12px; background: #ffc21a; color: #0a1a33; display: grid; place-items: center; flex: none; }
.hb-avatar svg { width: 22px; height: 22px; }
.hb-head__txt { flex: 1; min-width: 0; }
.hb-head__txt strong { display: block; font-size: 15px; font-family: var(--he-font-head, inherit); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-head__txt small { font-size: 12px; color: #b9c6dd; display: flex; align-items: center; gap: 6px; }
.hb-head__txt small i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }
.hb-head__call { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; }
.hb-head__call:hover { background: #ffc21a; color: #0a1a33; }
.hb-head__call svg { width: 18px; height: 18px; }

.hb-body { flex: 1; overflow-y: auto; padding: 18px 16px 8px; background: #f4f7fc; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.hb-msg { max-width: 84%; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; animation: hb-in .3s ease; word-wrap: break-word; }
.hb-msg a { color: #2f8cff; font-weight: 700; }
.hb-msg--bot { background: #fff; color: #13213a; border-bottom-left-radius: 4px; box-shadow: 0 2px 8px rgba(10, 26, 51, .06); align-self: flex-start; }
.hb-msg--user { background: #0a1a33; color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
@keyframes hb-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hb-typing { display: flex; gap: 4px; padding: 14px 16px; }
.hb-typing span { width: 7px; height: 7px; border-radius: 50%; background: #8a96ad; animation: hb-blink 1.2s infinite; }
.hb-typing span:nth-child(2) { animation-delay: .2s; }
.hb-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes hb-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.hb-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 14px 10px; background: #f4f7fc; }
.hb-quick:empty { display: none; }
.hb-quick button {
	border: 1.5px solid #dbe3f0; background: #fff; color: #13213a; border-radius: 999px; padding: 7px 13px;
	font-size: 13px; font-weight: 600; cursor: pointer; transition: .2s; font-family: inherit;
}
.hb-quick button:hover { border-color: #ffc21a; background: #fff8e1; }

.hb-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e3e8f1; background: #fff; margin: 0; }
.hb-input input { flex: 1; border: 1.5px solid #e3e8f1; border-radius: 999px; padding: 11px 16px; font-size: 14.5px; outline: none; background: #f4f7fc; color: #13213a; font-family: inherit; min-width: 0; }
.hb-input input:focus { border-color: #2f8cff; background: #fff; }
.hb-input button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #ffc21a; color: #0a1a33; cursor: pointer; display: grid; place-items: center; flex: none; }
.hb-input button svg { width: 18px; height: 18px; }
.hb-foot { text-align: center; font-size: 11px; color: #8a96ad; padding: 0 0 8px; background: #fff; }

@media (max-width: 640px) {
	.hb { right: 14px; bottom: 78px; }
	.hb-launch { width: 56px; height: 56px; }
	.hb-panel { position: fixed; right: 10px; left: 10px; bottom: 146px; width: auto; height: auto; top: 80px; max-height: none; }
	.hb-teaser { max-width: 200px; }
}
