/* Anymacs Team chat + internal calls (anymacs-team.js). Colours come from brand/anymacs-tokens.css */
.amt-wrap { display: flex; height: calc(100vh - 110px); min-height: 420px; border: 1px solid var(--am-border); border-radius: 12px;
  overflow: hidden; background: var(--am-surface); color: var(--am-text); font-family: var(--am-font, inherit); }
.amt-side { width: 290px; flex-shrink: 0; border-right: 1px solid var(--am-border); display: flex; flex-direction: column; background: var(--am-surface); }
.amt-side-h { padding: 14px 16px; font-weight: 700; font-size: 16px; border-bottom: 1px solid var(--am-border); display: flex; align-items: center; gap: 8px; }
.amt-side-h small { font-weight: 500; color: var(--am-muted); font-size: 12px; margin-left: auto; }
.amt-list { flex: 1; overflow-y: auto; }
.amt-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; border: 0; width: 100%; text-align: left;
  background: transparent; color: inherit; font: inherit; border-bottom: 1px solid var(--am-border); }
.amt-item:hover { background: var(--am-hover); }
.amt-item.on { background: var(--am-green-soft); }
.amt-av { width: 36px; height: 36px; border-radius: 50%; background: var(--am-surface-2); display: flex; align-items: center; justify-content: center;
  font-weight: 700; position: relative; flex-shrink: 0; color: var(--am-text-2); }
.amt-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #9aa0a6; border: 2px solid var(--am-surface); }
.amt-dot.on { background: #3DBE4E; }
.amt-dot.busy { background: #e5a50a; }
.amt-it-txt { flex: 1; min-width: 0; }
.amt-it-txt b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt-it-txt small { display: block; color: var(--am-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt-badge { background: #3DBE4E; color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; padding: 1px 7px; min-width: 18px; text-align: center; }
.amt-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--am-chat-bg, var(--am-bg)); }
.amt-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--am-border); background: var(--am-surface); }
.amt-head b { font-size: 15px; }
.amt-head small { color: var(--am-muted); display: block; font-size: 12px; }
.amt-head .amt-sp { flex: 1; }
.amt-btn { border: 1px solid var(--am-border); background: var(--am-surface); color: var(--am-text); border-radius: 8px; padding: 6px 10px;
  cursor: pointer; font: inherit; font-size: 14px; line-height: 1.2; }
.amt-btn:hover { background: var(--am-hover); }
.amt-btn:disabled { opacity: .45; cursor: default; }
.amt-btn.green { background: #3DBE4E; border-color: #3DBE4E; color: #fff; }
.amt-btn.red { background: #d93025; border-color: #d93025; color: #fff; }
.amt-back { display: none; }
.amt-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.amt-empty { margin: auto; color: var(--am-muted); text-align: center; font-size: 14px; padding: 20px; }
.amt-row { display: flex; }
.amt-row.me { justify-content: flex-end; }
.amt-b { max-width: min(520px, 78%); background: var(--am-surface); border: 1px solid var(--am-border); border-radius: 10px; padding: 6px 10px 4px;
  font-size: 14px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.amt-row.me .amt-b { background: var(--am-out-bubble, var(--am-green-soft)); }
.amt-b .amt-who { font-size: 12px; font-weight: 700; color: var(--am-link); margin-bottom: 2px; }
.amt-b .amt-t { font-size: 10.5px; color: var(--am-muted); text-align: right; margin-top: 2px; }
.amt-b img { max-width: 260px; max-height: 260px; border-radius: 6px; display: block; cursor: zoom-in; }
.amt-b audio { width: 240px; max-width: 100%; display: block; }
.amt-b a { color: var(--am-link); }
.amt-file { display: flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: underline; }
.amt-call { align-self: center; background: var(--am-surface-2); color: var(--am-text-2); border-radius: 14px; padding: 4px 12px; font-size: 12.5px; }
.amt-call.missed { color: var(--am-red-text, #d93025); }
.amt-day { align-self: center; font-size: 11.5px; color: var(--am-muted); margin: 6px 0; }
.amt-more { align-self: center; }
.amt-comp { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--am-border); background: var(--am-surface); }
.amt-comp textarea { flex: 1; resize: none; border: 1px solid var(--am-border); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px;
  background: var(--am-bg); color: var(--am-text); max-height: 140px; min-height: 38px; outline: none; }
.amt-rec { flex: 1; display: flex; align-items: center; gap: 10px; color: #d93025; font-weight: 600; padding: 8px 4px; }
.amt-rec i { width: 10px; height: 10px; border-radius: 50%; background: #d93025; animation: amtBlink 1s infinite; }
@keyframes amtBlink { 50% { opacity: .2; } }
.amt-drop { outline: 3px dashed #3DBE4E; outline-offset: -8px; }
.amt-note { padding: 6px 12px; font-size: 12px; color: var(--am-muted); background: var(--am-surface); border-top: 1px solid var(--am-border); }

/* call screen (any page) */
.amt-call-ov { position: fixed; inset: 0; z-index: 99999; background: rgba(10, 14, 18, .82); display: flex; align-items: center; justify-content: center; }
.amt-call-box { background: #1f2428; color: #fff; border-radius: 18px; width: min(720px, 94vw); padding: 22px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.amt-call-box.small { width: min(360px, 92vw); }
.amt-call-av { width: 84px; height: 84px; border-radius: 50%; background: #3DBE4E; color: #fff; font-size: 34px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin: 6px auto 12px; }
.amt-call-av.ring { animation: amtPulse 1.4s infinite; }
@keyframes amtPulse { 0% { box-shadow: 0 0 0 0 rgba(61,190,78,.6); } 100% { box-shadow: 0 0 0 26px rgba(61,190,78,0); } }
.amt-call-name { font-size: 20px; font-weight: 700; }
.amt-call-st { color: #b8c0c6; margin: 4px 0 16px; font-size: 14px; }
.amt-call-btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.amt-call-btns button { border: 0; border-radius: 26px; padding: 11px 20px; font-size: 15px; font-weight: 600; cursor: pointer; color: #fff; background: #3b4248; }
.amt-call-btns button.ok { background: #3DBE4E; }
.amt-call-btns button.no { background: #d93025; }
.amt-call-btns button.on { background: #e5a50a; }
.amt-vids { position: relative; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 14px; aspect-ratio: 16 / 9; }
.amt-vids video.r { width: 100%; height: 100%; object-fit: contain; background: #000; }
.amt-vids video.l { position: absolute; right: 10px; bottom: 10px; width: 26%; border-radius: 8px; border: 2px solid rgba(255,255,255,.6); background: #222; transform: scaleX(-1); }

/* floating unread pill (when the Team page is not open) */
#amt-pill { position: fixed; left: 14px; bottom: 14px; z-index: 9990; background: #3DBE4E; color: #fff; border: 0; border-radius: 20px;
  padding: 8px 14px; font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; display: none; }
.amt-ico { position: relative; display: inline-flex; font-size: 17px; line-height: 1; }
.amt-ico .amt-badge { position: absolute; top: -8px; right: -12px; font-size: 10px; padding: 0 5px; }

@media (max-width: 760px) {
  .amt-wrap { height: calc(100vh - 90px); border-radius: 0; border-left: 0; border-right: 0; }
  .amt-side { width: 100%; border-right: 0; }
  .amt-wrap.room .amt-side { display: none; }
  .amt-wrap:not(.room) .amt-main { display: none; }
  .amt-back { display: inline-block; }
  .amt-b img { max-width: 200px; }
}
