/* ============================================================
   Thalhah Bot — widget chat (gaya onwebchat)
   CSS berasingan daripada Tailwind supaya tiada pembinaan semula CSS diperlukan.
   Warna mengikut jenama laman: hijau-teal #0E7C66, latar gelap #0B1220.
   ============================================================ */

.tb-butang {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 60;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 18px 12px 14px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, #0E7C66, #14A88A);
	color: #fff;
	font: 600 14px/1 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	cursor: pointer;
	box-shadow: 0 10px 30px rgba(14,124,102,.38), 0 2px 6px rgba(0,0,0,.25);
	transition: transform .18s ease, box-shadow .18s ease;
}
.tb-butang:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(14,124,102,.48); }
.tb-butang svg { width: 22px; height: 22px; }
.tb-butang .tb-titik {
	width: 8px; height: 8px; border-radius: 50%;
	background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.25);
}
.tb-butang.tb-sembunyi { display: none; }

/* ---------- panel ---------- */
.tb-panel {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 61;
	display: none;
	flex-direction: column;
	width: 380px;
	max-width: calc(100vw - 24px);
	height: 580px;
	max-height: calc(100vh - 36px);
	background: #0B1220;
	border: 1px solid rgba(255,255,255,.10);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 26px 70px rgba(0,0,0,.55);
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: #e8fffa;
}
.tb-panel.tb-buka { display: flex; }

.tb-kepala {
	display: flex; align-items: center; gap: 10px;
	padding: 13px 14px;
	background: linear-gradient(135deg, #0E7C66, #0A5C4C);
	color: #fff;
}
.tb-kepala .tb-avatar {
	width: 34px; height: 34px; border-radius: 50%;
	background: rgba(255,255,255,.16);
	display: grid; place-items: center;
	font-weight: 800; font-size: 13px; letter-spacing: .3px;
}
.tb-kepala .tb-nama { font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.tb-kepala .tb-status { font-size: 11px; opacity: .85; }
.tb-kepala .tb-tutup {
	margin-left: auto; border: 0; background: transparent; color: #fff;
	font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px;
}
.tb-kepala .tb-tutup:hover { background: rgba(255,255,255,.15); }

.tb-isi { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.tb-isi::-webkit-scrollbar { width: 8px; }
.tb-isi::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; }

.tb-balon { max-width: 86%; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.tb-bot { align-self: flex-start; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09); border-bottom-left-radius: 5px; }
.tb-pelawat { align-self: flex-end; background: #0E7C66; color: #fff; border-bottom-right-radius: 5px; }
.tb-balon a { color: #7ee0c4; }
.tb-sumber { margin-top: 7px; padding-top: 7px; border-top: 1px dashed rgba(255,255,255,.14); font-size: 11.5px; color: #9fb4b0; }
.tb-sumber a { color: #7ee0c4; text-decoration: none; }
.tb-sumber a:hover { text-decoration: underline; }

.tb-menaip { align-self: flex-start; display: flex; gap: 4px; padding: 11px 13px; background: rgba(255,255,255,.07); border-radius: 14px; }
.tb-menaip i { width: 6px; height: 6px; border-radius: 50%; background: #9fb4b0; animation: tb-jump .9s infinite ease-in-out; }
.tb-menaip i:nth-child(2) { animation-delay: .15s; }
.tb-menaip i:nth-child(3) { animation-delay: .3s; }
@keyframes tb-jump { 0%,80%,100% { transform: translateY(0); opacity:.5 } 40% { transform: translateY(-4px); opacity:1 } }

/* ---------- borang pintu masuk (wajib sebelum tanya) ---------- */
.tb-borang { display: flex; flex-direction: column; gap: 9px; }
.tb-borang label { font-size: 11.5px; color: #a9bfbb; }
.tb-borang input[type=text], .tb-borang input[type=email], .tb-borang input[type=tel] {
	width: 100%; padding: 10px 11px; border-radius: 10px; font-size: 13.5px;
	background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #eafffb; font-family: inherit;
}
.tb-borang input:focus { outline: none; border-color: #14A88A; box-shadow: 0 0 0 3px rgba(20,168,138,.18); }
.tb-borang .tb-setuju { display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; color: #a9bfbb; line-height: 1.45; }
.tb-borang .tb-setuju input { margin-top: 2px; }
.tb-borang button, .tb-tindakan button {
	padding: 11px 14px; border: 0; border-radius: 10px; cursor: pointer;
	background: #0E7C66; color: #fff; font: 700 13.5px/1 inherit; font-family: inherit;
}
.tb-borang button:hover, .tb-tindakan button:hover { background: #14A88A; }
.tb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tb-ralat { color: #ffb3b3; font-size: 12px; min-height: 15px; }

/* ---------- kaki ---------- */
.tb-tindakan { display: flex; gap: 8px; padding: 0 12px 8px; }
.tb-tindakan button { flex: 1; background: rgba(255,255,255,.10); color: #d6ffef; font-weight: 600; }
.tb-tindakan button.tb-utama { background: #0E7C66; color: #fff; }
.tb-komposer { display: flex; gap: 8px; padding: 0 12px 10px; }
.tb-komposer textarea {
	flex: 1; resize: none; height: 44px; padding: 11px 12px; border-radius: 12px;
	background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
	color: #eafffb; font: 400 13.5px/1.35 inherit; font-family: inherit; overflow: hidden;
}
.tb-komposer textarea:focus { outline: none; border-color: #14A88A; }
.tb-komposer button {
	width: 46px; border: 0; border-radius: 12px; background: #0E7C66; color: #fff; cursor: pointer;
	display: grid; place-items: center;
}
.tb-komposer button:disabled { opacity: .45; cursor: not-allowed; }
.tb-nota { padding: 8px 14px 10px; font-size: 10.5px; line-height: 1.45; color: #8fa5a1; border-top: 1px solid rgba(255,255,255,.07); }
.tb-nota a { color: #7ee0c4; }

/* Butang "kembali ke atas" laman (id=toTop, kelas Tailwind right-6) bertindih
   dengan butang bot di penjuru yang sama — alihkannya ke kiri. Lebar butang bot
   (~195px termasuk label) menentukan jarak ini. Ditulis di sini supaya tiada
   pembinaan semula Tailwind diperlukan. */
#toTop { right: 212px !important; }

@media (max-width: 460px) {
	.tb-butang { right: 12px; bottom: 12px; padding: 14px; }
	.tb-butang span.tb-teks { display: none; }
	.tb-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; border: 0; }
	#toTop { right: 76px !important; }   /* butang bot jadi bulat 56px sahaja di telefon */
}
