/* TEAM SESSIONS: the Team panel, the "*" note bubbles, the member bar and the invite page (TAO-1 templates 2026-10-06; JTAO_TEAM_SESSIONS).
   Brand-neutral (the same file serves every Hydra site); light + dark tokens; taps >= 44px on touch. */
:root{--tm-ink:#1f3f55;--tm-muted:#5a6674;--tm-line:#dce7ec;--tm-paper:#fff;--tm-soft:#f3f7f9;--tm-accent:#244a62;--tm-accent-ink:#fff;--tm-note:#fff7e0;--tm-note-line:#ecd9a2;--tm-note-ink:#4a3c18;--tm-warn:#8a3b12;--tm-warn-bg:#fdeee4;--tm-ok:#1d6b45;--tm-shadow:0 22px 60px -24px #19466666}
:root[data-theme="dark"]{--tm-ink:#d5e2ee;--tm-muted:#9fb0c1;--tm-line:#2b3540;--tm-paper:#1b2027;--tm-soft:#222932;--tm-accent:#8fc0e3;--tm-accent-ink:#0f1820;--tm-note:#2b2717;--tm-note-line:#5b4e25;--tm-note-ink:#f0e2b8;--tm-warn:#ffb48a;--tm-warn-bg:#3a2419;--tm-ok:#7fd4a8;--tm-shadow:0 22px 60px -24px #000c}

/* the header button (chat + code) */
.team-open{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:7px 13px;border:1px solid var(--tm-line);border-radius:99px;background:var(--tm-paper);color:var(--tm-ink);font:inherit;font-size:.82rem;font-weight:600;cursor:pointer}
.team-open:hover{border-color:var(--tm-accent)}
.team-open svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.team-open .team-count{min-width:18px;padding:0 5px;border-radius:99px;background:var(--tm-accent);color:var(--tm-accent-ink);font-size:.7rem;line-height:18px;text-align:center}

/* /code: the Team button sits in the project header where Save was, in Save's style (code.css .code-save-button) plus the people icon */
.team-open-inline{display:inline-flex;align-items:center;gap:5px;cursor:pointer}
.team-open-inline svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.team-open-inline .team-count{min-width:16px;padding:0 4px;border-radius:99px;background:var(--tm-accent);color:var(--tm-accent-ink);font-size:.64rem;line-height:16px;text-align:center}
@media (max-width:600px){.team-open-inline .team-open-label{display:inline}}

/* the panel (a dialog) */
.team-dialog{width:min(560px,calc(100vw - 32px));max-height:min(86vh,760px);padding:0;border:1px solid var(--tm-line);border-radius:18px;background:var(--tm-paper);color:var(--tm-ink);box-shadow:var(--tm-shadow);overflow:auto}
.team-dialog::backdrop{background:#0d1d2a59}
.team-dialog-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px 12px;background:var(--tm-paper);border-bottom:1px solid var(--tm-line)}
.team-dialog-head h2{margin:0;font-size:1.05rem}
.team-close{width:36px;height:36px;border:0;border-radius:10px;background:transparent;color:var(--tm-muted);font-size:1.4rem;line-height:1;cursor:pointer}
.team-close:hover{background:var(--tm-soft)}
.team-body{padding:14px 20px 20px;display:grid;gap:18px}
.team-section h3{margin:0 0 8px;font-size:.78rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--tm-muted)}
.team-lede{margin:0;color:var(--tm-muted);font-size:.88rem}
.team-invite{display:grid;grid-template-columns:1fr auto auto;gap:8px}
.team-invite input,.team-invite select,.team-member select,.team-limit input{min-height:40px;padding:8px 10px;border:1px solid var(--tm-line);border-radius:10px;background:var(--tm-paper);color:var(--tm-ink);font:inherit;font-size:.9rem}
.team-btn{min-height:40px;padding:8px 14px;border:1px solid var(--tm-accent);border-radius:10px;background:var(--tm-accent);color:var(--tm-accent-ink);font:inherit;font-size:.86rem;font-weight:700;cursor:pointer;white-space:nowrap}
.team-btn.is-quiet{background:transparent;color:var(--tm-accent)}
.team-btn.is-danger{border-color:var(--tm-warn);background:transparent;color:var(--tm-warn)}
.team-btn:disabled{opacity:.55;cursor:default}
.team-link{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:10px}
.team-link input{min-height:40px;padding:8px 10px;border:1px solid var(--tm-line);border-radius:10px;background:var(--tm-soft);color:var(--tm-ink);font:inherit;font-size:.82rem}
.team-msg{margin:8px 0 0;font-size:.85rem;color:var(--tm-muted)}
.team-msg.is-error{color:var(--tm-warn)}
.team-msg.is-ok{color:var(--tm-ok)}
.team-list{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.team-member{display:grid;grid-template-columns:1fr auto;gap:8px 12px;align-items:center;padding:10px 12px;border:1px solid var(--tm-line);border-radius:12px;background:var(--tm-soft)}
.team-who{min-width:0}
.team-who strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.92rem}
.team-who span{font-size:.78rem;color:var(--tm-muted)}
.team-controls{display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:flex-end}
.team-limit{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:.82rem;color:var(--tm-muted)}
.team-limit input{width:84px}
.team-meter{flex:1 1 140px;height:6px;border-radius:99px;background:var(--tm-line);overflow:hidden}
.team-meter i{display:block;height:100%;background:var(--tm-accent)}
.team-meter.is-over i{background:var(--tm-warn)}
.team-badge{display:inline-block;padding:2px 8px;border-radius:99px;background:var(--tm-soft);border:1px solid var(--tm-line);font-size:.72rem;font-weight:700;color:var(--tm-ink)}
.team-badge.is-over{background:var(--tm-warn-bg);border-color:var(--tm-warn);color:var(--tm-warn)}
.team-empty{margin:0;padding:12px;border:1px dashed var(--tm-line);border-radius:12px;color:var(--tm-muted);font-size:.86rem;text-align:center}

/* the member bar above the composer (a member's role, their limit, the notes hint) */
.team-bar{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;margin:0 0 8px;padding:8px 12px;border:1px solid var(--tm-line);border-radius:12px;background:var(--tm-paper);color:var(--tm-ink);font-size:.82rem}
.team-bar .team-bar-hint{color:var(--tm-muted)}
.team-bar.is-gone{border-color:var(--tm-warn);background:var(--tm-warn-bg);color:var(--tm-warn)}
.team-bar kbd{padding:0 5px;border:1px solid var(--tm-line);border-radius:5px;font:inherit;font-weight:700}

/* "*" team notes: their own bubble, never the AI's or a prompt's look */
.team-note{position:relative;max-width:min(620px,92%);margin:10px 0;padding:10px 14px 10px 14px;border:1px solid var(--tm-note-line);border-left:4px solid var(--tm-note-line);border-radius:12px;background:var(--tm-note);color:var(--tm-note-ink);font-size:.93rem;line-height:1.5;overflow-wrap:anywhere}
.team-note.is-mine{margin-left:auto}
.team-note-head{display:flex;gap:8px;align-items:baseline;margin:0 0 3px;font-size:.74rem}
.team-note-head strong{font-weight:700}
.team-note-head time{opacity:.75}
.team-note-head .team-note-tag{margin-left:auto;font-weight:700;letter-spacing:.03em;text-transform:uppercase;opacity:.7}
.team-note-text{margin:0;white-space:pre-wrap}
.team-note-del{position:absolute;top:4px;right:4px;width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:inherit;opacity:0;cursor:pointer;font-size:1rem}
.team-note:hover .team-note-del,.team-note-del:focus-visible{opacity:.8}
.team-note.has-del .team-note-head{padding-right:30px}
.team-note-help{margin:6px 0 0;padding:8px 10px;border-radius:8px;background:var(--tm-paper);color:var(--tm-ink);font-size:.84rem}
.team-live{opacity:.9}
.team-live .team-live-who{font-size:.74rem;color:var(--tm-muted);margin:0 0 4px}

/* a member's view of someone else's conversation: no Edit / Regenerate (they rewrite the owner's history), and the prompt's label is neutral */
html.team-member-view .message .edit-button,html.team-member-view .message .regen-button{display:none!important}

/* the invite page */
body[data-page=invite]{margin:0;min-height:100vh;display:flow-root;background:var(--tm-soft);color:var(--tm-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}
.invite-card{width:min(460px,calc(100vw - 32px));margin:clamp(40px,12vh,120px) auto 40px;padding:28px 24px;border:1px solid var(--tm-line);border-radius:18px;background:var(--tm-paper);box-shadow:var(--tm-shadow)}
.invite-card h1{margin:0 0 8px;font-size:1.3rem}
.invite-card p{margin:0 0 14px;color:var(--tm-muted);line-height:1.55}
.invite-actions{display:grid;gap:10px;margin-top:18px}
.invite-actions a,.invite-actions button{display:flex;align-items:center;justify-content:center;min-height:46px;border-radius:12px;font:inherit;font-weight:700;text-decoration:none;cursor:pointer}
.invite-actions .invite-primary{border:1px solid var(--tm-accent);background:var(--tm-accent);color:var(--tm-accent-ink)}
.invite-actions .invite-secondary{border:1px solid var(--tm-line);background:transparent;color:var(--tm-ink)}

@media (max-width:600px){
  .team-invite{grid-template-columns:1fr 1fr}
  .team-invite input{grid-column:1/-1}
  .team-member{grid-template-columns:1fr}
  .team-controls{justify-content:flex-start}
  .team-open .team-open-label{display:none}
}
@media (pointer:coarse),(max-width:600px){
  .team-btn,.team-invite input,.team-invite select,.team-member select,.team-limit input,.team-close,.team-open{min-height:44px}
  .team-close,.team-note-del{min-width:44px;min-height:44px}
  .team-note-del{opacity:.7}
  .team-invite input,.team-invite select,.team-limit input,.team-member select{font-size:16px}
}

/* A READ-ONLY MEMBER'S COMPOSER looks read-only up front (codeqa 10-19): muted, with the "*" hint in the placeholder and the member bar */
.is-team-readonly{background:#f3f6f7!important;border-style:dashed!important}
.is-team-readonly::placeholder{font-style:italic}
:root[data-theme="dark"] .is-team-readonly{background:#1a242b!important}
