/* Assistente ricette — widget flottante.
   Il pulsante sta SOPRA quello dell'assistente prodotti (che occupa
   right:20/bottom:20 con 62px di lato): 20 + 62 + 12 di margine = 94. */

.flrec-launcher{position:fixed;right:20px;bottom:94px;width:62px;height:62px;border-radius:50%;border:none;background:#fff;color:#C0392B;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.25);z-index:99998;display:flex;align-items:center;justify-content:center;transition:transform .15s;padding:11px}
.flrec-launcher:hover{transform:scale(1.06)}
.flrec-launcher.flrec-hidden{display:none}
.flrec-chef{width:100%;height:100%;display:block}

.flrec-panel{position:fixed;right:20px;bottom:20px;width:400px;max-width:calc(100vw - 32px);height:580px;max-height:calc(100vh - 40px);background:#fff;border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.28);z-index:99999;display:none;flex-direction:column;overflow:hidden;font-family:inherit}
.flrec-panel.flrec-open{display:flex}

.flrec-head{display:flex;align-items:center;gap:8px;background:#C0392B;color:#fff;padding:12px 14px;font-weight:800}
.flrec-head .flrec-avatar{width:34px;height:34px;border-radius:50%;background:#fff;color:#C0392B;display:flex;align-items:center;justify-content:center;flex:0 0 auto;padding:6px}
.flrec-head .flrec-title{flex:1;font-size:1rem}
.flrec-head .flrec-close{background:none;border:none;color:#fff;font-size:24px;line-height:1;cursor:pointer;padding:0 4px}

.flrec-body{flex:1;overflow-y:auto;padding:14px;background:#faf8f5}
.flrec-msg{margin-bottom:12px;display:flex}
.flrec-user{justify-content:flex-end}
.flrec-bubble{max-width:88%;padding:10px 13px;border-radius:12px;font-size:.92rem;line-height:1.5;word-wrap:break-word;overflow-wrap:anywhere}
.flrec-bot .flrec-bubble{background:#fff;color:#222;border:1px solid #ece7e0;border-bottom-left-radius:4px}
.flrec-user .flrec-bubble{background:#C0392B;color:#fff;border-bottom-right-radius:4px}
.flrec-bubble a{color:#C0392B;text-decoration:underline}
.flrec-user .flrec-bubble a{color:#fff}

/* Markdown reso dal widget */
.flrec-bubble p{margin:0 0 .6em}
.flrec-bubble p:last-child{margin-bottom:0}
.flrec-bubble .flrec-h{font-weight:800;margin:.8em 0 .4em;font-size:.98rem;color:#8f2c20}
.flrec-bubble .flrec-h:first-child{margin-top:0}
.flrec-bubble ul,.flrec-bubble ol{margin:.2em 0 .7em;padding-left:1.3em}
.flrec-bubble li{margin:.22em 0}
.flrec-bubble strong{font-weight:700}

.flrec-dots{display:inline-flex;gap:3px;vertical-align:middle;margin-right:4px}
.flrec-dots span{width:6px;height:6px;border-radius:50%;background:#C0392B;opacity:.35;animation:flrecBlink 1.3s infinite}
.flrec-dots span:nth-child(2){animation-delay:.18s}
.flrec-dots span:nth-child(3){animation-delay:.36s}
@keyframes flrecBlink{0%,80%,100%{opacity:.25}40%{opacity:1}}

.flrec-foot{display:flex;gap:8px;padding:10px;border-top:1px solid #ece7e0;background:#fff}
.flrec-input{flex:1;resize:none;border:1px solid #ddd6cd;border-radius:10px;padding:9px 11px;font-family:inherit;font-size:.92rem;max-height:110px;outline:none}
.flrec-input:focus{border-color:#C0392B}
.flrec-send{border:none;background:#C0392B;color:#fff;border-radius:10px;width:44px;font-size:17px;cursor:pointer;flex:0 0 auto}
.flrec-send:disabled{opacity:.5;cursor:default}

@media (max-width:575px){
  .flrec-launcher{right:14px;bottom:82px;width:54px;height:54px;padding:9px}
  .flrec-panel{right:8px;bottom:8px;width:calc(100vw - 16px);height:calc(100vh - 16px);max-height:calc(100vh - 16px)}
}
