.id-agent-r2-launch {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: #17243b;
  color: #fff;
  font: 700 15px system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 26px rgb(20 34 51 / 24%);
}
.id-agent-r2 {
  --chatbox-height: 680px;
  --chatbox-top-gap: 16px;
  --chatbox-bottom-gap: 16px;
  box-sizing: border-box;
  width: min(460px, calc(100vw - 24px));
  height: min(var(--chatbox-height), calc(100vh - var(--chatbox-top-gap) - var(--chatbox-bottom-gap)));
  height: min(var(--chatbox-height), calc(100dvh - var(--chatbox-top-gap) - var(--chatbox-bottom-gap)));
  max-height: none;
  margin: auto 16px var(--chatbox-bottom-gap) auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce4ee;
  border-radius: 16px;
  background: #fff;
  color: #17243b;
  font: 14px/1.5 system-ui, sans-serif;
  box-shadow: 0 16px 52px rgb(20 34 51 / 20%);
}
.id-agent-r2[open] { display: flex; flex-direction: column; }
@media (max-width: 600px), (max-height: 480px) {
  .id-agent-r2 {
    --chatbox-height: 100vh;
    --chatbox-top-gap: max(8px, env(safe-area-inset-top, 0px));
    --chatbox-bottom-gap: max(8px, env(safe-area-inset-bottom, 0px));
  }
}
.id-agent-r2::backdrop { background: rgb(23 36 59 / 18%); }
.id-agent-r2 [hidden] { display: none !important; }
.id-agent-r2 header, .id-agent-r2 section, .id-agent-r2 summary { padding: 12px 16px; }
.id-agent-r2 header, .id-agent-r2 details { border-bottom: 1px solid #e4ebf3; }
.id-agent-r2 > details { max-height: min(40%, 220px); overflow: auto; overscroll-behavior: contain; }
.id-agent-r2:has(> [data-agent-webchat][hidden]) > details { flex: 1 1 auto; max-height: none; }
.id-agent-r2 summary { cursor: pointer; font-weight: 600; }
.id-agent-r2 [data-agent-webchat] { flex: 1 1 0; min-height: 0; padding: 0; }
.id-agent-r2 [data-agent-webchat-status] { margin: 0; padding: 8px 16px; color: #526881; }
.id-agent-r2 [data-agent-chat-actions] { flex-shrink: 0; display: flex; justify-content: flex-end; padding: 6px 12px; border-top: 1px solid #e4ebf3; }
.id-agent-r2 [data-agent-shortcuts] { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.id-agent-r2 header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; }
.id-agent-r2 header strong { font-size: 16px; }
.id-agent-r2 [data-agent-links], .id-agent-r2 form > div { display: flex; gap: 8px; flex-wrap: wrap; }
.id-agent-r2 button, .id-agent-r2 a {
  padding: 6px 10px;
  border: 1px solid #d2deed;
  border-radius: 8px;
  background: #fff;
  color: #17243b;
  cursor: pointer;
  font: inherit;
}
.id-agent-r2 button[type="submit"] { background: #17243b; color: white; }
.id-agent-r2 textarea { box-sizing: border-box; width: 100%; min-height: 76px; margin: 8px 0; padding: 8px; border: 1px solid #d2deed; border-radius: 8px; font: inherit; resize: vertical; }
.id-agent-r2 [data-agent-answer] { max-height: 34vh; overflow: auto; white-space: pre-wrap; }
.id-agent-r2 [data-agent-evidence], .id-agent-r2 [data-agent-links] { margin: 6px 0; color: #526881; }
.id-agent-r2 iframe { display: block; width: 100%; height: 100%; border: 0; }

.id-agent-r2 [data-agent-tools] { margin: 0 0 12px; }
.id-agent-r2 [data-agent-tool-buttons] { display: flex; flex-wrap: wrap; gap: 6px; }
.id-agent-r2 [data-agent-tool-buttons] button { padding: 5px 9px; }
.id-agent-r2 [data-agent-domain-form] { margin-top: 8px; }
.id-agent-r2 [data-agent-domain-form] input { flex: 1 1 140px; min-width: 0; padding: 6px 8px; border: 1px solid #d2deed; border-radius: 8px; font: inherit; }
.id-agent-r2 button:disabled { cursor: wait; opacity: .65; }
