/* Maatilatukku.fi AI-chat -ikkuna */
#mtt-aichat{position:fixed;right:16px;bottom:16px;z-index:9999;font-family:inherit;font-size:15px;line-height:1.4}
#mtt-aichat *{box-sizing:border-box}
#mtt-aichat .mtt-ac-bubble{display:flex;align-items:center;gap:8px;padding:12px 16px;border:0;border-radius:24px;background:#2e7d32;color:#fff;font-weight:bold;font-size:15px;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.25)}
#mtt-aichat .mtt-ac-bubble:hover{background:#1b5e20}
#mtt-aichat.mtt-ac-open .mtt-ac-bubble{display:none}
#mtt-aichat .mtt-ac-panel{width:370px;max-width:calc(100vw - 32px);height:540px;max-height:calc(100vh - 32px);display:flex;flex-direction:column;background:#fff;color:#222;border-radius:10px;box-shadow:0 8px 30px rgba(0,0,0,.3);overflow:hidden}
#mtt-aichat .mtt-ac-panel[hidden]{display:none}
#mtt-aichat .mtt-ac-head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:#2e7d32;color:#fff}
#mtt-aichat .mtt-ac-head button{background:none;border:0;color:#fff;font-size:20px;line-height:1;cursor:pointer;padding:2px 6px;margin-left:4px}
#mtt-aichat .mtt-ac-log{flex:1;overflow-y:auto;padding:12px;background:#f5f7f5}
#mtt-aichat .mtt-ac-msg{max-width:88%;margin:0 0 10px;padding:8px 11px;border-radius:10px;word-wrap:break-word;overflow-wrap:anywhere}
#mtt-aichat .mtt-ac-msg p{margin:0 0 4px}
#mtt-aichat .mtt-ac-msg p:last-child{margin:0}
#mtt-aichat .mtt-ac-msg ul{margin:4px 0;padding-left:18px}
#mtt-aichat .mtt-ac-bot{background:#fff;border:1px solid #dde3dd}
#mtt-aichat .mtt-ac-bot a{color:#1b5e20;text-decoration:underline}
#mtt-aichat .mtt-ac-user{margin-left:auto;background:#2e7d32;color:#fff}
#mtt-aichat .mtt-ac-wait{color:#777;font-style:italic}
#mtt-aichat .mtt-ac-form{display:flex;gap:6px;padding:8px;border-top:1px solid #dde3dd;background:#fff}
#mtt-aichat .mtt-ac-form textarea{flex:1;resize:none;border:1px solid #bbb;border-radius:6px;padding:7px 9px;font:inherit;font-size:16px;min-height:42px}
#mtt-aichat .mtt-ac-form button{border:0;border-radius:6px;background:#2e7d32;color:#fff;font-weight:bold;padding:0 14px;cursor:pointer}
#mtt-aichat .mtt-ac-form button:disabled{opacity:.6;cursor:default}
#mtt-aichat .mtt-ac-foot{padding:6px 10px 8px;font-size:12px;color:#666;background:#fff}
#mtt-aichat .mtt-ac-foot a{color:#1b5e20}
@media (max-width:600px){
  #mtt-aichat{right:12px;bottom:12px}
  #mtt-aichat.mtt-ac-open{left:0;right:0;top:0;bottom:0}
  #mtt-aichat .mtt-ac-panel{width:100%;max-width:none;height:100%;max-height:none;border-radius:0}
}
@media print{#mtt-aichat{display:none}}
