/* Boststar: robot dyal chat (ajwiba wajdin, bla API) */
.bs-bot-fab {
	position: fixed; right: 20px; bottom: 20px; z-index: 1040;
	display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 0 22px 0 8px;
	border: 0; border-radius: 999px; cursor: pointer; color: #fff; font: 700 15px/1 inherit; font-family: inherit;
	background: linear-gradient(135deg, #6366f1, #a855f7);
	box-shadow: 0 14px 34px -10px rgba(168, 85, 247, .85), 0 0 0 1px rgba(255, 255, 255, .08) inset;
	transition: transform .18s ease, box-shadow .18s ease;
}
.bs-bot-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(168, 85, 247, 1); }
.bs-bot-fab__av { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .18); font-size: 19px; }
.bs-bot-fab__av::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 2px #7c5cf3; }
.bs-bot-fab__badge { position: absolute; top: -4px; right: -2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: #f43f5e; color: #fff; font-size: 11px; font-weight: 800; }
.bs-bot-open .bs-bot-fab { transform: scale(.9); opacity: 0; pointer-events: none; }

.bs-bot {
	position: fixed; right: 20px; bottom: 20px; z-index: 1045; width: 380px; max-width: calc(100vw - 24px);
	height: min(600px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden;
	border-radius: 24px; background: #12122a; border: 1px solid #2a2a4d;
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9);
	opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none; visibility: hidden;
	transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
	font-family: inherit; color: #ecebff;
}
.bs-bot-open .bs-bot { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .2s ease, transform .2s ease, visibility 0s; }

.bs-bot__head { flex: none; display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: linear-gradient(135deg, rgba(99, 102, 241, .35), rgba(168, 85, 247, .35)), #17173a; border-bottom: 1px solid #2a2a4d; }
.bs-bot__av { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #6366f1, #a855f7); font-size: 20px; color: #fff; }
.bs-bot__av::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 2px #1a1a3d; }
.bs-bot__title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bs-bot__title b { font-size: 15.5px; font-weight: 800; color: #fff; }
.bs-bot__title small { font-size: 12px; color: #a7a5c9; }
.bs-bot__x { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(0, 0, 0, .2); color: #fff; font-size: 16px; cursor: pointer; }
.bs-bot__x:hover { background: rgba(0, 0, 0, .35); }

.bs-bot__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 14px 8px; display: flex; flex-direction: column; gap: 10px; }
.bs-bot__msg { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; word-wrap: break-word; white-space: pre-line; animation: bsBotIn .2s ease; }
.bs-bot__msg.is-bot { align-self: flex-start; background: #1e1e40; border: 1px solid #2a2a4d; border-bottom-left-radius: 6px; }
.bs-bot__msg.is-me { align-self: flex-end; background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; border-bottom-right-radius: 6px; }
.bs-bot__msg a { color: #c4b5fd; font-weight: 700; text-decoration: underline; }
.bs-bot__msg.is-me a { color: #fff; }
.bs-bot__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bs-bot__links a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; background: rgba(168, 85, 247, .16); border: 1px solid rgba(168, 85, 247, .35); color: #e9d5ff !important; font-size: 12.5px; font-weight: 700; text-decoration: none !important; white-space: nowrap; }
.bs-bot__links a:hover { background: rgba(168, 85, 247, .28); }
.bs-bot__links a.is-wa { background: rgba(37, 211, 102, .14); border-color: rgba(37, 211, 102, .4); color: #86efac !important; }
.bs-bot__typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 13px 16px; border-radius: 18px; background: #1e1e40; border: 1px solid #2a2a4d; }
.bs-bot__typing i { width: 7px; height: 7px; border-radius: 50%; background: #a7a5c9; animation: bsBotDot 1s infinite; }
.bs-bot__typing i:nth-child(2) { animation-delay: .15s; }
.bs-bot__typing i:nth-child(3) { animation-delay: .3s; }

.bs-bot__quick { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px 4px; scrollbar-width: none; }
.bs-bot__quick::-webkit-scrollbar { display: none; }
.bs-bot__quick button { flex: none; padding: 8px 13px; border-radius: 999px; border: 1px solid #2f2f58; background: #1a1a38; color: #d8d6f5; font: 600 12.5px/1 inherit; font-family: inherit; cursor: pointer; white-space: nowrap; }
.bs-bot__quick button:hover { border-color: #a855f7; color: #fff; }

.bs-bot__form { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid #23234a; }
.bs-bot__form input { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid #2f2f58; background: #191936; color: #fff; font-size: 14.5px; font-family: inherit; outline: none; }
.bs-bot__form input:focus { border-color: #a855f7; }
.bs-bot__form button { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; border: 0; background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; font-size: 16px; cursor: pointer; }
.bs-bot__foot { flex: none; padding: 0 12px 10px; text-align: center; font-size: 11.5px; color: #8b89b0; }
.bs-bot__foot a { color: #86efac !important; font-weight: 700; text-decoration: none !important; }

[dir="rtl"] .bs-bot-fab, .bs-lang-ar .bs-bot-fab, [dir="rtl"] .bs-bot, .bs-lang-ar .bs-bot { right: auto; left: 20px; }
[dir="rtl"] .bs-bot-fab, .bs-lang-ar .bs-bot-fab { padding: 0 8px 0 22px; }
[dir="rtl"] .bs-bot__msg.is-bot { border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
[dir="rtl"] .bs-bot__msg.is-me { border-bottom-right-radius: 18px; border-bottom-left-radius: 6px; }

@keyframes bsBotIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bsBotDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Boststar: robot ma yghettich l-ktaba -> kaykhtafi mli l-client kay-scrolli, w kayrje3 mli kaywe9ef */
.bs-bot-fab { transition: transform .25s ease, box-shadow .18s ease, opacity .25s ease; }
.bs-bot-fab.is-away { transform: translateY(90px); opacity: 0; pointer-events: none; }

@media (max-width: 575px) {
	.bs-bot-fab { right: 12px; bottom: 12px; height: 48px; padding: 0 4px; }
	.bs-bot-fab__av { width: 40px; height: 40px; font-size: 17px; }
	.bs-bot-fab__badge { top: -5px; right: -4px; min-width: 18px; height: 18px; font-size: 10px; }
	body { padding-bottom: 72px; }
	.bs-bot-fab__txt { display: none; }
	[dir="rtl"] .bs-bot-fab, .bs-lang-ar .bs-bot-fab { left: 14px; padding: 0 7px; }
	.bs-bot { right: 0 !important; left: 0 !important; bottom: 0; width: 100%; max-width: 100%; height: 88vh; height: 88dvh; border-radius: 22px 22px 0 0; border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .bs-bot, .bs-bot-fab, .bs-bot__msg { transition: none; animation: none; } }
