/* LINEACRAFT – assistant IA */
.lc-ai { --ai-ink: #15211d; --ai-acc: #b8864b; --ai-bg: #fff; --ai-soft: #f4f1ec; font-family: inherit; }
.lc-ai__fab {
	position: fixed; bottom: 88px; inset-inline-end: 20px; z-index: 9998;
	width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--ai-ink); color: #fff; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .22); transition: transform .2s;
}
.lc-ai__fab:hover { transform: scale(1.06); }
.lc-ai__fab:focus-visible { outline: 3px solid var(--ai-acc); outline-offset: 3px; }
.lc-ai__tip {
	position: absolute; inset-inline-end: 66px; top: 50%; transform: translateY(-50%);
	background: #fff; color: var(--ai-ink); font-size: 14px; line-height: 1.3; white-space: nowrap;
	padding: 9px 13px; border-radius: 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
	opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lc-ai.show-tip .lc-ai__tip, .lc-ai__fab:hover .lc-ai__tip { opacity: 1; }
.lc-ai.is-open .lc-ai__tip { display: none; }
.lc-ai__panel {
	position: fixed; bottom: 156px; inset-inline-end: 20px; z-index: 10000;
	width: 370px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 180px);
	background: var(--ai-bg); color: var(--ai-ink); border-radius: 16px; overflow: hidden;
	box-shadow: 0 16px 48px rgba(0, 0, 0, .25); display: flex; flex-direction: column;
}
.lc-ai__panel[hidden] { display: none; }
.lc-ai__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--ai-ink); color: #fff; }
.lc-ai__head strong { display: block; font-size: 15px; }
.lc-ai__head small { display: block; font-size: 12px; opacity: .75; }
.lc-ai__close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.lc-ai__log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--ai-soft); }
.lc-ai__msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.lc-ai__msg--bot { align-self: flex-start; background: #fff; border-end-start-radius: 4px; }
.lc-ai__msg--me { align-self: flex-end; background: var(--ai-ink); color: #fff; border-end-end-radius: 4px; }
.lc-ai__msg a { color: #8a5a22; text-decoration: underline; font-weight: 600; }
.lc-ai__msg.is-typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: #9aa39f; animation: lc-ai-dot 1s infinite; }
.lc-ai__msg.is-typing span:nth-child(2) { animation-delay: .15s; }
.lc-ai__msg.is-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes lc-ai-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.lc-ai__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; background: var(--ai-soft); }
.lc-ai__chips:not(:empty) { padding-bottom: 10px; }
.lc-ai__chips button { border: 1px solid var(--ai-acc); background: #fff; color: var(--ai-ink); border-radius: 999px; padding: 6px 11px; font-size: 13px; cursor: pointer; }
.lc-ai__chips button:hover { background: var(--ai-acc); color: #fff; }
.lc-ai__form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid #e6e1d8; }
.lc-ai__form textarea { flex: 1; resize: none; border: 1px solid #d6d0c6; border-radius: 12px; padding: 9px 11px; font: inherit; font-size: 14px; line-height: 1.35; max-height: 110px; min-height: 40px; }
.lc-ai__form textarea:focus { outline: 2px solid var(--ai-acc); border-color: transparent; }
.lc-ai__form button { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ai-acc); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
html[dir="rtl"] .lc-ai__form button svg { transform: scaleX(-1); }
.lc-ai__foot { padding: 0 12px 10px; text-align: center; }
.lc-ai__human { display: inline-block; font-size: 13px; font-weight: 600; color: #128c4a; margin-bottom: 4px; }
.lc-ai__foot p { margin: 0; font-size: 11px; line-height: 1.35; color: #7a7f7c; }
@media (max-width: 520px) {
	.lc-ai__panel { inset: auto 8px 8px 8px; width: auto; max-width: none; height: calc(100dvh - 16px); max-height: none; }
	.lc-ai__fab { bottom: 86px; inset-inline-end: 20px; }
	.lc-ai__tip { white-space: normal; width: 180px; }
}
