/* ===========================
   NAVBAR NOTIFICATIONS (bell)
   ===========================
   Recommended structure:

   <button class="nav-link nav-icon-btn" ...>
     <span class="nav-icon-stack">
       <i class="bi bi-bell"></i>
       <span class="nav-notif-badge">2</span>   // or: <span class="nav-notif-dot"></span>
     </span>
   </button>
*/

/* make sure absolute children always have a positioning context */
.nav-icon-btn{
  position: relative;
}

/* 24×24 icon box so the badge anchors to the icon (not the 60px-tall navbar) */
.nav-icon-stack{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.nav-icon-stack > .bi{
  line-height: 1;
  font-size: 1.15rem;
}

/* numeric count bubble (overlaps the bell nicely) */
.nav-notif-badge{
  position: absolute;
  top: 0;
  right: 0;

  /* push it out of the icon box a bit (this is what fixes the “looks off”) */
  transform: translate(45%, -45%);

  height: 16px;
  min-width: 16px;
  padding: 0 5px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.2px;
  font-variant-numeric: tabular-nums;

  color: rgba(255,255,255,.98);

  background-color: rgba(59,130,246,.95);
  background-image: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0));

  /* ring that matches the navbar + soft elevation */
  box-shadow:
    0 0 0 2px var(--nav-bg, #07263f),
    0 6px 16px rgba(0,0,0,.22);

  pointer-events: none;
}

/* simple unread dot (if you don’t want a number) */
.nav-notif-dot{
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(35%, -35%);

  width: 9px;
  height: 9px;
  border-radius: 999px;

  background: #ff4d4f;

  box-shadow:
    0 0 0 2px var(--nav-bg, #07263f),
    0 6px 14px rgba(0,0,0,.18);

  pointer-events: none;
}


/* ===========================
   NOTIFICATIONS OFFCANVAS
   =========================== */

/* Notifications Offcanvas (dark glass) */
.notifications-offcanvas.offcanvas{
  background: linear-gradient(180deg, rgba(10, 40, 68, .95) 0%, rgba(7, 28, 48, .98) 100%);
  color: rgba(255,255,255,.92);
  border-left: 1px solid rgba(255,255,255,.08);
  box-shadow: -24px 0 50px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}

.notifications-offcanvas .offcanvas-header{
  padding: 1rem 1rem .85rem;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 100%);
}

.notifications-offcanvas .offcanvas-title{
  color: rgba(255,255,255,.95);
  letter-spacing: .2px;
}

/* Make Bootstrap “muted” readable on dark */
.notifications-offcanvas .text-muted{
  color: rgba(255,255,255,.62) !important;
}

.notifications-offcanvas .btn-close{
  filter: invert(1);
  opacity: .65;
}
.notifications-offcanvas .btn-close:hover{ opacity: .95; }

.notifications-offcanvas .offcanvas-body{
  padding: .85rem 1rem 1rem;
}

.notifications-offcanvas hr{
  border-color: rgba(255,255,255,.10) !important;
  opacity: 1;
}

/* Buttons inside the drawer */
.notifications-offcanvas .btn-ghost{
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: .65rem;
  padding: .42rem .65rem;
  font-weight: 600;
  transition: transform .12s ease, background .16s ease, border-color .16s ease;
}
.notifications-offcanvas .btn-ghost:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.22);
  transform: translateY(-1px);
}
.notifications-offcanvas .btn-ghost:active{
  transform: translateY(0);
  background: rgba(255,255,255,.10);
}

/* List layout */
.notifications-offcanvas .notif-list{
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

/* Card-like items */
.notifications-offcanvas .notif-list .list-group-item{
  margin: 0;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .85rem !important;
  padding: .85rem .85rem;
  color: rgba(255,255,255,.92);
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.notifications-offcanvas .notif-list .list-group-item:hover{
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,.22);
}

.notifications-offcanvas .notif-list .list-group-item:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.14), 0 14px 28px rgba(0,0,0,.22);
}

/* Unread state */
.notifications-offcanvas .notif-item.is-unread{
  background: rgba(13,110,253,.14);
  border-color: rgba(13,110,253,.30);
}
.notifications-offcanvas .notif-item.is-unread:hover{
  background: rgba(13,110,253,.18);
}

/* LEFT dot in the list (not positioned like a navbar badge) */
.notifications-offcanvas .notif-dot{
  position: static;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin: .35rem .65rem 0 .1rem;
  flex: 0 0 auto;

  background: rgba(255,255,255,.18);
  border: 2px solid var(--nav-bg, #07263f);
}

.notifications-offcanvas .notif-dot[data-unread="1"]{
  background: #0d6efd;
}

/* Text styles */
.notifications-offcanvas .notif-title{
  font-weight: 650;
  font-size: .95rem;
  line-height: 1.2;
}

.notifications-offcanvas .notif-time{
  color: rgba(255,255,255,.68);
  font-size: .78rem;
  white-space: nowrap;
}

.notifications-offcanvas .notif-meta{
  color: rgba(255,255,255,.70);
  font-size: .82rem;
}

.notifications-offcanvas .notif-delta{
  margin-left: auto;
  font-size: .82rem;
  font-weight: 700;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
}

.notifications-offcanvas .notif-delta.is-up{
  background: rgba(25, 135, 84, .22);
}

.notifications-offcanvas .notif-delta.is-down{
  background: rgba(220, 53, 69, .22);
}

/* Empty state on dark */
.notifications-offcanvas .notif-empty{
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: .85rem;
  padding: 1rem;
  text-align: center;
  margin-top: .5rem;
  background: rgba(255,255,255,.04);
}
.notifications-offcanvas .notif-empty__icon{
  font-size: 1.6rem;
  margin-bottom: .25rem;
  color: rgba(255,255,255,.70);
}

/* Natural action links */
.notifications-offcanvas .notif-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:.25rem;
  margin: .15rem 0 .65rem;
}

.notifications-offcanvas .notif-actionlink{
  display:inline-flex;
  align-items:center;
  gap:.45rem;

  padding: .34rem .55rem;
  border-radius: .65rem;

  background: transparent;
  border: 1px solid transparent;

  color: rgba(255,255,255,.78);
  font-weight: 650;
  font-size: .86rem;
  text-decoration: none;

  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
}

.notifications-offcanvas .notif-actionlink .bi{
  font-size: .95rem;
  opacity: .9;
}

.notifications-offcanvas .notif-actionlink:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  color: rgba(255,255,255,.95);
  transform: translateY(-1px);
}

.notifications-offcanvas .notif-actionlink:active{
  transform: translateY(0);
  background: rgba(255,255,255,.08);
}

.notifications-offcanvas .notif-actionlink:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.14);
}
