/* Card news is personal/readable; amber help and schedule states remain until
   resolved. These slots and detached previews never replace task content. */
.task-alert-slot { display: flex; align-items: center; flex-wrap: wrap; min-width: 0; max-width: 100%; gap: 4px; margin: 6px 0 0; }
.task-alert-slot[hidden], .member-alert-slot[hidden] { display: none !important; }
.task-alert-badge, .task-alert-static-badge { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 22px; margin: 0; padding: 1px 6px; border: 1px solid transparent; border-radius: 5px; font-family: inherit; font-size: 11px; font-weight: 500; line-height: 18px; text-decoration: none; white-space: nowrap; }
button.task-alert-badge { cursor: pointer; }
.task-alert-badge.is-unread, .task-alert-static-badge.is-unread { border-color: #ffd8dd; background: #fff0f1; color: #c93643; }
.task-alert-badge.is-help, .task-alert-badge.is-schedule,
.task-alert-static-badge.is-help, .task-alert-static-badge.is-schedule { border-color: #fff0d9; background: #fff3df; color: #b66c20; }
.task-alert-badge.is-unread:hover { border-color: #ed9ca5; background: #ffe4e8; }
.task-alert-badge.is-help:hover, .task-alert-badge.is-schedule:hover { border-color: #ddb67d; background: #ffebca; }
.task-alert-badge:focus-visible, .member-alert-button:focus-visible,
.task-alert-panel button:focus-visible { outline: 2px solid #aa805d; outline-offset: 3px; }
.compact-task .task-alert-badge { min-height: 20px; padding: 0 4px; font-size: 10px; line-height: 18px; }
.compact-task .task-alert-slot { gap: 3px; margin-top: 4px; }

.member-alert-slot { display: inline-flex; flex: 0 0 auto; align-items: center; max-width: 100%; margin-left: 6px; vertical-align: middle; overflow: visible; }
.member-alert-button { display: inline-flex; align-items: center; justify-content: flex-start; gap: 5px; max-width: 100%; min-height: 26px; margin: 0; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #8e6445; font-family: inherit; font-size: 10px; line-height: 18px; white-space: nowrap; cursor: pointer; }
.member-alert-bell { position: relative; display: inline-grid; flex: 0 0 25px; place-items: center; width: 25px; height: 25px; border: 1px solid #e7dace; border-radius: 6px; background: #fff; color: #966c4e; }
.member-alert-bell .task-alert-icon { width: 15px; height: 15px; }
.member-alert-label { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 5px; border: 1px solid #ba9373; border-radius: 5px; background: #fff; color: #8f6140; font-size: 10px; font-weight: 650; line-height: 18px; }
.member-alert-unread-dot { position: absolute; top: -4px; right: -4px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #e53e4c; box-sizing: content-box; }
.member-alert-button:hover .member-alert-label, .member-alert-button[aria-expanded="true"] .member-alert-label { border-color: #946b4d; background: #faf5ef; }
.member-work-heading h3:has(.member-alert-slot:not([hidden])) { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; overflow: visible; white-space: normal; }
.member-work-heading h3 > .member-work-name { display: inline-block; flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-work-heading h3 > span.member-alert-slot { flex: 0 0 auto; min-width: 0; max-width: 100%; margin-left: 0; overflow: visible; text-overflow: clip; white-space: normal; }
.member-work-heading h3:has(.member-alert-slot:not([hidden])) > .self-chip { margin-left: 0; }
.member-work-panel:has(.member-alert-slot) > .member-attention { position: static; top: auto; right: auto; z-index: auto; justify-content: flex-end; margin: 0 0 5px; pointer-events: auto; }
.member-work-panel:has(.member-alert-slot) .member-work-tasks > .compact-task:first-child .project-tag { max-width: 100%; }
.member-work-panel:has(.member-alert-slot) .member-work-tasks > .compact-task:first-child .card-menu { top: 6px; }
.member-work-panel:has(.member-alert-slot) .member-work-tasks > .compact-task:first-child h3 { padding-right: 0; }

.task-alert-icon { display: inline-block; flex: 0 0 auto; width: 16px; height: 16px; vertical-align: middle; }
.task-alert-panel { position: fixed; inset: auto; z-index: 120; display: flex; flex-direction: column; box-sizing: border-box; width: 330px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); margin: 0; padding: 0; overflow: hidden; border: 1px solid #dfd6cc; border-radius: 9px; background: #fff; color: #263748; font-family: inherit; font-size: 12px; line-height: 1.55; box-shadow: 0 9px 29px #49311b23; text-align: left; }
.task-alert-panel[popover]:not(:popover-open) { display: none; }
.task-alert-panel::backdrop { background: transparent; pointer-events: none; }
.task-alert-panel *, .task-alert-panel *::before, .task-alert-panel *::after { box-sizing: border-box; }
.task-alert-panel button { font-family: inherit; }
.task-alert-panel-head { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 14px 8px; }
.task-alert-panel-head h2 { min-width: 0; margin: 0; color: #213245; font-size: 14px; font-weight: 750; line-height: 22px; overflow-wrap: anywhere; }
.task-alert-close { display: inline-grid; flex: 0 0 23px; place-items: center; width: 23px; height: 23px; margin: -1px -2px 0 0; padding: 3px; border: 0; border-radius: 4px; background: transparent; color: #8b9bad; cursor: pointer; }
.task-alert-close:hover { color: #6d7c8d; background: #f4f1ed; }
.task-alert-close .task-alert-icon { width: 17px; height: 17px; }
.task-alert-panel-body { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c8b8a9 transparent; }
.task-alert-panel-body::-webkit-scrollbar { width: 4px; }
.task-alert-panel-body::-webkit-scrollbar-track { background: transparent; }
.task-alert-panel-body::-webkit-scrollbar-thumb { border-radius: 4px; background: #c8b8a9; }
.task-alert-message { display: flex; align-items: flex-start; gap: 9px; min-width: 0; margin: 5px 14px 14px; }
.task-alert-avatar { display: inline-grid; flex: 0 0 31px; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #eee5db; color: #876446; font-size: 15px; font-weight: 650; line-height: 1; }
.task-alert-message > div { min-width: 0; flex: 1; }
.task-alert-message-meta { margin: 0; color: #8391a0; font-size: 11px; line-height: 19px; }
.task-alert-message-meta strong { color: #435366; font-size: 12px; font-weight: 650; }
.task-alert-kind { display: inline-block; margin-right: 6px; color: #746a60; font-size: 11px; font-weight: 650; line-height: 18px; }
.task-alert-message-body { display: -webkit-box; margin: 3px 0 0; overflow: hidden; color: #697788; font-size: 12px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.task-alert-panel-actions { display: flex; align-items: center; justify-content: flex-end; margin: 0 14px; padding: 10px 0 12px; border-top: 1px solid #e9e9e7; }
.task-alert-source { display: inline-flex; align-items: center; justify-content: flex-start; gap: 5px; min-height: 24px; margin: 0; padding: 2px 0; border: 0; border-radius: 3px; background: transparent; color: #966a48; font-family: inherit; font-size: 11px; font-weight: 600; line-height: 20px; text-align: left; cursor: pointer; }
.task-alert-source:hover { color: #704b31; text-decoration: underline; text-underline-offset: 3px; }
.task-alert-source .task-alert-icon { width: 15px; height: 15px; }
.task-alert-panel button:disabled { cursor: wait; opacity: .5; }
.task-alert-member-scope { margin: -2px 14px 10px; color: #7b8da3; font-size: 11px; line-height: 18px; }
.task-alert-member-totals { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin: 0 14px 4px; padding: 9px 10px; border-radius: 6px; background: #f8f5f1; color: #956a4a; font-size: 11px; font-weight: 650; line-height: 19px; }
.task-alert-member-totals > span { display: inline-flex; align-items: center; gap: 6px; }
.task-alert-member-totals i { width: 7px; height: 7px; border-radius: 50%; background: #e53e4c; }
.task-alert-unresolved-total i { background: #ffc35b; }
.task-alert-member-row { min-width: 0; margin: 0 14px; padding: 12px 0 10px; border-top: 1px solid #e9e9e7; }
.task-alert-member-row:first-child { border-top: 0; }
.task-alert-member-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; min-width: 0; }
.task-alert-member-row-head > strong { flex: 1 1 112px; min-width: 0; color: #253547; font-size: 12px; font-weight: 700; line-height: 19px; overflow-wrap: anywhere; }
.task-alert-row-badges { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.task-alert-static-badge { min-height: 20px; padding: 0 5px; font-size: 10px; line-height: 18px; }
.task-alert-hidden-label { display: inline-flex; align-items: center; min-height: 20px; padding: 0 5px; border-radius: 4px; background: #f1f3f6; color: #8291a3; font-size: 10px; line-height: 18px; white-space: nowrap; }
.task-alert-member-row-head > time { margin-left: auto; color: #8899ae; font-size: 10px; line-height: 18px; white-space: nowrap; }
.task-alert-review-label { margin: 3px 0 0; color: #7e8da1; font-size: 11px; line-height: 18px; }
.task-alert-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 4px; }
.task-alert-row-actions .task-alert-source { min-height: 22px; font-weight: 500; line-height: 18px; }
.task-alert-empty { margin: 0; padding: 12px 14px 18px; color: #8794a3; font-size: 12px; line-height: 20px; }
.task-alert-error { margin: 5px 14px 12px; padding: 7px 9px; border-radius: 4px; background: #fff1ec; color: #a46344; font-size: 11px; line-height: 18px; overflow-wrap: anywhere; }
.task-card.task-alert-pulse { animation: task-alert-card-arrival 2s ease-out 1; }
.member-alert-slot.task-alert-pulse .member-alert-bell { animation: task-alert-bell-arrival 2s ease-out 1; }
@keyframes task-alert-card-arrival { 0%, 100% { box-shadow: none; } 20%, 55% { box-shadow: 0 0 0 2px #e7b67466, 0 0 14px #e7b67428; } }
@keyframes task-alert-bell-arrival { 0%, 100% { box-shadow: none; } 25%, 55% { box-shadow: 0 0 0 5px #edb2b52b, 0 0 0 9px #edb2b512; } }
@media (prefers-reduced-motion: reduce) {
  .task-card.task-alert-pulse, .member-alert-slot.task-alert-pulse .member-alert-bell { animation: none; }
}
@media (max-width: 360px) {
  .member-alert-label { padding-left: 4px; padding-right: 4px; }
  .task-alert-panel-head { padding: 12px 12px 7px; }
  .task-alert-panel-head h2 { font-size: 13px; }
  .task-alert-member-scope, .task-alert-member-totals { margin-left: 12px; margin-right: 12px; }
  .task-alert-member-row { margin-left: 12px; margin-right: 12px; }
}
