/* Notifications and Reminders styles added by the 1 Oct 2026 CRM fixes. Loads after flashfix-app.css.
   Every class here starts alr- so it cannot restyle another feature (flashfix-app.css is one global sheet). */

/* ---- Notifications: the list ------------------------------------------------------------------ */
.alr-group-select { width: auto; min-width: 150px; }

.alr-item { align-items: center; }
.alr-item .event-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--brass), transparent 85%); color: var(--brass); }
.alr-item .event-icon .ui-icon { width: 13px; height: 13px; }
.alr-item.warning .event-icon { background: color-mix(in srgb, var(--orange, #e8a33d), transparent 84%); color: var(--orange, #e8a33d); }
.alr-item.critical .event-icon { background: color-mix(in srgb, var(--red, #e5484d), transparent 84%); color: var(--red, #e5484d); }
.alr-item.unread b { font-weight: 700; }
/* Read alerts stay in "All" as history: quieter, but still legible. */
.alr-item.is-read b { font-weight: 500; color: var(--muted); }
.alr-item.is-read .event-icon { background: var(--surface-control); color: var(--muted); }

.alr-text { display: grid; gap: 2px; min-width: 0; }
.alr-text b,
.alr-text small { overflow-wrap: anywhere; }
.alr-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.alr-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 11.5px; }

/* A one-line message above a list: an alert that has already gone, a load that failed, a write that was refused. */
.alr-notice { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 9px 12px; border: 1px solid var(--border); border-left: 3px solid var(--blue); border-radius: 8px; background: var(--surface-panel); color: var(--text); font-size: 12px; }
.alr-notice .ui-icon { width: 14px; height: 14px; color: var(--blue); }
.alr-notice.is-error { border-left-color: var(--red, #e5484d); }
.alr-notice.is-error .ui-icon { color: var(--red, #e5484d); }

/* ---- Reminders: the pointer to lead chases, and who dealt with a reminder ----------------------- */
.alr-callout { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-panel); color: var(--text); text-decoration: none; transition: border-color .14s ease; }
.alr-callout:hover { border-color: var(--accent); }
.alr-callout:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alr-callout-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--brass), transparent 85%); color: var(--brass); }
.alr-callout-icon .ui-icon { width: 14px; height: 14px; }
.alr-callout-text { display: grid; gap: 2px; min-width: 0; }
.alr-callout-text b { font-size: 12.5px; }
.alr-callout-text small { font-size: 11.5px; color: var(--muted); }
.alr-callout-go { color: var(--muted); }
.alr-callout:hover .alr-callout-go { color: var(--accent); }

.alr-actioned,
.alr-actioned-note { display: block; margin-top: 3px; font-size: 10.5px; line-height: 1.35; }
.alr-actioned-note { font-style: italic; overflow-wrap: anywhere; }

/* ---- Narrow screens: actions drop under the text instead of squeezing it --------------------- */
@media (max-width: 640px) {
    .alr-item { grid-template-columns: 24px minmax(0, 1fr); }
    .alr-actions { grid-column: 2; justify-content: flex-start; }
    .alr-more { flex-direction: column; align-items: stretch; }
    .alr-group-select { width: 100%; }
}
