/* OSSOLA V3.8 — assistente mobile-first; conserva la grafica V3.7. */
.v38-launcher{position:fixed;right:16px;bottom:92px;z-index:450;background:linear-gradient(110deg,#008c9e,#00687d);border:2px solid #fff;color:white;box-shadow:0 9px 26px #092c4070;display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 17px;border-radius:999px;font-family:inherit;font-weight:700;font-size:13px;line-height:1.1;cursor:pointer;max-width:calc(100vw - 32px)}
.v38-launcher span:first-child{font-size:20px;color:#ceff41;line-height:1}
.v38-launcher:focus-visible,.v38-close:focus-visible,.v38-form button:focus-visible,.v38-suggestions button:focus-visible{outline:3px solid #cfff41;outline-offset:2px}
.v38-overlay{position:fixed;inset:0;z-index:9998;background:rgba(7,28,42,.58);display:flex;align-items:flex-end;justify-content:center;padding:12px}
.v38-overlay.hidden{display:none!important}
.v38-modal{background:#fff;border-radius:22px 22px 15px 15px;display:flex;flex-direction:column;width:min(100%,500px);max-height:min(740px,calc(100dvh - 24px));min-height:340px;overflow:hidden;box-shadow:0 22px 80px #06192580;color:#1b3443}
.v38-heading{display:flex;align-items:center;justify-content:space-between;padding:15px 18px 10px;background:linear-gradient(110deg,#007e94,#0b5269);color:white;gap:8px;flex-shrink:0}
.v38-heading h2{font-size:23px;margin:0;color:#fff}.v38-eyebrow{font-size:10px;letter-spacing:.12em;font-weight:700;color:#cbfc62}
.v38-close{border:1px solid #ffffff70;color:white;background:#ffffff1c;width:38px;height:38px;border-radius:12px;font-size:29px;line-height:1;cursor:pointer}
.v38-disclaimer{font-size:12px;line-height:1.5;padding:11px 17px;margin:0;background:#edf6f5;color:#3e5661}
.v38-status{font-size:11px;color:#37556a;padding:8px 16px;border-bottom:1px solid #e7eded;line-height:1.4}
.v38-messages{padding:14px;flex:1;min-height:100px;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:9px;background:#fbfdfd}
.v38-message{max-width:89%;font-size:14px;line-height:1.46;white-space:pre-wrap;overflow-wrap:anywhere;padding:11px 13px;border-radius:14px}
.v38-assistant{background:#edf5f6;align-self:flex-start;color:#163c4c;border-bottom-left-radius:5px}
.v38-user{background:#007e92;color:white;align-self:flex-end;border-bottom-right-radius:5px}
.v38-suggestions{display:flex;gap:6px;padding:8px 12px;overflow-x:auto;flex-shrink:0;scrollbar-width:thin}
.v38-suggestions button{background:#f0f7f7;border:1px solid #acd2d2;border-radius:100px;padding:8px 11px;font-size:11px;white-space:nowrap;color:#095565;cursor:pointer}
.v38-form{padding:9px 12px 4px;flex-shrink:0}.v38-label{display:block;font-size:11px;color:#344b53;font-weight:700;margin-bottom:5px}
.v38-input-row{display:flex;gap:7px;align-items:stretch}.v38-input-row input{flex:1;min-width:0;border:1px solid #b6d1d6;border-radius:10px;font-size:15px;padding:11px;outline-offset:2px;background:#fff;color:#1b3443}.v38-input-row button{border:0;background:#c8fa4c;border-radius:10px;color:#163a30;font-weight:800;padding:10px 14px;cursor:pointer}.v38-input-row button:disabled{opacity:.6}
.v38-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 13px max(8px,env(safe-area-inset-bottom));font-size:10px;color:#62717a}.v38-footer button{background:none;border:0;color:#087e91;font-weight:700;text-decoration:underline;cursor:pointer;padding:6px 0}
@media(min-width:760px){.v38-launcher{bottom:22px;right:24px}.v38-overlay{align-items:center}.v38-modal{border-radius:22px;height:650px}}
@media(max-width:390px){.v38-launcher{right:10px;bottom:84px;padding:10px 13px}.v38-modal{max-height:calc(100dvh - 16px)}.v38-heading h2{font-size:20px}}
@media (prefers-reduced-motion:reduce){.v38-overlay *, .v38-launcher{scroll-behavior:auto!important}}

/* V3.8.1 – feedback visible on mobile while saving drafts */
#hostNotice:not(.hidden){display:block;margin:8px 0 13px;padding:13px 14px;border:1px solid #b6e3d0;border-radius:13px;background:#e9f8f1;color:#174936;font-size:13px;line-height:1.48;overflow-wrap:anywhere}
#hostNotice.is-error:not(.hidden){border-color:#f1b9a8;background:#fff1ea;color:#8c3525}
#hostForm .ossola-host-invalid{border:2px solid #cf5847!important;background:#fff9f6!important;outline:none}

/* V3.8.2 – asterischi obbligatori, errore contestuale e scroll automatico */
#hostForm .ossola-required-star{display:inline;color:#dc252f;font-weight:900;font-size:1.17em;margin-left:2px}
#hostForm .ossola-required-star[hidden]{display:none!important}
#hostForm .ossola-field-error{color:#b72d35}
#hostForm .ossola-field-issue{display:block;margin:5px 0 9px;color:#b82732;font-size:12px;line-height:1.4;font-weight:700}
#hostForm .ossola-host-invalid{border:2px solid #d32e37!important;background:#fff8f8!important}
#hostForm label{scroll-margin-top:110px}

/* V3.8.3 — avviso CIN assente in revisione. */
.v383-warning{color:#b82b3b;font-weight:800}
