/* Desktop Teamchat: compact controls, same NOVEUM palette; no mobile selectors. */
body.launcher-webstyle .teamchat-compact [hidden] { display: none !important; }
body.launcher-webstyle .teamchat-compact .teamchat-shell { grid-template-columns: minmax(240px, 290px) minmax(0, 1fr); }
body.launcher-webstyle .teamchat-compact.has-participants:not(.is-narrow) .teamchat-shell { grid-template-columns: minmax(240px, 270px) minmax(0, 1fr) minmax(260px, 310px); }
body.launcher-webstyle .teamchat-compact:not(.is-narrow) .teamchat-side { position: static; z-index: auto; width: auto; min-width: 0; box-shadow: none; }
body.launcher-webstyle .teamchat-compact .teamchat-participant { grid-template-columns: 34px minmax(0, 1fr); }
body.launcher-webstyle .teamchat-compact .teamchat-participant-state { grid-column: 2; white-space: normal; }
body.launcher-webstyle .teamchat-compact .teamchat-participant-copy strong,
body.launcher-webstyle .teamchat-compact .teamchat-participant-company { white-space: normal; overflow-wrap: anywhere; }
body.launcher-webstyle .teamchat-compact [data-chat-participants][aria-expanded="true"] { background: #def0ee; }
.teamchat-management-dialog > header { position: sticky; top: -20px; background: #f8fcfc; z-index: 1; }
.teamchat-management-dialog > header h3 { margin: 0; font-size: 18px; }
.teamchat-management-dialog .teamchat-admin > summary { display: none; }
body.launcher-webstyle .teamchat-compact .teamchat-main { grid-template-rows: 48px auto auto minmax(0, 1fr) auto; min-width: 0; }
body.launcher-webstyle .teamchat-compact .teamchat-main > .teamchat-status { grid-row: 2; margin: 0; padding: 6px 12px; }
body.launcher-webstyle .teamchat-compact .teamchat-message-viewport { grid-row: 4; position: relative; display: grid; min-height: 0; }
body.launcher-webstyle .teamchat-compact .teamchat-scroll-latest { position: absolute; bottom: 12px; left: 50%; right: auto; transform: translateX(-50%); z-index: 5; width: 44px; height: 44px; background: #fff; border: 1px solid #b8d1d6; box-shadow: 0 2px 10px #173e4926; }
body.launcher-webstyle .teamchat-compact .teamchat-scroll-count { position: absolute; top: -8px; right: -6px; min-width: 22px; padding: 3px 5px; border-radius: 12px; background: #117c77; color: #fff; font-size: 12px; }
body.launcher-webstyle .teamchat-compact .teamchat-compose { grid-row: 5; }
body.launcher-webstyle .teamchat-compact .teamchat-conversation-head { padding: 4px 12px; gap: 8px; }
body.launcher-webstyle .teamchat-compact .teamchat-conversation-title { display: none; }
body.launcher-webstyle .teamchat-compact .teamchat-wide-heading { margin-right: auto; color: #56717c; font-size: 13px; }
body.launcher-webstyle .teamchat-compact .teamchat-conversation-actions { display: flex; gap: 4px; margin-left: auto; }
body.launcher-webstyle .teamchat-compact .teamchat-rail-head { min-height: 52px; padding: 8px 12px; }
body.launcher-webstyle .teamchat-compact .teamchat-rail-head small { display: none; }
body.launcher-webstyle .teamchat-compact .teamchat-rail { min-height: 0; max-height: none; }
body.launcher-webstyle .teamchat-compact .teamchat-room-copy small { white-space: normal; }
body.launcher-webstyle .teamchat-compact .teamchat-room.is-active { background: #e0f1ef; }
body.launcher-webstyle .teamchat-compact .teamchat-selected-presence { color: #56717c; font-size: 10px; }
body.launcher-webstyle .teamchat-compact .is-developer .teamchat-selected-presence { color: var(--chat-developer); }
body.launcher-webstyle .teamchat-compact .teamchat-retention { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; flex-shrink: 0; padding: 10px; margin-bottom: 8px; }
body.launcher-webstyle .teamchat-compact .teamchat-retention > span:first-child { width: 36px; height: 36px; font-size: 14px; }
body.launcher-webstyle .teamchat-compact .teamchat-retention strong { font-size: 14px; line-height: 1.4; }
body.launcher-webstyle .teamchat-compact .teamchat-retention small { color: #526775; font-size: 13px; line-height: 1.45; }
body.launcher-webstyle .teamchat-compact .teamchat-messages { padding: 4px clamp(10px, 2vw, 26px) 16px; background: #edf5f6; }
body.launcher-webstyle .teamchat-compact .teamchat-message { padding: 9px 0; max-width: 1100px; gap: 9px; }
body.launcher-webstyle .teamchat-compact .teamchat-message-head { position: relative; flex-wrap: wrap; gap: 5px; min-height: 32px; }
body.launcher-webstyle .teamchat-compact .teamchat-message-head time { margin-left: auto; white-space: nowrap; color: #526775; font-size: 14px; line-height: 1.4; }
body.launcher-webstyle .teamchat-compact .teamchat-message-head strong { overflow-wrap: anywhere; }
body.launcher-webstyle .teamchat-compact .teamchat-day-separator { margin: 12px auto 5px; width: fit-content; border-radius: 12px; padding: 4px 12px; background: #dcebea; color: #45626a; font-size: 13px; }
body.launcher-webstyle .teamchat-compact .teamchat-compact-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; padding: 9px; border: 0; border-radius: 50%; background: transparent; color: #087f79; cursor: pointer; }
body.launcher-webstyle .teamchat-compact .teamchat-compact-icon:hover { background: #def0ee; }
body.launcher-webstyle .teamchat-compact .teamchat-compact-icon:focus-visible { outline: 2px solid #087f79; outline-offset: 1px; }
body.launcher-webstyle .teamchat-compact .teamchat-compact-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body.launcher-webstyle .teamchat-compact .teamchat-message-menu { position: relative; margin: 0; }
body.launcher-webstyle .teamchat-compact .teamchat-message-menu summary { list-style: none; width: 40px; height: 40px; min-height: 40px; padding: 8px; }
body.launcher-webstyle .teamchat-compact .teamchat-message-menu summary svg { width: 24px; height: 24px; stroke-width: 3; }
body.launcher-webstyle .teamchat-compact .teamchat-message-menu summary::-webkit-details-marker { display: none; }
body.launcher-webstyle .teamchat-compact .teamchat-message-menu:not([open]) .teamchat-message-actions { display: none; }
body.launcher-webstyle .teamchat-compact .teamchat-message-menu[open] .teamchat-message-actions { display: flex; position: absolute; right: 0; top: 100%; z-index: 6; width: 210px; max-width: 65vw; flex-direction: column; align-items: stretch; padding: 5px; margin: 0; background: #fff; border: 1px solid #c5dadd; border-radius: 10px; box-shadow: 0 8px 24px #173e4926; }
body.launcher-webstyle .teamchat-compact .teamchat-message-actions button { min-height: 36px; text-align: left; font-size: 12px; padding: 8px; }
body.launcher-webstyle .teamchat-compact .teamchat-message-menu.opens-up[open] .teamchat-message-actions { top: auto; bottom: 100%; }
body.launcher-webstyle .teamchat-compact .teamchat-image-open { display: block; border: 0; padding: 0; margin: 8px 0; background: transparent; cursor: zoom-in; max-width: 100%; }
body.launcher-webstyle .teamchat-compact .teamchat-image { max-height: 320px; max-width: min(420px, 100%); object-fit: contain; margin: 0; }
body.launcher-webstyle .teamchat-compact .teamchat-compose { padding: 7px 10px; }
body.launcher-webstyle .teamchat-compact .teamchat-compose-box { position: relative; display: flex; align-items: flex-end; gap: 3px; max-width: 1100px; padding: 4px; border-radius: 25px; overflow: visible; box-shadow: none; }
body.launcher-webstyle .teamchat-compact .teamchat-compose textarea { flex: 1; width: 0; min-width: 0; min-height: 40px; max-height: 120px; line-height: 20px; padding: 10px 4px; background: transparent; }
body.launcher-webstyle .teamchat-compact .teamchat-compose-box > [type="submit"] { background: #0f766e; color: #fff; }
body.launcher-webstyle .teamchat-compact .teamchat-attachment-menu { position: absolute; z-index: 9; bottom: calc(100% + 8px); left: 0; padding: 7px; width: min(275px, 85vw); border: 1px solid #c5dadd; border-radius: 13px; background: #fff; box-shadow: 0 8px 24px #173e4926; }
body.launcher-webstyle .teamchat-compact .teamchat-compose-attachments { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
body.launcher-webstyle .teamchat-compact .teamchat-compose-attachments > button,
body.launcher-webstyle .teamchat-compact .teamchat-file-label { min-height: 38px; padding: 8px 10px; background: transparent; border: 0; font-size: 12px; text-align: left; cursor: pointer; }
body.launcher-webstyle .teamchat-compact .teamchat-compose-attachments small { display: block; padding: 7px 10px; }
body.launcher-webstyle .teamchat-compact .teamchat-recording-actions { display: flex; justify-content: flex-end; gap: 8px; }
body.launcher-webstyle .teamchat-compact .teamchat-recording-actions button { margin-top: 6px; min-height: 34px; padding: 5px 12px; }
body.launcher-webstyle .teamchat-compact .teamchat-recording-status { display: block; padding: 5px 8px 0; color: #865d11; font-size: 12px; }
body.launcher-webstyle .teamchat-compact .teamchat-voice-staged { max-width: 1100px; margin: 0 auto 5px; flex-wrap: wrap; }
body.launcher-webstyle .teamchat-compact .teamchat-voice-staged audio { height: 32px; width: min(240px, 100%); }
body.launcher-webstyle .teamchat-compact .teamchat-participant { --participant-color: var(--chat-accent); }
body.launcher-webstyle .teamchat-compact .teamchat-participant.is-admin { --participant-color: var(--chat-admin); }
body.launcher-webstyle .teamchat-compact .teamchat-participant.is-superadmin { --participant-color: var(--chat-superadmin); }
body.launcher-webstyle .teamchat-compact .teamchat-participant.is-developer { --participant-color: var(--chat-developer); }
body.launcher-webstyle .teamchat-compact .teamchat-participant .teamchat-participant-avatar { background: var(--participant-color); }
body.launcher-webstyle .teamchat-compact .teamchat-participant .teamchat-participant-role { color: var(--participant-color); }
body.launcher-webstyle .teamchat-compact [data-chat-picker],
body.launcher-webstyle .teamchat-compact .teamchat-rail-close { display: none; }
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-shell { grid-template-columns: minmax(0, 1fr); }
body.launcher-webstyle .teamchat-compact.is-narrow [data-chat-picker],
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-rail-close { display: inline-flex; }
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-rail { display: none; }
body.launcher-webstyle .teamchat-compact.is-narrow.is-room-picker .teamchat-rail { display: flex; position: absolute; z-index: 10; inset: 0 auto 0 0; width: min(340px, 100%); box-shadow: 8px 0 30px #173e4933; }
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-wide-heading { display: none; }
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-conversation-title { display: flex; flex: 1; }
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-conversation-title .teamchat-room-symbol,
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-conversation-title p,
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-conversation-title .teamchat-presence-summary { display: none; }
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-conversation-title h3 { font-size: 13px; }
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-message { grid-template-columns: 28px minmax(0, 1fr); gap: 7px; }
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-message-avatar { width: 28px; height: 28px; font-size: 9px; }
body.launcher-webstyle .teamchat-compact.is-narrow .teamchat-retention { display: grid; }
.teamchat-media-dialog { width: min(1080px, 94vw); max-height: 92vh; border: 1px solid #b8d1d6; border-radius: 14px; padding: 0; background: #eff6f6; color: #153742; }
.teamchat-media-dialog::backdrop { background: #001f2be0; }
.teamchat-media-dialog header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #fff; }
.teamchat-media-dialog header strong { flex: 1; overflow-wrap: anywhere; }
.teamchat-media-dialog button { color: #087f79; background: #fff; border: 1px solid #b8d1d6; border-radius: 8px; padding: 9px 12px; cursor: pointer; }
.teamchat-media-dialog footer { padding: 10px; text-align: right; }
.teamchat-media-stage { overflow: auto; max-height: 72vh; padding: 12px; text-align: center; }
.teamchat-media-stage img, .teamchat-media-stage video { display: block; margin: auto; max-width: 100%; max-height: 66vh; object-fit: contain; }
.teamchat-media-dialog.is-zoomed img { max-width: none; max-height: none; width: 200%; cursor: zoom-out; }
.teamchat-media-dialog [hidden] { display: none !important; }
.teamchat-preview-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 120px; color: #117c77; }
.teamchat-preview-loading::before { content: ""; width: 22px; height: 22px; flex-shrink: 0; border: 3px solid #d6edeb; border-top-color: #117c77; border-radius: 50%; animation: teamchat-preview-spin .9s linear infinite; }
@keyframes teamchat-preview-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .teamchat-preview-loading::before { animation: none; } }
.teamchat-interaction-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 22px; border: 1px solid #bed3d9; border-radius: 16px; color: #173540; background: #f8fbfc; }
.teamchat-interaction-dialog::backdrop { background: rgba(4,31,40,.45); }
.teamchat-interaction-dialog label { display: grid; gap: 6px; margin: 12px 0; font-weight: 600; }
.teamchat-interaction-dialog input:not([type=checkbox]), .teamchat-interaction-dialog textarea { width: 100%; min-height: 42px; padding: 10px; border: 1px solid #bed3d9; border-radius: 10px; color: #173540; background: #fff; font: inherit; }
.teamchat-interaction-dialog textarea { min-height: 100px; resize: vertical; }
.teamchat-interaction-dialog button { min-height: 40px; margin: 4px; padding: 8px 14px; border: 1px solid #bed3d9; border-radius: 10px; color: #117c77; background: #fff; font: inherit; }
.teamchat-poll { display: grid; gap: 6px; margin: 8px 0; padding: 12px; border: 1px solid #bed3d9; border-radius: 12px; background: #f8fbfc; }
.teamchat-poll button { min-height: 40px; padding: 10px; text-align: left; border: 1px solid #bed3d9; border-radius: 8px; background: #fff; color: #173540; font: inherit; }
.teamchat-poll button.is-selected { background: #d6edeb; border-color: #117c77; }
.teamchat-poll small, .teamchat-edited { display: block; color: #58717d; font-size: 12px; }
.teamchat-poll-question { color: #173540; font-size: 16px; font-weight: 800; line-height: 1.4; }
.teamchat-poll .teamchat-poll-option { display: grid; gap: 9px; padding: 12px; font-size: 14px; }
.teamchat-poll-option-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.teamchat-poll-option-copy { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.teamchat-poll-option-text { overflow-wrap: anywhere; font-weight: 650; line-height: 1.4; }
.teamchat-poll-check { flex-shrink: 0; color: #117c77; font-weight: 800; }
.teamchat-poll-result { display: flex; flex-shrink: 0; align-items: center; gap: 12px; }
.teamchat-poll-percent { color: #58717d; font-size: 12px; font-variant-numeric: tabular-nums; }
.teamchat-poll-count { min-width: 20px; color: #096e69; font-size: 16px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.teamchat-poll-track { display: block; height: 6px; overflow: hidden; border-radius: 3px; background: #e0edef; }
.teamchat-poll-fill { display: block; height: 100%; border-radius: inherit; background: #58aaa5; }
.teamchat-poll-option.is-selected .teamchat-poll-fill { background: #117c77; }
.teamchat-poll .teamchat-poll-names { padding: 0 4px 3px; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.teamchat-poll-total { margin-top: 4px; line-height: 1.5; }
.teamchat-poll .teamchat-poll-close { border-color: transparent; background: transparent; color: #096e69; font-size: 12px; font-weight: 750; }
.teamchat-history-load { display: block; margin: 12px auto; padding: 10px 18px; border: 1px solid #b7d8d5; border-radius: 12px; background: #fff; color: #087c77; font-size: 14px; font-weight: 600; cursor: pointer; }
.teamchat-history-load:hover { background: #e2f3f0; }
.teamchat-history-load:disabled { cursor: wait; opacity: .65; }
.teamchat-language-hint { grid-row: 3; margin: 4px 12px; color: #315e68; font-size: 12px; line-height: 1.4; }
.teamchat-language-chip { display: table; max-width: 100%; margin-bottom: 4px; padding: 4px 9px; border: 1px solid #bed3d9; border-radius: 12px; background: #f2f6f7; color: #526775; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.teamchat-language-chip[data-active="true"] { border-color: #9fcac6; background: #e1f2ee; color: #096e69; }
.teamchat-room-card { position: relative; flex-shrink: 0; }
body.launcher-webstyle .teamchat-compact .teamchat-room-card .teamchat-room { min-height: 90px; padding-right: 54px; margin-bottom: 0; }
.teamchat-room-tools { position: absolute; top: 8px; right: 7px; display: grid; justify-items: center; gap: 3px; }
.teamchat-room-tools .teamchat-room-mute { width: 36px; height: 36px; border: 1px solid #c3d9dc; border-radius: 10px; background: #fff; }
.teamchat-room-mute[data-muted="true"] { color: #526775; background: #e8eff1; }
.teamchat-room-card:has(.is-subchat) { margin-left: 18px; }
.teamchat-room-card .teamchat-room.is-subchat { margin-left: 0; width: 100%; }
/* Desktop-only preferences: reuse the compact dialog, keep checkbox labels readable. */
.teamchat-notification-dialog label { display: flex; align-items: center; gap: 10px; }
.teamchat-notification-dialog input[type="checkbox"] { width: auto; min-width: 18px; }
.teamchat-notification-dialog p { line-height: 1.5; }
