/* Compatibility with the deployed FoundHub theme. Chat appearance stays personal. */
@media screen {
#teamMessenger[data-theme="light"],.team-messenger-dialog[data-theme="light"]{color-scheme:light}
#teamMessenger[data-theme="dark"],.team-messenger-dialog[data-theme="dark"]{color-scheme:dark}
html[data-fh-theme="dark"] #teamMessenger .team-messenger-heading h1{color:var(--ink,#edf1f9)}
html[data-fh-theme="dark"] #teamMessenger .team-messenger-heading>div>span{color:var(--muted,#abb6ca)}
html .team-messenger-dialog[data-theme] label{color:var(--chat-ink)}
html .team-messenger-dialog[data-theme] input:not([type="checkbox"]):not([type="file"]),html .team-messenger-dialog[data-theme] select,html .team-messenger-dialog[data-theme] textarea{background:var(--chat-field);color:var(--chat-ink);border-color:var(--chat-border);box-shadow:none}
html .team-messenger-dialog[data-theme] .team-search input{background:transparent;border:0}
html .team-messenger-dialog[data-theme] .icon-button{color:var(--chat-muted);background:var(--chat-field);border:0}
html .team-messenger-dialog[data-theme] .primary,html .team-messenger-dialog[data-theme] .primary:hover{background:#339bd6;border-color:#339bd6;color:#fff}
html .team-messenger-dialog[data-theme] .secondary,html .team-messenger-dialog[data-theme] .secondary:hover{background:var(--chat-field);border-color:var(--chat-border);color:var(--chat-ink)}
html .team-messenger-dialog[data-theme] input[type="checkbox"]{accent-color:var(--chat-blue)}
/* The global textarea palette must not tint the independent chat composer. */
#teamMessenger[data-theme] #teamMessageInput,#teamMessenger[data-theme] #teamMessageInput:focus{background:transparent;color:var(--chat-ink);border:0;box-shadow:none}
#teamMessenger[data-theme] #teamMessageInput::placeholder{color:var(--chat-muted)}
/* Invitations follow the application theme, including result/copy and permission forms. */
html[data-fh-theme="dark"] #teamInvitations{--team-line:#344151;--team-muted:#abb6ca;--team-soft:#24344a;color:#edf1f9}
html[data-fh-theme="dark"] #teamInvitations .team-invite-card{background:#171d29;border-color:#344151}
html[data-fh-theme="dark"] #teamInvitations .team-metrics strong,html[data-fh-theme="dark"] #teamInvitations .team-table td strong{color:#edf1f9}
html[data-fh-theme="dark"] #teamInvitations .team-metrics div{border-color:#405575}
html[data-fh-theme="dark"] #teamInvitations .team-table td{border-color:#303a4d}
html[data-fh-theme="dark"] #teamInvitations .team-table th{background:#1b2432;color:#aebcd0;border-color:#303a4d}
html[data-fh-theme="dark"] #teamInvitations .team-table td small,html[data-fh-theme="dark"] #teamInvitations .team-empty p{color:#abb6ca}
html[data-fh-theme="dark"] #teamInvitations .team-search{background:#202b38;border-color:#344151;color:#abb6ca}
html[data-fh-theme="dark"] #teamInvitations .team-search input{background:transparent;color:#edf1f9;border:0}
html[data-fh-theme="dark"] #teamInvitations .team-link-button{color:#93b8ee}
html[data-fh-theme="dark"] #teamInvitations .team-link-button.danger-text{color:#ed9da8}
html[data-fh-theme="dark"] #teamInvitations .team-pill{background:#263448;color:#b5c6de}
html[data-fh-theme="dark"] #teamInvitations .team-pill.pending{background:#423720;color:#f0d296}
html[data-fh-theme="dark"] #teamInvitations .team-pill.accepted{background:#233d31;color:#a2dfb6}
html[data-fh-theme="dark"] #teamInvitations .team-pill.revoked{background:#432d37;color:#e9b3c1}
html[data-fh-theme="dark"] :is(#teamInviteDialog,#teamInviteResult){background:#171d29;color:#edf1f9;border-color:#344151;--team-muted:#abb6ca}
html[data-fh-theme="dark"] :is(#teamInviteDialog,#teamInviteResult) :is(h2,h3,label,.team-review dd){color:#edf1f9}
html[data-fh-theme="dark"] :is(#teamInviteDialog,#teamInviteResult) :is(p,small,.team-review dt,.team-permission-count){color:#abb6ca}
html[data-fh-theme="dark"] :is(#teamInviteDialog,#teamInviteResult) :is(.team-permission-group,.team-review,.team-dialog-actions){border-color:#344151}
html[data-fh-theme="dark"] :is(#teamInviteDialog,#teamInviteResult) :is(input:not([type="checkbox"]),select){background:#202b38;color:#edf1f9;border-color:#344151}
html[data-fh-theme="dark"] :is(#teamInviteDialog,#teamInviteResult) input:focus{border-color:#669cda;box-shadow:0 0 0 3px #669cda20}
html[data-fh-theme="dark"] :is(#teamInviteDialog,#teamInviteResult) .secondary{background:#243246;color:#edf1f9;border-color:#40516b}
html[data-fh-theme="dark"] :is(#teamInvitations,#teamInviteDialog,#teamInviteResult) .primary{background:#4479c8;border-color:#4479c8;color:white}
html[data-fh-theme="dark"] #teamInviteDialog .team-steps li{color:#9cacbf;border-color:#344151}
html[data-fh-theme="dark"] #teamInviteDialog .team-steps li span{background:#263448}
html[data-fh-theme="dark"] #teamInviteDialog .team-steps li.is-active{color:#9ec5ff;border-color:#729dda}
html[data-fh-theme="dark"] #teamInviteDialog .team-steps li.is-active span{background:#334b68}
html[data-fh-theme="dark"] #teamInviteDialog .team-presets button{background:#202b38;border-color:#3b4a5f;color:#b4c4da}
html[data-fh-theme="dark"] #teamInviteDialog .team-presets button.is-selected{background:#334b68;border-color:#769bcd;color:#e1eeff}
html[data-fh-theme="dark"] #teamInviteDialog .team-tabs{background:#111a27}
html[data-fh-theme="dark"] #teamInviteDialog .team-tabs button{color:#a8b8cf}
html[data-fh-theme="dark"] #teamInviteDialog .team-tabs button.is-active{background:#2a3d57;color:#e1eeff}
html[data-fh-theme="dark"] :is(#teamInviteDialog,#teamInviteResult) .team-rights-tags span{background:#263448;color:#c1d1e7}
html[data-fh-theme="dark"] #teamInviteResult .team-copy-row input{color:#c1d1e7!important;background:#202b38!important}
html[data-fh-theme="dark"] #teamInviteResult .team-result-status{color:#abb6ca!important}
html[data-fh-theme="dark"] #teamInviteResult .team-success-icon{background:#233d31;color:#a2dfb6}
html[data-fh-theme="dark"] :is(#teamInvitations,#teamInviteDialog,#teamInviteResult) .team-error{color:#ffadb8}
}
