/* Aigat AI asistents — widget styles */
#aigat-ai { --aigat-ai-color: #e4007c; position: fixed; bottom: 20px; z-index: 99990; font-family: inherit; font-size: 14px; line-height: 1.45; color: #222; }
#aigat-ai.aigat-ai-right { right: 20px; }
#aigat-ai.aigat-ai-left { left: 20px; }
#aigat-ai *, #aigat-ai *::before, #aigat-ai *::after { box-sizing: border-box; }

#aigat-ai .aigat-ai-bubble { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--aigat-ai-color); color: #fff; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.22); display: flex; align-items: center; justify-content: center; transition: transform .15s; padding: 0; }
#aigat-ai .aigat-ai-bubble:hover { transform: scale(1.06); }
#aigat-ai.aigat-ai-left .aigat-ai-bubble { margin-right: auto; }
#aigat-ai.aigat-ai-right .aigat-ai-bubble { margin-left: auto; }

#aigat-ai .aigat-ai-panel { position: absolute; bottom: 74px; width: 370px; max-width: calc(100vw - 24px); height: 540px; max-height: calc(100vh - 110px); background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
#aigat-ai .aigat-ai-panel[hidden] { display: none; }
#aigat-ai.aigat-ai-right .aigat-ai-panel { right: 0; }
#aigat-ai.aigat-ai-left .aigat-ai-panel { left: 0; }

#aigat-ai .aigat-ai-head { background: var(--aigat-ai-color); color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 6px; }
#aigat-ai .aigat-ai-title { flex: 1; font-weight: 600; font-size: 15px; }
#aigat-ai .aigat-ai-head button { background: transparent; border: 0; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; opacity: .85; }
#aigat-ai .aigat-ai-head button:hover { opacity: 1; }

#aigat-ai .aigat-ai-msgs { flex: 1; overflow-y: auto; padding: 14px; background: #f6f6f7; display: flex; flex-direction: column; gap: 10px; }
#aigat-ai .aigat-ai-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; word-wrap: break-word; }
#aigat-ai .aigat-ai-msg p { margin: 0 0 6px; }
#aigat-ai .aigat-ai-msg p:last-child { margin-bottom: 0; }
#aigat-ai .aigat-ai-msg ul { margin: 4px 0 6px; padding-left: 18px; }
#aigat-ai .aigat-ai-bot { align-self: flex-start; background: #fff; border: 1px solid #e6e6e9; border-bottom-left-radius: 4px; }
#aigat-ai .aigat-ai-user { align-self: flex-end; background: var(--aigat-ai-color); color: #fff; border-bottom-right-radius: 4px; }
#aigat-ai .aigat-ai-bot a { color: var(--aigat-ai-color); text-decoration: underline; }
#aigat-ai .aigat-ai-error { border-color: #f1b0b7; background: #fdf0f1; color: #a12030; }

#aigat-ai .aigat-ai-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
#aigat-ai .aigat-ai-card { display: flex; flex-direction: column; border: 1px solid #e6e6e9; border-radius: 8px; padding: 6px; text-decoration: none !important; color: #222 !important; background: #fff; }
#aigat-ai .aigat-ai-card:hover { border-color: var(--aigat-ai-color); }
#aigat-ai .aigat-ai-card img { width: 100%; aspect-ratio: 1; object-fit: contain; margin-bottom: 4px; }
#aigat-ai .aigat-ai-card-name { font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#aigat-ai .aigat-ai-card-price { font-weight: 700; font-size: 13px; margin-top: auto; padding-top: 3px; color: var(--aigat-ai-color); }
#aigat-ai .aigat-ai-card-price s { color: #999; font-weight: 400; }

#aigat-ai .aigat-ai-typing { display: flex; gap: 4px; padding: 12px 14px; }
#aigat-ai .aigat-ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: #aaa; animation: aigat-ai-dot 1.2s infinite ease-in-out; }
#aigat-ai .aigat-ai-typing span:nth-child(2) { animation-delay: .15s; }
#aigat-ai .aigat-ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aigat-ai-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

#aigat-ai .aigat-ai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; background: #fff; margin: 0; }
#aigat-ai .aigat-ai-form textarea { flex: 1; resize: none; border: 1px solid #ddd; border-radius: 10px; padding: 9px 11px; font: inherit; max-height: 110px; outline: none; }
#aigat-ai .aigat-ai-form textarea:focus { border-color: var(--aigat-ai-color); }
#aigat-ai .aigat-ai-form button { width: 42px; border: 0; border-radius: 10px; background: var(--aigat-ai-color); color: #fff; font-size: 17px; cursor: pointer; }
#aigat-ai .aigat-ai-form button:disabled { opacity: .5; cursor: default; }
#aigat-ai .aigat-ai-note { font-size: 11px; color: #888; text-align: center; padding: 0 10px 8px; background: #fff; }

@media (max-width: 480px) {
	#aigat-ai { bottom: 14px; }
	#aigat-ai.aigat-ai-right { right: 14px; }
	#aigat-ai.aigat-ai-left { left: 14px; }
	#aigat-ai.aigat-ai-open .aigat-ai-panel { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; bottom: 0; }
	#aigat-ai.aigat-ai-open .aigat-ai-bubble { display: none; }
}
