/* Navbar qo'ng'iroq belgisi va uning ochiladigan oynasi
   (notifications/_bell.html, templates/base.html, core/home.html).
   .dropdown/.dropdown-menu'ning o'zi (fon/border/soya) Bootstrap +
   theme.css orqali allaqachon ikkala mavzuda ham to'g'ri ishlaydi
   (avatar menyusi bilan bir xil) -- bu yerda faqat ichki tarkib
   (qo'ng'iroq ikonkasi, badge, ro'yxat qatorlari) uslublanadi. */

.notif-bell__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: inherit;
}

.notif-bell__badge {
  position: absolute;
  top: 0.1rem;
  right: 0.1rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--color-notice);
  /* --color-notice stays a bright amber in both themes (theme.css) --
     --color-text would flip to near-white in dark mode and fail contrast
     here, so a fixed dark tone is used instead (plain black at 80%, not a
     new token -- no other badge in the project puts readable text directly
     on --color-notice yet). */
  color: rgba(0, 0, 0, 0.8);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
}

.notif-dropdown {
  width: 22rem;
  max-width: calc(100vw - 2rem);
  padding: 0;
  overflow: hidden;
}

/* 2026-10-14 tuzatish: .notif-bell navbar ichida HAR XIL joyda turishi
   mumkin (base.html'da o'ng chetga yaqin, lekin home.html'ning yig'ilgan
   mobil menyusida chapga yaqinroq) -- shuning uchun qo'ng'iroqqa nisbatan
   "o'ngga tekislash" (dropdown-menu-end) tor ekranlarda oyna chap chetdan
   tashqariga chiqib ketishiga olib kelgan (xabarlar matni ko'rinmay
   qolgan). `data-bs-display="static"` (notifications/_bell.html) orqali
   Popper butunlay o'chirilgan -- o'rniga shu yerda ekran (viewport)ga
   nisbatan, qo'ng'iroqning aniq joylashuvidan MUSTAQIL pozitsiya
   beriladi, shunda qayerda bo'lishidan qat'i nazar har doim to'liq
   ko'rinadi. */
@media (max-width: 575.98px) {
  .notif-dropdown {
    position: fixed;
    inset: 15vh 1rem auto 1rem;
    top: 15vh;
    width: auto;
    max-width: none;
    max-height: 70vh;
  }

  .notif-dropdown__list {
    max-height: 50vh;
  }
}

.notif-dropdown__list {
  max-height: 22rem;
  overflow-y: auto;
}

.notif-dropdown__status {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.notif-dropdown__item {
  margin: 0;
  border-bottom: 1px solid var(--color-border);
}

.notif-dropdown__item:last-child {
  border-bottom: none;
}

.notif-dropdown__item-btn {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0.65rem 1rem;
  border: 0;
  background: none;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}

.notif-dropdown__item-btn:hover {
  background: var(--color-bg);
}

.notif-dropdown__item--unread {
  position: relative;
}

.notif-dropdown__item--unread::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--color-notice);
}

.notif-dropdown__item-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.notif-dropdown__item-body {
  margin-top: 0.1rem;
  color: var(--color-muted);
  font-size: 0.82rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notif-dropdown__item-time {
  margin-top: 0.25rem;
  color: var(--color-muted);
  font-size: 0.75rem;
}

.notif-dropdown__all {
  display: block;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.notif-dropdown__all:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

/* To'liq sahifa (notifications/list.html) -- har bir qator o'zi
   <button type="submit"> (forma "o'qildi deb belgilash"ni yuboradi),
   .surface-card uslubida ko'rinadigan qilib qayta uslublanadi. */
.notif-row-form {
  margin: 0;
}

.notif-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
  cursor: pointer;
}

.notif-row:hover {
  border-color: var(--color-border-strong);
}

.notif-row__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-muted);
}

.notif-row--unread .notif-row__icon {
  background: color-mix(in srgb, var(--color-notice) 18%, var(--color-surface));
  color: var(--color-notice);
}

.notif-row__content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.notif-row__title {
  color: var(--color-text);
  font-weight: 500;
}

.notif-row--unread .notif-row__title {
  font-weight: 700;
}

.notif-row__body {
  margin-top: 0.15rem;
  white-space: pre-line;
  color: var(--color-muted);
  font-size: 0.88rem;
}

.notif-row__time {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--color-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .notif-row {
    flex-wrap: wrap;
  }

  .notif-row__time {
    margin-left: calc(2.25rem + 0.75rem);
  }
}
