/* Общие стили виджета */
.mineralbot-wrap { width:100%; max-width:520px; border:1px solid #e6e6e6; border-radius:10px; overflow:hidden; font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
.mb-chat-header { background: linear-gradient(120deg,#2e7d32,#1b5e20); color:#fff; padding:10px 14px; font-weight:600; }
.mb-chat-log { background:#fafafa; min-height:320px; max-height:520px; overflow:auto; padding:12px; display:block; }
.mb-controls { display:flex; gap:8px; padding:10px; align-items:center; background:#fff; }
.mb-controls input[type="text"]#mb_input { flex:1; padding:10px 12px; border-radius:8px; border:1px solid #ddd; font-size:14px; }
.mb-controls button#mb_send { background:#2e7d32; color:white; border:none; padding:10px 14px; border-radius:8px; cursor:pointer; font-weight:600; }
.mb-image-btn { display:inline-block; background:#f5f5f5; border:1px dashed #ddd; padding:8px 10px; border-radius:8px; cursor:pointer; }
.mb-image-btn input[type="file"] { display:none; }

/* messages */
.mb-msg { margin:8px 0; max-width:86%; padding:8px 10px; border-radius:10px; box-shadow: 0 1px 0 rgba(0,0,0,0.02); word-break:break-word; }
.mb-msg.user { margin-left:auto; background: #e6f4ea; color:#054b2f; text-align:right; }
.mb-msg.bot { margin-right:auto; background:#fff; color:#111; border:1px solid #eee; }

/* typing indicator */
.mb-typing { display:flex; gap:6px; align-items:center; color:#666; font-style:italic; margin-top:6px; margin-bottom:6px; }
.mb-typing .dot { animation: typingDots 1s infinite; opacity:0; }
.mb-typing .dot:nth-child(2) { animation-delay:0.2s; }
.mb-typing .dot:nth-child(3) { animation-delay:0.4s; }
@keyframes typingDots { 0%,20%{opacity:0} 50%{opacity:1} 100%{opacity:0} }

/* product card */
.mb-card { border:1px solid #eee; padding:8px; border-radius:8px; margin:8px 0; background:#fff; display:flex; flex-direction:column; gap:6px; box-shadow:0 2px 6px rgba(0,0,0,0.03); }
.mb-card a { color:#0b6238; font-weight:700; text-decoration:none; }
.mb-price { color:#666; font-size:13px; }

/* image preview */
.mb-image-preview img { max-width:160px; border-radius:8px; border:1px solid #eee; display:block; margin-top:8px; }

/* small error */
.mb-error { color:#b00020; background:#fff5f6; padding:8px; border-radius:8px; border:1px solid #f3c6cc; }

/* admin dialog styles reused */
.mb-msg-admin { padding:10px; border-radius:8px; margin-bottom:10px; }
.mb-msg-user { background:#eaf7ff; border:1px solid #d4eefb; }
.mb-msg-bot { background:#f7f7f7; border:1px solid #eee; }

/* responsive */
@media (max-width:600px){ .mineralbot-wrap { max-width:100%; } .mb-card { width:100%; } }
