/* CBIT Assistant — chat widget (assets/js/assistant.js). */

.cbit-asst-launcher {
	position: fixed; right: 20px; bottom: 20px; z-index: 9990;
	display: inline-flex; align-items: center; gap: 10px;
	height: 58px; padding: 0 20px 0 17px; border: 0; border-radius: 999px; cursor: pointer;
	background: linear-gradient(135deg, var(--cbit-navy-light, #24345e), var(--cbit-navy, #0d1b3d));
	color: #fff; font: 700 14.5px/1 'Plus Jakarta Sans', sans-serif;
	box-shadow: 0 12px 30px rgba(13,27,61,.35), inset 0 -3px 0 var(--cbit-red, #e0384f);
	transition: transform .18s ease, box-shadow .18s ease;
}
.cbit-asst-launcher:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(13,27,61,.42), inset 0 -3px 0 var(--cbit-red, #e0384f); }
.cbit-asst-launcher svg { color: var(--cbit-gold, #e0b04a); }
.cbit-asst-launcher.is-open { opacity: 0; pointer-events: none; }
/* Lift the theme's back-to-top button above the launcher. */
.has-cbit-assistant #back-to-top { bottom: 90px; }

.cbit-asst-teaser {
	position: fixed; right: 20px; bottom: 90px; z-index: 9989; max-width: 270px;
	display: flex; align-items: flex-start; gap: 4px;
	background: #fff; border-radius: 16px 16px 4px 16px; padding: 4px 4px 4px 2px;
	box-shadow: 0 14px 34px rgba(13,27,61,.2); border: 1px solid #eceef4;
	animation: cbit-asst-pop .3s ease both;
}
.cbit-asst-teaser-text {
	flex: 1; text-align: left; background: none; border: 0; cursor: pointer; padding: 10px 6px 10px 12px;
	font: 600 13.5px/1.45 'Plus Jakarta Sans', sans-serif; color: var(--cbit-navy, #0d1b3d);
}
.cbit-asst-teaser-close { background: none; border: 0; cursor: pointer; color: #8b93a8; padding: 8px; border-radius: 8px; }
.cbit-asst-teaser-close:hover { background: #f2f4f9; }

.cbit-asst-panel {
	position: fixed; right: 20px; bottom: 20px; z-index: 9991;
	width: 390px; height: min(620px, calc(100vh - 40px));
	display: flex; flex-direction: column; overflow: hidden;
	background: #f6f7fb; border-radius: 22px;
	box-shadow: 0 24px 60px rgba(13,27,61,.3), 0 0 0 1px rgba(13,27,61,.06);
	font-family: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', sans-serif;
	animation: cbit-asst-pop .22s ease both;
}
.cbit-asst-panel[hidden] { display: none; }
@keyframes cbit-asst-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.cbit-asst-head {
	display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px;
	background: linear-gradient(135deg, var(--cbit-navy, #0d1b3d), var(--cbit-navy-light, #24345e));
	color: #fff; box-shadow: inset 0 -3px 0 var(--cbit-red, #e0384f);
}
.cbit-asst-avatar {
	width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--cbit-gold, #e0b04a); color: var(--cbit-navy, #0d1b3d); font-weight: 800; font-size: 14px;
}
.cbit-asst-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cbit-asst-titles strong { font-size: 15.5px; }
.cbit-asst-status { font-size: 12px; color: #b8c3e0; display: inline-flex; align-items: center; gap: 6px; }
.cbit-asst-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #3ddc97; }
.cbit-asst-icon-btn {
	width: 36px; height: 36px; border: 0; border-radius: 10px; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	background: rgba(255,255,255,.08); color: #fff;
}
.cbit-asst-icon-btn:hover { background: rgba(255,255,255,.18); }

.cbit-asst-log { flex: 1; overflow-y: auto; padding: 18px 14px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.cbit-asst-msg { display: flex; }
.cbit-asst-msg--user { justify-content: flex-end; }
.cbit-asst-bubble {
	max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.55;
	background: #fff; color: #2b3242; border: 1px solid #e8ebf2; border-top-left-radius: 6px;
	box-shadow: 0 1px 2px rgba(13,27,61,.04); overflow-wrap: anywhere;
}
.cbit-asst-bubble p { margin: 0 0 8px; }
.cbit-asst-bubble p:last-child { margin-bottom: 0; }
.cbit-asst-msg--user .cbit-asst-bubble {
	background: var(--cbit-navy, #0d1b3d); color: #fff; border-color: transparent;
	border-top-left-radius: 16px; border-top-right-radius: 6px;
}

.cbit-asst-links, .cbit-asst-contacts { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cbit-asst-links a, .cbit-asst-contacts a {
	display: flex; align-items: center; gap: 10px; text-decoration: none;
	padding: 9px 11px; border-radius: 11px; background: #f5f7fc; border: 1px solid #e6eaf3;
	color: var(--cbit-navy, #0d1b3d); transition: background .15s ease, border-color .15s ease;
}
.cbit-asst-links a:hover, .cbit-asst-contacts a:hover { background: #fff; border-color: var(--cbit-blue-accent, #7ea8e0); }
.cbit-asst-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cbit-asst-link-label { font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.cbit-asst-link-meta { font-size: 12px; color: #737b90; line-height: 1.4; }
.cbit-asst-links svg { flex-shrink: 0; color: var(--cbit-red, #e0384f); }
.cbit-asst-contacts a svg {
	flex-shrink: 0; width: 30px; height: 30px; padding: 7px; border-radius: 9px;
	background: rgba(23,138,94,.1); color: #178a5e;
}
.cbit-asst-contacts a[href^="mailto:"] svg { background: rgba(74,127,209,.12); color: #2f64b8; }
.cbit-asst-contacts a > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cbit-asst-contact-label { font-size: 11.5px; font-weight: 600; color: #737b90; text-transform: uppercase; letter-spacing: .04em; }
.cbit-asst-contact-value { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }

.cbit-asst-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 0 4px; }
.cbit-asst-chip {
	border: 1.5px solid var(--cbit-navy, #0d1b3d); background: #fff; color: var(--cbit-navy, #0d1b3d);
	border-radius: 999px; padding: 7px 13px; cursor: pointer;
	font: 600 12.5px/1.2 'Plus Jakarta Sans', sans-serif; transition: background .15s ease, color .15s ease;
}
.cbit-asst-chip:hover { background: var(--cbit-navy, #0d1b3d); color: #fff; }

.cbit-asst-typing .cbit-asst-bubble { display: inline-flex; gap: 5px; padding: 14px 16px; }
.cbit-asst-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa5c0; animation: cbit-asst-dot 1s infinite ease-in-out; }
.cbit-asst-typing span:nth-child(2) { animation-delay: .15s; }
.cbit-asst-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cbit-asst-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.cbit-asst-lead {
	background: #fff; border: 1px solid #e8ebf2; border-radius: 16px; padding: 16px;
	display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 2px rgba(13,27,61,.04);
}
.cbit-asst-lead-title { margin: 0; font-family: 'Roboto Slab', Georgia, serif; font-weight: 700; font-size: 15.5px; color: var(--cbit-navy, #0d1b3d); }
.cbit-asst-field { display: flex; flex-direction: column; gap: 4px; }
.cbit-asst-field-label { font-size: 12px; font-weight: 700; color: #4a5268; }
.cbit-asst-req { color: var(--cbit-red, #e0384f); }
.cbit-asst-lead input:not([type="checkbox"]), .cbit-asst-lead select, .cbit-asst-lead textarea {
	width: 100%; border: 1px solid #d9deea; border-radius: 10px; padding: 9px 11px; background: #fbfcfe;
	font: 500 14px/1.4 'Plus Jakarta Sans', sans-serif; color: #1f2533;
}
.cbit-asst-lead input:focus, .cbit-asst-lead select:focus, .cbit-asst-lead textarea:focus { outline: 2px solid var(--cbit-blue-accent, #7ea8e0); outline-offset: 0; border-color: transparent; background: #fff; }
.cbit-asst-lead [aria-invalid="true"] { border-color: var(--cbit-red, #e0384f) !important; background: #fff7f8 !important; }
.cbit-asst-field-error { font-size: 12px; color: #c42a40; font-weight: 600; }
.cbit-asst-field-error:empty { display: none; }
.cbit-asst-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: #4a5268; line-height: 1.45; cursor: pointer; }
.cbit-asst-consent input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--cbit-navy, #0d1b3d); flex-shrink: 0; }
.cbit-asst-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cbit-asst-submit {
	border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer;
	background: var(--cbit-red, #e0384f); color: #fff; font: 700 14px/1 'Plus Jakarta Sans', sans-serif;
}
.cbit-asst-submit:hover { filter: brightness(.95); }
.cbit-asst-submit:disabled { opacity: .6; cursor: progress; }
.cbit-asst-form-error { margin: 0; font-size: 12.5px; color: #c42a40; font-weight: 600; }
.cbit-asst-form-error:empty { display: none; }

.cbit-asst-input { display: flex; gap: 8px; padding: 10px 12px 6px; background: #fff; border-top: 1px solid #e8ebf2; }
.cbit-asst-input input {
	flex: 1; min-width: 0; border: 1px solid #dfe3ee; border-radius: 12px; padding: 11px 13px;
	font: 500 14.5px/1.3 'Plus Jakarta Sans', sans-serif; background: #f8f9fc; color: #1f2533;
}
.cbit-asst-input input:focus { outline: 2px solid var(--cbit-blue-accent, #7ea8e0); outline-offset: 0; background: #fff; border-color: transparent; }
.cbit-asst-send {
	width: 44px; flex-shrink: 0; border: 0; border-radius: 12px; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--cbit-navy, #0d1b3d); color: #fff;
}
.cbit-asst-send:hover { background: var(--cbit-navy-light, #24345e); }
.cbit-asst-foot { margin: 0; padding: 2px 12px 10px; background: #fff; text-align: center; font-size: 11px; color: #9aa1b3; }

@media (max-width: 560px) {
	.cbit-asst-launcher { right: 14px; bottom: 14px; height: 54px; padding: 0 16px 0 14px; }
	.cbit-asst-launcher-label { display: none; }
	.has-cbit-assistant #back-to-top { bottom: 80px; }
	.cbit-asst-panel { inset: 0; width: auto; height: auto; border-radius: 0; }
	body.cbit-asst-open { overflow: hidden; }
	.cbit-asst-input input { font-size: 16px; } /* stops iOS zooming into the field */
}

@media (prefers-reduced-motion: reduce) {
	.cbit-asst-panel, .cbit-asst-teaser, .cbit-asst-typing span { animation: none !important; }
	.cbit-asst-launcher { transition: none; }
}

@media print { .cbit-asst-launcher, .cbit-asst-panel, .cbit-asst-teaser { display: none !important; } }
