/* SPDX-License-Identifier: LicenseRef-LiberUnda-Freeware
   Copyright (C) 2026 Christophe Nutoni. All rights reserved.
   The Alerts and Failover screens. */
.al-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.al-banner { display: block; width: 100%; margin-bottom: 12px; padding: 10px 14px; border-radius: 10px; border: 2px solid var(--red); background: color-mix(in srgb, var(--red) 22%, transparent); color: var(--text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.al-state { margin-right: auto; font-size: 12px; color: var(--green); }
.al-state.bad { color: var(--red); font-weight: 700; }
.al-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.al-tile { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--edge); border-left: 4px solid var(--c); background: none; color: var(--text); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.al-tile b { font-size: 22px; letter-spacing: 0; }
.al-tile.on { background: color-mix(in srgb, var(--c) 18%, transparent); }
.al-critical { --c: var(--red); } .al-warning { --c: var(--amber); } .al-info { --c: #4C9EFF; } .al-resolved { --c: var(--green); }
.al-body { display: flex; flex-wrap: wrap; gap: 14px; }
.al-col { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.al-log { flex: 2 1 520px; }
.al-col h3 { margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.al-col h3 small { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
.al-list, .al-watch { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.al-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--edge); border-left: 4px solid var(--c); }
.al-item.seen { opacity: 0.8; }
.al-item time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.al-item div { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.al-item small { color: var(--soft); font-size: 12px; }
.al-pill { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--c); border: 1px solid var(--c); }
.al-watch li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--edge); font-size: 13px; }
.al-watch li i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.al-watch li.al-w-warning i { background: var(--amber); } .al-watch li.al-w-critical i { background: var(--red); }
.al-watch small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.al-form { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.al-form label:not(.check) { display: flex; flex-direction: column; gap: 4px; color: var(--soft); font-size: 12px; }
.al-form input:not([type=checkbox]), .al-form select { min-height: 32px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--edge); background: transparent; color: var(--text); font: inherit; font-size: 13px; }
.fo-alarm { display: flex; gap: 18px; align-items: center; padding: 20px; margin-bottom: 14px; border-radius: 14px; border: 3px solid var(--red); background: color-mix(in srgb, var(--red) 20%, transparent); }
.fo-alarm > b { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; background: var(--red); color: #fff; font-size: 30px; line-height: 52px; text-align: center; }
.fo-alarm h2 { margin: 2px 0 6px; font-size: 20px; }
.fo-alarm p { margin: 0; color: var(--soft); }
.fo-tag { color: var(--red) !important; font-weight: 800; letter-spacing: 0.08em; font-size: 12px; }
.fo-acts { display: flex; flex-direction: column; gap: 8px; }
.fo-act { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--edge); background: none; color: var(--text); font: inherit; text-align: left; }
button.fo-act { cursor: pointer; }
.fo-act.go { background: var(--green); border-color: var(--green); color: #0B0D10; }
.fo-act small { color: inherit; opacity: 0.8; font-size: 12px; }
.fo-act a { color: var(--text); font-weight: 700; }
@media (max-width: 640px) { .al-item { grid-template-columns: minmax(0, 1fr) auto; } .al-item time { grid-column: 1 / -1; } }
body[data-view="alerts"] .panel.log, body[data-view="failover"] .panel.log, body[data-view="alerts"] aside:not(.al-col), body[data-view="failover"] aside:not(.al-col) { display: none; }
.al-banner[hidden], #nav-failover { display: none; }
:root:root[data-skin="light"] .al-pill.al-info { --c: #1F5FBF; }
