/* DayzHUB Console: notification centre, install hint and phone-width polish (2026-10-02). Loaded after console.css, so the
   phone rules at the end win over the desktop ones. */

/* ── the bell ─────────────────────────────────────────── */
.cx-bell{position:relative}
.cx-bell-btn{position:relative;min-width:36px}
.cx-bell-n{position:absolute;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--c-bad);color:#fff;font:700 10px/17px var(--f-b);text-align:center}
.cx-bell-menu{width:min(380px,calc(100vw - 24px));padding:0;overflow:hidden}
.cx-bell-h{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--c-line)}
.cx-bell-list{max-height:min(60vh,420px);overflow-y:auto}
.cx-menu .cx-bell-item{display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border-radius:0;border-bottom:1px solid var(--c-line);min-height:44px}
.cx-bell-item.unread{background:var(--c-surface)}
.cx-bell-t{min-width:0;display:block;font-size:13px;color:var(--c-ink);overflow-wrap:anywhere}
.cx-bell-t small{display:block;margin-top:2px;color:var(--c-ink-3);font-size:11.5px}
.cx-bell-empty{padding:18px 14px;color:var(--c-ink-3);font-size:13px;text-align:center}
.cx-bell-f{display:flex;justify-content:space-between;gap:8px;padding:4px 6px}
.cx-menu .cx-bell-f a{min-height:40px;padding:0 8px}

/* ── severity dot, shared by the bell and the page ────── */
.cx-nc-sev{width:8px;height:8px;border-radius:50%;margin-top:7px;flex:none;background:var(--c-ink-4)}
.unread > .cx-nc-sev{background:var(--c-gold)}
.warning > .cx-nc-sev{background:var(--c-warn)}
.critical > .cx-nc-sev{background:var(--c-bad)}

/* ── /console/notifications ───────────────────────────── */
.cx-nc-tools{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:center}
.cx-nc-filter{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.cx-nc-filter .cx-select{width:auto;min-width:0;max-width:100%}
.cx-nc-list{list-style:none;margin:0;padding:0}
.cx-nc-item{display:flex;align-items:flex-start;gap:12px;padding:13px 18px;border-top:1px solid var(--c-line)}
.cx-nc-item.unread{background:rgba(231,201,139,.035)}
.cx-nc-main{flex:1;min-width:0}
.cx-nc-main > a,.cx-nc-main > span{color:var(--c-ink);overflow-wrap:anywhere}
.cx-nc-item.unread .cx-nc-main > a,.cx-nc-item.unread .cx-nc-main > span{font-weight:600}
.cx-nc-main > a:hover{color:var(--c-gold-2)}
.cx-nc-main small{display:block;margin-top:5px;color:var(--c-ink-3);font-size:12px}
.cx-nc-act{display:flex;gap:2px;flex:none}
.cx-nc-pager{display:flex;gap:12px;align-items:center;justify-content:center;border-top:1px solid var(--c-line)}
.cx-nc-matrix{min-width:540px}
.cx-nc-matrix th:not(:first-child),.cx-nc-matrix td:not(:first-child){text-align:center}
.cx-nc-matrix input[type=checkbox]{width:20px;height:20px;accent-color:var(--c-gold)}

/* ── install hint ─────────────────────────────────────── */
.cx-pwa-hint{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:60;max-width:540px;margin:0 auto;display:flex;align-items:center;gap:10px;background:var(--c-surface-2);border:1px solid var(--c-gold-line);border-radius:var(--c-r);padding:10px 12px;box-shadow:var(--c-shadow);font-size:13px;color:var(--c-ink-2)}
.cx-pwa-hint .bx-mobile-alt{font-size:22px;color:var(--c-gold)}
.cx-pwa-hint > span{flex:1;min-width:0}

/* ── phones (390 px and up to tablets) ────────────────── */
@media(max-width:920px){
  .cx-nav a{min-height:44px;display:flex;align-items:center}
  .cx-icon-btn{width:44px;height:44px}
  .cx-btn{min-height:40px}
  .cx-btn.sm{height:40px}
  .cx-input,.cx-select,.cx-textarea{min-height:44px;font-size:16px}
  .cx-check{min-height:44px}
  .cx-check input{width:20px;height:20px}
  .cx-head{flex-wrap:wrap;gap:12px}
  .cx-card-h,.cx-head{min-width:0}
  .cx-page img,.cx-page svg{max-width:100%}
  .cx-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
}
@media(max-width:640px){
  /* The top bar has a backdrop filter, which makes it the containing block of anything fixed inside it: so on phones the menu hangs
     from the top bar itself (absolute, full width with a 12 px margin) and the bell does not position it. */
  .cx-topbar{position:relative}
  .cx-bell{position:static;margin-left:auto}
  .cx-bell + .cx-lang-top{margin-left:0}
  .cx-menu.cx-bell-menu{position:absolute;left:12px;right:12px;top:calc(100% + 4px);width:auto;min-width:0}
  .cx-nc-item{padding:12px 14px}
  .cx-page{overflow-wrap:anywhere}
  .cx-head-r{width:100%}
  .cx-head-r .cx-btn{width:100%}
}

/* ── settings matrix: a table on wide screens, one card per category on phones ── */
.cx-nc-cat{white-space:normal}
.cx-nc-cell{display:inline-flex;align-items:center;justify-content:center;gap:10px;cursor:pointer}
.cx-nc-ch{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media(max-width:640px){
  .cx-nc-matrix{min-width:0}
  .cx-nc-matrix thead{display:none}
  .cx-nc-matrix tbody,.cx-nc-matrix tr{display:block}
  .cx-nc-matrix tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:10px;padding:12px 14px;border-bottom:1px solid var(--c-line)}
  .cx-nc-matrix td{display:block;padding:0;border:0;text-align:left!important;white-space:normal}
  .cx-nc-matrix td.cx-nc-cat{grid-column:1 / -1;padding-bottom:6px}
  .cx-nc-matrix td.cx-nc-na{display:none}
  .cx-nc-cell{display:flex;justify-content:flex-start;min-height:44px;width:100%}
  .cx-nc-ch{position:static;width:auto;height:auto;overflow:visible;clip:auto;font-size:13.5px;color:var(--c-ink-2)}
  .cx-nc-main > a{display:block;padding:9px 0;margin:-9px 0}
}
@media(max-width:920px){
  .cx-tabs a,.cx-tabs button{min-height:40px;display:inline-flex;align-items:center}
  .cx-crumbs a{display:inline-flex;align-items:center;min-height:40px}
  .cx-card-h .cx-link{display:inline-flex;align-items:center;min-height:40px}
}
