.ap-talker-modal-host[hidden]{ display:none !important; }
.ap-talker-shell{
  position:fixed;
  top:calc(var(--ap-top-chrome-height, 3.5rem) + 8px);
  right:24px;
  bottom:auto;
  left:auto;
  z-index:1055;
  box-sizing:border-box;
  width:min(25rem, calc(100vw - 24px));
  padding:0;
  background:transparent;
  pointer-events:none;
}
.ap-talker-dialog{
  display:flex;
  flex-direction:column;
  width:100%;
  height:min(36rem,calc(100vh - var(--ap-top-chrome-height,3.5rem) - 20px));
  min-height:22rem;
  overflow:hidden;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,.12);
  color:#0f172a;
  pointer-events:auto;
}
.ap-talker-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:62px;
  padding:12px 16px;
  border-bottom:1px solid #e5e7eb;
}
.ap-talker-title-wrap{ min-width:0; }
.ap-talker-title{
  margin:0;
  overflow:hidden;
  color:#0f172a;
  font-size:1.05rem;
  font-weight:800;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ap-talker-subtitle{
  margin:2px 0 0;
  color:#64748b;
  font-size:.78rem;
  line-height:1.3;
}
.ap-talker-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.ap-talker-button,
.ap-talker-close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 12px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
  color:#0f172a !important;
  font-size:.82rem;
  font-weight:750;
  text-decoration:none !important;
  cursor:pointer;
}
.ap-talker-button--primary{
  border-color:#0f172a;
  background:#0f172a;
  color:#fff !important;
}
.ap-talker-close{
  width:36px;
  padding:0;
  border-radius:999px;
}
.ap-talker-button:hover,
.ap-talker-button:focus-visible,
.ap-talker-close:hover,
.ap-talker-close:focus-visible{
  background:#f1f5f9;
  outline:none;
}
.ap-talker-button--primary:hover,
.ap-talker-button--primary:focus-visible{ background:#1e293b; }
.ap-talker-body{
  display:grid;
  grid-template-columns:1fr;
  grid-template-rows:minmax(10rem,1fr) minmax(10rem,1fr);
  flex:1 1 auto;
  min-height:0;
}
.ap-talker-pane{
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
}
.ap-talker-pane--conversations{ border-bottom:1px solid #e5e7eb; }
.ap-talker-pane-head{
  padding:14px;
  border-bottom:1px solid #e5e7eb;
}
.ap-talker-pane-title{
  margin:0 0 9px;
  color:#0f172a;
  font-size:.82rem;
  font-weight:800;
}
.ap-talker-search,
.ap-talker-select,
.ap-talker-textarea{
  box-sizing:border-box;
  width:100%;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
  color:#0f172a;
  font:inherit;
  font-size:.85rem;
  outline:none;
}
.ap-talker-search,
.ap-talker-select{ height:40px; padding:0 12px; }
.ap-talker-textarea{ min-height:104px; padding:10px 12px; resize:vertical; }
.ap-talker-search:focus,
.ap-talker-select:focus,
.ap-talker-textarea:focus{
  border-color:#3f6f98;
  box-shadow:0 0 0 2px rgba(63,111,152,.14);
}
.ap-talker-scroll{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:8px;
}
.ap-talker-conversation,
.ap-talker-person{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-radius:9px;
  color:#0f172a !important;
  text-decoration:none !important;
}
.ap-talker-conversation:hover,
.ap-talker-conversation:focus-visible,
.ap-talker-person:hover,
.ap-talker-person:focus-visible{
  background:#f1f5f9;
  outline:none;
}
.ap-talker-avatar{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 38px;
  width:38px;
  height:38px;
  border-radius:999px;
  background:#edf3f8;
  color:#3f6f98;
  font-size:.88rem;
  font-weight:800;
}
.ap-talker-row-main{ min-width:0; flex:1 1 auto; }
.ap-talker-row-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.ap-talker-row-name{
  overflow:hidden;
  font-size:.86rem;
  font-weight:800;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ap-talker-row-time{
  flex:0 0 auto;
  color:#64748b;
  font-size:.68rem;
  white-space:nowrap;
}
.ap-talker-row-preview{
  margin-top:2px;
  overflow:hidden;
  color:#64748b;
  font-size:.76rem;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ap-talker-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:#0f172a;
  color:#fff;
  font-size:.66rem;
  font-weight:800;
}
.ap-talker-online{
  display:inline-block;
  flex:0 0 8px;
  width:8px;
  height:8px;
  border:2px solid #fff;
  border-radius:999px;
  background:#22c55e;
}
.ap-talker-empty{
  margin:8px;
  padding:16px;
  border:1px dashed #cbd5e1;
  border-radius:9px;
  color:#64748b;
  font-size:.82rem;
}
.ap-talker-people-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:9px;
}
.ap-talker-people-count{ color:#64748b; font-size:.74rem; }
.ap-talker-role{
  color:#64748b;
  font-size:.7rem;
  font-weight:700;
}
.ap-talker-thread-body{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
}
.ap-talker-thread-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:18px;
}
.ap-talker-message{ max-width:min(72%,42rem); }
.ap-talker-message.is-own{ align-self:flex-end; }
.ap-talker-message.is-other{ align-self:flex-start; }
.ap-talker-message-meta{
  margin:0 0 3px;
  color:#64748b;
  font-size:.68rem;
}
.ap-talker-message.is-own .ap-talker-message-meta{ text-align:right; }
.ap-talker-bubble{
  padding:9px 12px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#f1f5f9;
  color:#0f172a;
  font-size:.86rem;
  line-height:1.42;
  overflow-wrap:anywhere;
}
.ap-talker-message.is-own .ap-talker-bubble{
  border-color:#0f172a;
  background:#0f172a;
  color:#fff;
}
.ap-talker-composer{
  display:flex;
  align-items:flex-end;
  gap:10px;
  padding:12px 14px;
  border-top:1px solid #e5e7eb;
}
.ap-talker-composer .ap-talker-textarea{
  min-height:42px;
  max-height:120px;
  resize:none;
}
.ap-talker-compose{
  width:100%;
  height:auto;
  min-height:22rem;
  max-height:calc(100vh - var(--ap-top-chrome-height,3.5rem) - 20px);
}
.ap-talker-form{
  display:flex;
  flex-direction:column;
  gap:16px;
  overflow-y:auto;
  padding:18px;
}
.ap-talker-field label{
  display:block;
  margin-bottom:6px;
  color:#334155;
  font-size:.8rem;
  font-weight:800;
}
.ap-talker-form-actions{ display:flex; justify-content:flex-end; }
body.dark-mode .ap-talker-dialog,
body.dark-mode .ap-talker-search,
body.dark-mode .ap-talker-select,
body.dark-mode .ap-talker-textarea{
  border-color:#3f3f46;
  background:#171717;
  color:#f5f5f5;
}
body.dark-mode .ap-talker-head,
body.dark-mode .ap-talker-pane--conversations,
body.dark-mode .ap-talker-pane-head,
body.dark-mode .ap-talker-composer{ border-color:#3f3f46; }
body.dark-mode .ap-talker-title,
body.dark-mode .ap-talker-pane-title,
body.dark-mode .ap-talker-row-name,
body.dark-mode .ap-talker-conversation,
body.dark-mode .ap-talker-person{ color:#f5f5f5 !important; }
body.dark-mode .ap-talker-conversation:hover,
body.dark-mode .ap-talker-person:hover{ background:#27272a; }
body.dark-mode .ap-talker-bubble{ border-color:#3f3f46; background:#27272a; color:#f5f5f5; }
@media (max-width:760px){
  .ap-talker-shell{ top:8px; right:8px; width:calc(100vw - 16px); }
  .ap-talker-dialog{ height:calc(100vh - 16px); border-radius:10px; }
  .ap-talker-body{ overflow-y:auto; }
  .ap-talker-scroll{ min-height:150px; }
  .ap-talker-message{ max-width:88%; }
  .ap-talker-subtitle{ display:none; }
}
