/* Jay assistant widget */
.jay { --j-navy: #0B1F33; --j-teal: #00D1B2; font-family: "Inter", system-ui, sans-serif; }
.jay-launch { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border-radius: 999px; border: 0; cursor: pointer; background: var(--j-teal); color: var(--j-navy); font: 600 .95rem/1 "Inter", sans-serif; box-shadow: 0 10px 30px rgba(0,60,60,.35), 0 0 0 6px rgba(0,209,178,.15); transition: transform .15s; }
.jay-launch:hover { transform: translateY(-2px); }
.jay-launch svg { width: 22px; height: 22px; }
.jay.open .jay-launch { display: none; }
.jay-panel { padding: 0; margin: 0; position: fixed; right: 20px; bottom: 20px; z-index: 91; width: 390px; height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 70px rgba(11,31,51,.35); border: 1px solid rgba(11,31,51,.08); }
.jay-panel[hidden] { display: none; }
.jay-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; background: var(--j-navy); color: #fff; }
.jay-avatar { width: 38px; height: 38px; border-radius: 10px; background: #0F2A44; display: grid; place-items: center; border: 1px solid rgba(0,209,178,.35); }
.jay-avatar img { width: 24px; height: 24px; }
.jay-id { flex: 1; display: grid; line-height: 1.25; }
.jay-id strong { font-family: "Montserrat", sans-serif; font-size: 1rem; }
.jay-id small { color: #9DB0C6; font-size: .75rem; display: flex; align-items: center; gap: 6px; }
.jay-dot { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.jay-dot.off { background: #00D1B2; box-shadow: 0 0 0 3px rgba(0,209,178,.2); }
.jay-icon { background: none; border: 0; color: #9DB0C6; cursor: pointer; padding: 6px; border-radius: 8px; }
.jay-icon:hover { color: #fff; background: rgba(255,255,255,.08); }
.jay-icon svg { width: 18px; height: 18px; }
.jay-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; background: #F5F8FA; }
.jay-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: .9rem; line-height: 1.5; color: #1B2A3A; word-wrap: break-word; }
.jay-msg p { margin: 0 0 .5em; } .jay-msg p:last-child { margin: 0; }
.jay-msg ul { margin: .2em 0 .5em; padding-left: 1.1em; } .jay-msg li { margin: .15em 0; }
.jay-msg a { color: #00897A; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.jay-msg code { background: rgba(11,31,51,.06); padding: 1px 5px; border-radius: 4px; font-size: .85em; }
.jay-msg.bot { background: #fff; border: 1px solid #E1E7EE; border-bottom-left-radius: 4px; align-self: flex-start; }
.jay-msg.me { background: var(--j-navy); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.jay-msg.typing { display: flex; gap: 4px; padding: 14px; }
.jay-msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: #9DB0C6; animation: jayb 1s infinite; }
.jay-msg.typing span:nth-child(2) { animation-delay: .15s; } .jay-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes jayb { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.jay-sugs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; background: #F5F8FA; }
.jay-sugs:empty { display: none; }
.jay-sugs button { font: 500 .8rem "Inter", sans-serif; padding: 7px 11px; border-radius: 999px; border: 1px solid rgba(0,209,178,.55); background: #fff; color: #0B5F56; cursor: pointer; text-align: left; }
.jay-sugs button:hover { background: #E8FAF6; }
.jay-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid #E1E7EE; background: #fff; }
.jay-form textarea { flex: 1; resize: none; border: 1px solid #CBD5E1; border-radius: 12px; padding: 10px 12px; font: .92rem/1.4 "Inter", sans-serif; max-height: 120px; min-height: 0; color: #1B2A3A; }
.jay-form textarea:focus { outline: none; border-color: var(--j-teal); box-shadow: 0 0 0 3px rgba(0,209,178,.18); }
.jay-form button { flex: none; width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--j-teal); color: var(--j-navy); cursor: pointer; display: grid; place-items: center; }
.jay-form button svg { width: 20px; height: 20px; }
.jay-foot { margin: 0; padding: 0 12px 10px; font-size: .7rem; color: #7A8A9C; text-align: center; background: #fff; }
.jay-foot a { color: #00897A; }
@media (max-width: 520px) {
  .jay-panel { right: 0; bottom: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
  .jay-launch { right: 14px; bottom: 14px; }
  .jay-launch span { display: none; }
  .jay-launch { padding: 14px; }
}
.jay-settings { position: fixed; left: 16px; bottom: 16px; z-index: 95; width: 300px; background: #0B1F33; color: #E8EEF5; border-radius: 14px; padding: 16px; font: .82rem "Inter", sans-serif; box-shadow: 0 20px 50px rgba(0,0,0,.4); display: grid; gap: 8px; }
.jay-settings h4 { margin: 0 0 4px; color: #fff; font-size: .9rem; } .jay-settings h4 small { color: #9DB0C6; font-weight: 400; }
.jay-settings label { color: #C6D3E2; font-size: .75rem; display: grid; gap: 4px; }
.jay-settings input, .jay-settings select { padding: 7px 9px; border-radius: 8px; border: 1px solid rgba(255,255,255,.15); background: #0F2A44; color: #fff; font-size: .82rem; }
.jay-settings .row { display: flex; gap: 8px; }
.jay-settings button { flex: 1; padding: 8px; border-radius: 8px; border: 0; cursor: pointer; font-weight: 600; }
.jay-settings .save { background: #00D1B2; color: #0B1F33; } .jay-settings .clear { background: rgba(255,255,255,.1); color: #fff; }
.jay-settings p { margin: 0; color: #9DB0C6; font-size: .72rem; }

/* Jay — dark theme */
:root[data-theme="dark"] .jay-panel { background: #0B1828; border-color: rgba(255,255,255,.1); box-shadow: 0 24px 70px rgba(0,0,0,.6); }
:root[data-theme="dark"] .jay-head { background: #07111D; border-bottom: 1px solid rgba(255,255,255,.08); }
:root[data-theme="dark"] .jay-log, :root[data-theme="dark"] .jay-sugs { background: #0B1828; }
:root[data-theme="dark"] .jay-msg { color: #D3DDE8; }
:root[data-theme="dark"] .jay-msg.bot { background: #12263C; border-color: rgba(255,255,255,.08); }
:root[data-theme="dark"] .jay-msg.me { background: #00B89C; color: #04121F; }
:root[data-theme="dark"] .jay-msg a { color: #3FE6CB; }
:root[data-theme="dark"] .jay-msg.me a { color: #04121F; }
:root[data-theme="dark"] .jay-msg code { background: rgba(255,255,255,.08); }
:root[data-theme="dark"] .jay-sugs button { background: transparent; color: #3FE6CB; border-color: rgba(0,209,178,.45); }
:root[data-theme="dark"] .jay-sugs button:hover { background: rgba(0,209,178,.1); }
:root[data-theme="dark"] .jay-form, :root[data-theme="dark"] .jay-foot { background: #0B1828; border-color: rgba(255,255,255,.08); }
:root[data-theme="dark"] .jay-form textarea { background: #07111D; border-color: rgba(255,255,255,.16); color: #E8EEF5; }
:root[data-theme="dark"] .jay-foot { color: #7F92A6; }
:root[data-theme="dark"] .jay-foot a { color: #3FE6CB; }
