/* messages.css: messages said where they happen (boards 110 to 116, option C) and the one look of delete buttons.
   Loaded last, so these rules win over the older per-screen button styles. */

/* ---------- the button answers ---------- */
/* written against the window and bar button rules it replaces for a moment (.ac .bd-btn.dark, .bar .btn.primary) */
button.answered, .answered.bd-btn, .answered.btn, .answered.del,
.ac .answered.bd-btn.dark, .ac .answered.bd-btn.dark:hover, .ac .answered.bd-btn.dark:disabled, .ac .answered.ac-del,
.qn .answered.bd-btn.dark, .qn .answered.bd-btn.dark:hover, .qn .answered.bd-btn.dark:disabled,   /* Write a note: its window is .qn, not .ac */
:is(.og-panel, .og-gate) .answered.bd-btn.dark, :is(.og-panel, .og-gate) .answered.bd-btn.dark:disabled,
.bar .answered.btn.primary, .bar .answered.btn.primary:hover, .crmwrap .answered.btn, .crmwrap .answered.btn:hover {
  background: var(--bd-green-fill); background-image: none; border-color: var(--bd-green-fill); color: var(--bd-on-ink);
  opacity: 1; pointer-events: none; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.answered .ok-tick { flex: none; }
@media (prefers-reduced-motion: no-preference) { button.answered { transition: background-color .15s, color .15s; } }

/* ---------- the row you changed says so: a line of its own at the end of the row, for 8 s ---------- */
.chg { box-shadow: inset 3px 0 0 var(--bd-green); }
.chg-line { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin: 2px 0 0; padding: 0;
  font: 500 12px/1.5 var(--sans); color: var(--bd-green); letter-spacing: 0; text-transform: none; text-align: right; white-space: nowrap; }
.chg-grid > .chg-line { grid-column: 1 / -1; }
.chg-wrap { flex-wrap: wrap; }
.chg-wrap > .chg-line { flex: 0 0 100%; }
.chg-line .chg-undo { color: var(--bd-green); font: inherit; min-height: 0; padding: 0; text-decoration: underline; }
.chg-line.out { opacity: 0; transition: opacity .3s; }
li.chg, tr.chg { box-shadow: none; }
/* cards whose text starts flush left (team, figures): the bar sits in the gap beside the card, not over its text */
:is(.gp-card, .gp-ftile).chg { box-shadow: none; position: relative; }
:is(.gp-card, .gp-ftile).chg::before { content: ''; position: absolute; left: -10px; top: 0; bottom: 0; width: 3px; background: var(--bd-green); }
@media (prefers-reduced-motion: no-preference) { .chg-line { animation: chg-in .2s ease-out; } }
@keyframes chg-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- a hint in a window: neutral, not an error ---------- */
.ac-err.hint { border-color: var(--bd-line2); background: var(--bd-rail); }
.ac-err.hint::before { background: var(--bd-navy); }

/* ---------- Recent: the bell in the bar and its list ---------- */
.rc-bell { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--bd-hero-line); background: none; color: var(--white); cursor: pointer; flex: none; align-self: center; }
.rc-bell:hover, .rc-bell[aria-expanded="true"] { border-color: var(--bd-hero-muted); }
.rc-bell.dot::after { content: ''; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: var(--bd-warn); }
.rc-panel { position: fixed; z-index: var(--z-toast); width: 420px; max-width: calc(100vw - 24px); max-height: min(70vh, 560px); display: flex; flex-direction: column;
  background: var(--bd-paper); color: var(--bd-text); border: 1px solid var(--bd-line2); box-shadow: 0 16px 40px var(--bd-shadow); }
.rc-panel[hidden] { display: none; }
.rc-head { display: flex; align-items: center; gap: 12px; padding: 10px 6px 8px 20px; border-bottom: 1px solid var(--bd-line); }
.rc-title { flex: 1; margin: 0; font: 400 20px/1.2 var(--serif); color: var(--bd-ink); }
.rc-clear { font-size: 13px; }
.rc-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.rc-it { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; border-bottom: 1px solid var(--bd-line); }
.rc-it .nt-mark { margin-top: 6px; }
.rc-it.info .nt-mark { background: var(--bd-navy); }
.rc-it.warn .nt-mark { background: var(--bd-warn); }
.rc-it.bad .nt-mark { background: var(--bd-burg); }
.rc-it.info .nt-k { color: var(--bd-navy); }
.rc-it.warn .nt-k { color: var(--bd-ink); }
.rc-it.bad .nt-k { color: var(--bd-burg); }
.rc-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rc-t { font-size: 13.5px; line-height: 1.4; color: var(--bd-text); overflow-wrap: anywhere; }
.rc-at { flex: none; font-size: 12px; color: var(--bd-muted); font-variant-numeric: tabular-nums; }
.rc-none { margin: 0; padding: 18px 20px; font-size: 13.5px; color: var(--bd-muted); }
.rc-foot { margin: 0; padding: 10px 20px; font-size: 12.5px; color: var(--bd-muted); }
#btab button.rc-dot, #acctRecent.rc-dot { position: relative; }
/* phone: Outlook's light, on the Profile tab just left of its icon; it fades in and out, so nothing on the page moves */
#btab button[data-tab=""] { position: relative; }
#btab button[data-tab=""]::before { content: ''; position: absolute; top: 15px; right: calc(50% + 17px); width: 8px; height: 8px; background: var(--bd-bad); opacity: 0; transition: opacity .3s; pointer-events: none; }
#btab button.ol-off[data-tab=""]::before { opacity: 1; }
#btab button.ol-wait[data-tab=""]::before { opacity: 1; background: var(--bd-warn); }
#btab button.rc-dot::after { content: ''; position: absolute; top: 6px; left: calc(50% + 8px); width: 8px; height: 8px; background: var(--bd-warn); }
#acctRecent.rc-dot .acct-rt::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 8px; vertical-align: middle; background: var(--bd-warn); }
/* phone: the bar is full (title, Add, Edit); Recent lives in the Profile tab, which carries the dot */
@media (max-width: 640px) {
  .rc-bell { display: none; }
  .rc-panel { left: 12px; right: 12px; width: auto; }
}

/* the phone profile menu sits where corner notices are: they step aside while it is open, as for menus */
body:has(#sheetWrap:not([hidden])) .nt-stack { opacity: 0; }
body:has(#sheetWrap:not([hidden])) .nt-stack .nt { pointer-events: none; }

/* ---------- delete buttons: red text and the bin, everywhere ---------- */
:is(button, a).del, :is(button, a).del:hover, :is(button, a).del:focus-visible {
  display: inline-flex; align-items: center; gap: 6px; padding-left: 0; padding-right: 0; border-color: transparent; background: none; background-image: none;
  color: var(--bd-burg); font-weight: 500; cursor: pointer; white-space: nowrap; box-shadow: none;
}
:is(button, a).del[hidden] { display: none; }
:is(button, a).del:hover { text-decoration: underline; }
:is(button, a).del .bin-i { flex: none; }
:is(button, a).del[data-sure="1"], :is(button, a).del[data-arm="1"], :is(button, a).del.sure { font-weight: 600; background: none; color: var(--bd-burg); }
.kitem.del { padding-left: 16px; padding-right: 16px; width: 100%; justify-content: flex-start; }
.kitem.del:hover, .kitem.del:focus-visible { background: var(--bd-err-bg); color: var(--bd-burg); text-decoration: none; }
.bd-bin.del { width: 28px; padding: 0; justify-content: center; }
.del-action.del, .del-action.del:hover { flex-direction: column; justify-content: center; gap: 4px; background: var(--del); color: var(--white); }
