/* ScribeNova AI assistant: isolated namespace to avoid site layout collisions. */
.snova-root, .snova-root * { box-sizing: border-box; }
.snova-root { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 88; font-family: Inter, "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #0f172a; pointer-events: none; }
.snova-root.is-open { bottom: max(16px, env(safe-area-inset-bottom)); }
.snova-launcher { display: inline-grid; place-items: center; border: 1px solid rgba(88,230,180,.34); border-radius: 999px; background: radial-gradient(circle at 12% 0%, rgba(255,255,255,.24), transparent 38%), linear-gradient(135deg, #06182f 0%, #0f766e 54%, #10b981 100%); color: #fff; box-shadow: 0 18px 46px -24px rgba(2, 6, 23, .78); padding: 0; cursor: pointer; width: 52px; height: 52px; min-width: 52px; min-height: 52px; max-width: 52px; max-height: 52px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; pointer-events: auto; touch-action: manipulation; }
.snova-launcher:hover, .snova-launcher:focus-visible { transform: translateY(-2px) scale(1.03); box-shadow: 0 24px 60px -28px rgba(2, 6, 23, .85); outline: none; filter: saturate(1.05); }
.snova-launcher-icon { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.16); position: relative; overflow: hidden; flex: 0 0 auto; }
.snova-launcher-icon::after { content: ""; position: absolute; inset: -35%; background: conic-gradient(from 90deg, transparent, rgba(255,255,255,.55), transparent 42%); animation: snova-spin 3.6s linear infinite; }
.snova-launcher-icon svg { position: relative; z-index: 1; width: 22px; height: 22px; }
.snova-launcher-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.snova-launcher-text small { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; opacity: .86; font-weight: 900; white-space: nowrap; }
.snova-launcher-text strong { font-size: .96rem; line-height: 1.15; font-weight: 950; white-space: nowrap; }
.snova-launcher-text em { font-style: normal; color: rgba(255,255,255,.86); font-size: .72rem; line-height: 1.2; max-width: 290px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snova-panel { width: min(470px, calc(100vw - 32px)); height: min(720px, calc(100vh - 112px)); display: none; flex-direction: column; overflow: hidden; border-radius: 28px; border: 1px solid rgba(226,232,240,.95); background: rgba(255,255,255,.97); box-shadow: 0 30px 100px -40px rgba(2,6,23,.75); backdrop-filter: blur(18px); transform-origin: bottom left; pointer-events: auto; }
.snova-root.is-open .snova-panel { display: flex; animation: snova-pop .22s ease both; }
.snova-root.is-open .snova-launcher { display: none; }
.snova-header { padding: 1rem; color: #fff; background: radial-gradient(circle at 18% 0%, rgba(88,230,180,.42), transparent 36%), linear-gradient(135deg, #06182f 0%, #09213f 62%, #0f766e 100%); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; }
.snova-mark { width: 46px; height: 46px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); flex: 0 0 auto; }
.snova-mark svg { width: 25px; height: 25px; }
.snova-title { display: grid; gap: .1rem; min-width: 0; }
.snova-title strong { font-size: 1.04rem; line-height: 1.15; font-weight: 950; }
.snova-title span { color: rgba(226,232,240,.9); font-size: .76rem; line-height: 1.25; overflow-wrap: anywhere; }
.snova-head-actions { display: flex; align-items: center; gap: .35rem; }
.snova-icon-btn { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.1); color: #fff; border-radius: 999px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.snova-icon-btn svg { width: 18px; height: 18px; }
.snova-icon-btn:hover, .snova-icon-btn:focus-visible { background: rgba(255,255,255,.18); outline: none; }
.snova-modebar { display: flex; gap: .45rem; padding: .7rem .85rem; overflow-x: auto; border-bottom: 1px solid #e2e8f0; background: #f8fafc; scrollbar-width: thin; }
.snova-chip { flex: 0 0 auto; border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 999px; padding: .48rem .68rem; font-weight: 850; font-size: .74rem; cursor: pointer; white-space: nowrap; }
.snova-chip:hover { border-color: #14b8a6; background: #ecfdf5; }
.snova-chip[aria-pressed="true"] { background: #06182f; border-color: #06182f; color: #fff; }
.snova-controlbar { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; padding: .68rem .85rem; border-bottom: 1px solid #e2e8f0; background: #fff; }
.snova-controlbar label { display: grid; gap: .22rem; color: #475569; font-size: .7rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.snova-select { width: 100%; border: 1px solid #cbd5e1; border-radius: 12px; background: #f8fafc; color: #0f172a; padding: .48rem .55rem; font: inherit; font-size: .78rem; font-weight: 850; outline: none; }
.snova-select:focus { border-color: #14b8a6; box-shadow: 0 0 0 3px rgba(20,184,166,.12); background: #fff; }
.snova-messages { flex: 1; overflow: auto; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); }
.snova-msg { max-width: 94%; border-radius: 18px; padding: .78rem .9rem; font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; word-break: normal; white-space: normal; }
.snova-msg p { margin: 0 0 .62rem; }
.snova-msg p:last-child { margin-bottom: 0; }
.snova-msg-user { align-self: flex-end; color: #fff; background: linear-gradient(135deg, #0f766e, #10b981); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.snova-msg-ai { align-self: flex-start; background: #fff; border: 1px solid #e2e8f0; color: #0f172a; border-bottom-left-radius: 6px; box-shadow: 0 18px 50px -42px rgba(2,6,23,.55); }
.snova-thinking { display: inline-flex; align-items: center; gap: .32rem; }
.snova-dot { width: .42rem; height: .42rem; border-radius: 999px; background: #0f766e; animation: snova-bounce 1.05s infinite ease-in-out; }
.snova-dot:nth-child(2) { animation-delay: .15s; }
.snova-dot:nth-child(3) { animation-delay: .3s; }
.snova-quick { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .65rem; }
.snova-quick button { border: 1px solid #dbeafe; background: #eff6ff; color: #0f172a; border-radius: 14px; padding: .58rem .64rem; text-align: left; font-weight: 850; font-size: .75rem; cursor: pointer; line-height: 1.25; min-height: 48px; }
.snova-quick button:hover, .snova-quick button:focus-visible { border-color: #99f6e4; background: #ecfdf5; outline: none; }
.snova-composer { border-top: 1px solid #e2e8f0; padding: .8rem; background: #fff; }
.snova-upload-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .55rem; }
.snova-attach { border: 1px dashed #cbd5e1; background: #f8fafc; color: #334155; border-radius: 999px; padding: .45rem .7rem; font-size: .74rem; font-weight: 850; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; flex: 0 0 auto; }
.snova-attach svg { width: 16px; height: 16px; }
.snova-attach:hover { background: #ecfdf5; border-color: #5eead4; }
.snova-status { color: #64748b; font-size: .72rem; text-align: right; line-height: 1.25; max-width: 58%; overflow-wrap: anywhere; }
.snova-form { display: grid; grid-template-columns: 1fr auto; gap: .55rem; align-items: end; }
.snova-input { width: 100%; min-height: 56px; max-height: 156px; resize: none; border: 1px solid #cbd5e1; border-radius: 18px; padding: .84rem .92rem; font: inherit; font-size: .9rem; line-height: 1.42; outline: none; background: #f8fafc; color: #0f172a; }
.snova-input:focus { border-color: #14b8a6; box-shadow: 0 0 0 4px rgba(20,184,166,.12); background: #fff; }
.snova-send { width: 56px; height: 56px; border: 0; border-radius: 18px; background: linear-gradient(135deg,#0f766e,#10b981); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 18px 38px -22px rgba(15,118,110,.85); }
.snova-send:disabled { opacity: .58; cursor: wait; box-shadow: none; }
.snova-send svg { width: 24px; height: 24px; }
.snova-cta { display: flex; justify-content: space-between; gap: .5rem; margin-top: .6rem; font-size: .74rem; }
.snova-cta a { color: #0f766e; font-weight: 900; text-decoration: none; }
.snova-cta a:hover { text-decoration: underline; }
.snova-sr, .snova-honey { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0; pointer-events: none; }
@keyframes snova-spin { to { transform: rotate(360deg); } }
@keyframes snova-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes snova-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }
@media (max-width: 900px) {
  .snova-root { left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); right: auto; }
  .snova-launcher { width: 48px; height: 48px; min-width: 48px; min-height: 48px; max-width: 48px; max-height: 48px; box-shadow: 0 16px 38px -24px rgba(2,6,23,.82); }
  .snova-launcher-icon { width: 39px; height: 39px; }
  .snova-launcher-icon svg { width: 20px; height: 20px; }
}
@media (max-width: 640px) {
  .snova-root.is-open { left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); }
  .snova-panel { width: 100%; height: min(740px, calc(100vh - 24px)); border-radius: 24px; }
  .snova-title span { font-size: .72rem; }
  .snova-header { grid-template-columns: auto 1fr; }
  .snova-head-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .snova-controlbar { grid-template-columns: 1fr; }
  .snova-quick { grid-template-columns: 1fr; }
  .snova-status { max-width: 50%; }
}
@media (max-width: 380px) {
  .snova-root { bottom: max(10px, env(safe-area-inset-bottom)); }
  .snova-launcher { width: 44px; height: 44px; min-width: 44px; min-height: 44px; max-width: 44px; max-height: 44px; }
  .snova-launcher-icon { width: 35px; height: 35px; }
  .snova-launcher-icon svg { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .snova-launcher, .snova-panel, .snova-dot, .snova-launcher-icon::after { animation: none !important; transition: none !important; }
}

/* Permanent layout separation: ScribeNova bottom-left, WhatsApp bottom-right. */
.snova-root { left:max(16px, env(safe-area-inset-left)); right:auto; bottom:max(16px, env(safe-area-inset-bottom)); }
@media(max-width:640px){ .snova-root { left:max(12px, env(safe-area-inset-left)); right:auto; bottom:max(12px, env(safe-area-inset-bottom)); } .snova-root.is-open{ left:10px; right:10px; bottom:max(10px, env(safe-area-inset-bottom)); } }
