.swm-agent-root{position:fixed;right:20px;bottom:20px;z-index:99999;font-family:Inter,system-ui,-apple-system,'Helvetica Neue',Arial,sans-serif}

.swm-agent-bubble{width:60px;height:60px;border-radius:50%;background:#B5651D;border:1px solid #8C4C13;color:#FFFDF9;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;box-shadow:0 4px 14px rgba(26,29,33,0.18)}
.swm-agent-bubble:hover{background:#985416}
.swm-agent-bubble-icon{line-height:1;display:flex}

.swm-agent-panel{display:none;position:fixed;right:20px;bottom:92px;width:400px;max-width:calc(100vw - 32px);height:min(600px, calc(100vh - 120px));height:min(600px, calc(100dvh - 120px));background:#FBFAF7;border:1px solid #E2DCD0;border-radius:10px;flex-direction:column;overflow:hidden;box-shadow:0 12px 32px rgba(26,29,33,0.16)}
.swm-agent-open .swm-agent-panel{display:flex}
.swm-agent-open .swm-agent-bubble{display:none}

.swm-agent-header{background:#1A1D21;color:#FBFAF7;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
.swm-agent-header-title{font-weight:700;font-size:16px;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.swm-agent-header-actions{display:flex;align-items:center;gap:14px;flex-shrink:0}
.swm-agent-clear{background:none;border:none;color:#C9C4B8;font-size:12.5px;font-family:inherit;text-decoration:underline;cursor:pointer;padding:0;flex-shrink:0;white-space:nowrap}
.swm-agent-clear:hover{color:#DD8C42}
.swm-agent-close{background:none;border:none;color:#FBFAF7;font-size:24px;line-height:1;cursor:pointer;padding:0;flex-shrink:0}
.swm-agent-close:hover{color:#DD8C42}

.swm-agent-messages{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:14px;min-height:0}

.swm-agent-msg{max-width:88%;font-size:14.5px;line-height:1.55}
.swm-agent-msg--user{align-self:flex-end}
.swm-agent-msg--assistant{align-self:flex-start}
.swm-agent-bubble-text{white-space:pre-wrap;padding:10px 14px;border-radius:8px;word-break:break-word}
.swm-agent-msg--user .swm-agent-bubble-text{background:#1A1D21;color:#FBFAF7}
.swm-agent-msg--assistant .swm-agent-bubble-text{background:#F5F2EB;color:#1A1D21;border:1px solid #E2DCD0}
.swm-agent-bubble-text a{color:#B5651D;text-decoration:underline}
.swm-agent-bubble-text a:hover{color:#985416}
.swm-agent-msg--user .swm-agent-bubble-text a{color:#FBFAF7;text-decoration:underline}
.swm-agent-msg--user .swm-agent-bubble-text a:hover{color:#DD8C42}

.swm-agent-citations{margin-top:6px;display:flex;flex-direction:column;gap:2px;padding:0 2px}
.swm-agent-citation a{font-size:12.5px;color:#B5651D;text-decoration:underline}
.swm-agent-citation a:hover{color:#985416}

.swm-agent-typing{display:flex;align-items:center;gap:4px;padding:12px 14px}
.swm-agent-typing span{display:inline-block;width:6px;height:6px;border-radius:50%;background:#6E6859;animation:swm-agent-blink 1s infinite}
.swm-agent-typing span:nth-child(2){animation-delay:.15s}
.swm-agent-typing span:nth-child(3){animation-delay:.3s}
@keyframes swm-agent-blink{0%,80%,100%{opacity:.25}40%{opacity:1}}

.swm-agent-starters{padding:0 18px 12px;display:flex;flex-wrap:wrap;gap:8px;flex-shrink:0}
.swm-agent-starter{background:#F5F2EB;border:1px solid #B5651D;color:#1A1D21;border-radius:8px;padding:8px 12px;font-size:13px;font-family:inherit;cursor:pointer;text-align:left}
.swm-agent-starter:hover{background:#B5651D;color:#FFFDF9}

.swm-agent-input-row{display:flex;gap:8px;padding:14px;border-top:1px solid #E2DCD0;background:#FBFAF7;flex-shrink:0}
.swm-agent-input{flex:1;resize:none;border:1px solid #E2DCD0;border-radius:6px;padding:10px 12px;font-family:inherit;font-size:16px;color:#1A1D21;background:#fff;max-height:120px}
.swm-agent-input:focus{outline:2px solid #B5651D;outline-offset:-1px}
.swm-agent-send{background:#B5651D;color:#FFFDF9;border:none;border-radius:6px;padding:0 18px;font-weight:700;font-size:14px;cursor:pointer;flex-shrink:0}
.swm-agent-send:hover{background:#985416}

@media (max-width:640px){
  .swm-agent-panel{right:12px;left:12px;bottom:88px;width:auto;max-width:none;height:calc(100vh - 104px);height:calc(100dvh - 104px)}
  .swm-agent-root{right:12px;bottom:12px}
  .swm-agent-bubble{width:54px;height:54px}
}

@media (max-width:900px) and (min-width:641px){
  .swm-agent-panel{width:380px;height:min(560px, calc(100vh - 120px));height:min(560px, calc(100dvh - 120px))}
}

@media (hover:none) and (pointer:coarse){
  .swm-agent-starter{padding:10px 14px}
  .swm-agent-send{min-width:64px}
}
