/* Notification bell + dropdown */
.ab-header-actions { display:flex; align-items:center; gap:1rem; margin-left:auto; }

.ab-bell-wrapper { position:relative; }
.ab-bell-btn { position:relative; display:inline-flex; align-items:center; justify-content:center; width:2.25rem; height:2.25rem; border-radius:50%; border:0; background:#fff; color:#4b5563; cursor:pointer; box-shadow:0 0 0 1px #e5e7eb; transition:background .15s,color .15s, box-shadow .15s; }
.ab-bell-btn:hover { background:#f1f5f9; color:#111827; }
.ab-bell-btn:focus { outline:none; box-shadow:0 0 0 3px rgba(37,99,235,.3); }
.ab-bell-btn .bi { font-size:1.05rem; }
.ab-bell-badge { position:absolute; top:.35rem; right:.35rem; min-width:1rem; height:1rem; padding:0 .25rem; background:#dc2626; color:#fff; border-radius:.5rem; font-size:.6rem; line-height:1rem; font-weight:600; display:inline-flex; align-items:center; justify-content:center; }

.ab-bell-dropdown { position:absolute; top:calc(100% + .5rem); right:0; width:22rem; max-height:30rem; background:#fff; border:1px solid #e5e7eb; border-radius:.75rem; box-shadow:0 10px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04); padding:.75rem 0; display:none; z-index:1100; }
.ab-bell-dropdown.ab-open { display:block; animation:abBellFade .18s ease; }
@keyframes abBellFade { from { opacity:0; transform:translateY(-4px);} to { opacity:1; transform:translateY(0);} }

.ab-bell-head { display:flex; align-items:center; justify-content:space-between; padding:.25rem 1rem .5rem; }
.ab-bell-head h6 { font-size:.75rem; letter-spacing:.05em; text-transform:uppercase; margin:0; color:#6b7280; font-weight:600; }
.ab-bell-head a { font-size:.72rem; text-decoration:none; color:#2563eb; }
.ab-bell-head a:hover { text-decoration:underline; }

.ab-bell-list { list-style:none; margin:0; padding:0; max-height:20rem; overflow-y:auto; }
.ab-bell-item { padding:.65rem 1rem; display:flex; gap:.75rem; align-items:flex-start; font-size:.75rem; line-height:1.15rem; cursor:pointer; position:relative; }
.ab-bell-item:hover { background:#f8fafc; }
.ab-bell-item.unread { background:#eff6ff; }
.ab-bell-item.unread::before { content:""; position:absolute; left:.5rem; top:.95rem; width:.4rem; height:.4rem; border-radius:50%; background:#dc2626; }

.ab-bell-item-icon { flex:0 0 2rem; height:2rem; border-radius:.5rem; background:#eef2f7; display:flex; align-items:center; justify-content:center; color:#475569; font-size:.9rem; }

/* Notification type colors */
.ab-bell-item[data-type="success"] .ab-bell-item-icon { background:#dcfce7; color:#16a34a; }
.ab-bell-item[data-type="success"] .ab-bell-item-title { color:#15803d; }
.ab-bell-item[data-type="error"] .ab-bell-item-icon { background:#fee2e2; color:#dc2626; }
.ab-bell-item[data-type="error"] .ab-bell-item-title { color:#dc2626; }
.ab-bell-item[data-type="info"] .ab-bell-item-icon { background:#e0f2fe; color:#0284c7; }

.ab-bell-item-body { flex:1 1 auto; min-width:0; }
.ab-bell-item-title { font-weight:600; color:#111827; margin:0 0 .15rem; font-size:.72rem; }
.ab-bell-item-desc { margin:0; color:#4b5563; font-size:.68rem; }
.ab-bell-item-time { flex:0 0 auto; font-size:.65rem; color:#94a3b8; white-space:nowrap; margin-left:.5rem; align-self:flex-start; margin-top:.1rem; }

.ab-bell-empty { padding:1.5rem 1rem; text-align:center; font-size:.7rem; color:#6b7280; }

/* Scrollbar minimal */
.ab-bell-list::-webkit-scrollbar { width:.5rem; }
.ab-bell-list::-webkit-scrollbar-track { background:transparent; }
.ab-bell-list::-webkit-scrollbar-thumb { background:#cbd5e1; border-radius:1rem; }
.ab-bell-list::-webkit-scrollbar-thumb:hover { background:#94a3b8; }

/* Hide OrchardCore's default user menu on site pages only (not admin) */
html:not([data-ab-admin]) .navbar .navbar-nav .nav-item.dropdown.nav-item-user,
html:not([data-ab-admin]) .navbar .navbar-nav .dropdown:has(> .nav-link.dropdown-toggle),
html:not([data-ab-admin]) .navbar-user,
html:not([data-ab-admin]) #user-menu,
html:not([data-ab-admin]) .ta-navbar-nav .nav-item.dropdown:has(a[href*="Admin"]),
html:not([data-ab-admin]) .ta-navbar-nav .nav-item:has(a[href*="Admin"]),
html:not([data-ab-admin]) .navbar-nav > .nav-item.dropdown:not(:has(.ab-header-actions)),
html:not([data-ab-admin]) .navbar .navbar-nav > li.nav-item.dropdown,
html:not([data-ab-admin]) .navbar-collapse .navbar-nav .nav-item.dropdown,
html:not([data-ab-admin]) .navbar-expand .navbar-nav .dropdown,
html:not([data-ab-admin]) nav[role="navigation"] .navbar-nav .dropdown,
html:not([data-ab-admin]) header.navbar .navbar-nav .dropdown {
  display: none !important;
}

/* User menu dropdown */
.ab-header-actions .dropdown .btn-link { 
  color:#4b5563; 
  padding:.5rem .75rem;
  font-weight:500;
  font-size:.9rem;
}
.ab-header-actions .dropdown .btn-link:hover { 
  color:#111827; 
  background:#f1f5f9;
  border-radius:.5rem;
}
.ab-header-actions .dropdown .btn-link:focus {
  outline:none;
  box-shadow:0 0 0 3px rgba(37,99,235,.3);
}
.ab-header-actions .dropdown .bi-person-circle {
  color:#6b7280;
}
.ab-header-actions .dropdown-menu {
  border:1px solid #e5e7eb;
  border-radius:.5rem;
  box-shadow:0 10px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
  padding:.5rem 0;
  min-width:12rem;
  margin-top:.5rem;
}
.ab-header-actions .dropdown-item {
  padding:.5rem 1rem;
  font-size:.875rem;
  display:flex;
  align-items:center;
  color:#111827;
}
.ab-header-actions .dropdown-item:hover {
  background:#f8fafc;
  color:#111827;
}
.ab-header-actions .dropdown-item.text-danger {
  color:#dc2626;
}
.ab-header-actions .dropdown-item.text-danger:hover {
  background:#fef2f2;
  color:#b91c1c;
}
.ab-header-actions .dropdown-item form {
  margin:0;
  width:100%;
}
.ab-header-actions .dropdown-item button {
  width:100%;
  text-align:left;
  background:transparent;
  border:0;
  padding:0;
  cursor:pointer;
  display:flex;
  align-items:center;
  color:inherit;
  font:inherit;
}

/* Toast notifications (reusable) */
.ab-toast-stack { position:fixed; top:16px; right:16px; display:flex; flex-direction:column; gap:12px; width:min(420px, calc(100vw - 32px)); z-index:1300; pointer-events:none; }
.ab-toast { background:#fff !important; border-radius:10px; overflow:hidden; box-shadow:0 12px 24px rgba(0,0,0,.15); transform:translateY(-6px); opacity:0; transition:opacity .18s ease, transform .18s ease; pointer-events:auto; }
.ab-toast.show { opacity:1; transform:translateY(0); }
.ab-toast-head { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:#deefe6; color:#1f2937; }
.ab-toast-left { display:flex; align-items:center; gap:12px; }
.ab-toast-icon { width:28px; height:28px; border-radius:8px; background:#fff; display:flex; align-items:center; justify-content:center; color:#64748b; box-shadow:0 0 0 1px rgba(0,0,0,.05) inset; }
.ab-toast-title { font-size:1.125rem; line-height:1; font-weight:600; letter-spacing:.01em; color:#1f2937; }
.ab-toast-right { display:flex; align-items:center; gap:12px; }
.ab-toast-time { color:#6b7280; font-size:1rem; }
.ab-toast-close { background:transparent; border:0; color:#6b7280; font-size:1.5rem; line-height:1; cursor:pointer; padding:0; }
.ab-toast-close:hover { color:#1f2937; }
.ab-toast-body { background:#1f7a3d; color:#fff; padding:16px 20px; font-size:1.25rem; line-height:1.4; }

/* Variants */
.ab-toast-success .ab-toast-head { background:#deefe6 !important; }
.ab-toast-success .ab-toast-body { background:#1f7a3d !important; color:#fff !important; }
.ab-toast-success .ab-toast-icon { color:#1f7a3d; }

.ab-toast-error .ab-toast-head { background:#fde8e8 !important; }
.ab-toast-error .ab-toast-title { color:#991b1b !important; }
.ab-toast-error .ab-toast-body { background:#b91c1c !important; color:#fff !important; }
.ab-toast-error .ab-toast-icon { color:#dc2626 !important; }
.ab-toast-error .ab-toast-close { color:#991b1b !important; }
.ab-toast-error .ab-toast-close:hover { color:#7f1d1d !important; }

.ab-toast-warning .ab-toast-head { background:#fef3c7 !important; }
.ab-toast-warning .ab-toast-title { color:#92400e !important; }
.ab-toast-warning .ab-toast-body { background:#d97706 !important; color:#fff !important; }
.ab-toast-warning .ab-toast-icon { color:#f59e0b !important; }
.ab-toast-warning .ab-toast-close { color:#92400e !important; }
.ab-toast-warning .ab-toast-close:hover { color:#78350f !important; }
