/* ════════════════════════════════════════════════════════
   NAGRIVA — Notifications Dropdown
   notifications-dropdown.css
════════════════════════════════════════════════════════ */

/* ─── Notification Bell (in navbar) ─── */
.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  color: var(--gray);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.notif-bell:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: var(--white);
}
.notif-bell svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}
.notif-bell:hover svg {
  transform: scale(1.08);
}
.notif-bell.active {
  color: var(--accent);
  border-color: rgba(0,245,196,0.15);
  background: rgba(0,245,196,0.06);
}

/* ─── Unread Badge ─── */
.notif-bell-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: linear-gradient(135deg, #ff5050, #ff3333);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 8px rgba(255,50,50,0.4), 0 0 0 1.5px var(--bg);
  transform: scale(0);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}
.notif-bell-badge.show {
  transform: scale(1);
}
.notif-bell-badge.pulse {
  animation: notifBadgePulse 0.5s ease;
}

@keyframes notifBadgePulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ─── Bell ring animation ─── */
.notif-bell.ring svg {
  animation: notifBellRing 0.5s ease;
}
@keyframes notifBellRing {
  0%   { transform: rotate(0); }
  15%  { transform: rotate(12deg); }
  30%  { transform: rotate(-10deg); }
  45%  { transform: rotate(6deg); }
  60%  { transform: rotate(-4deg); }
  80%  { transform: rotate(2deg); }
  100% { transform: rotate(0); }
}

/* ─── Dropdown Overlay ─── */
.notif-dropdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  opacity: 0;
  pointer-events: none;
}

/* ─── Dropdown Panel ─── */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: -8px;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: 480px;
  background: rgba(8,12,12,0.94);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  box-shadow:
    0 24px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(0,245,196,0.03),
    0 0 40px rgba(0,245,196,0.03);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  transform-origin: top right;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notif-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

/* ─── Dropdown Header ─── */
.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}
.notif-dropdown-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-dropdown-count {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--gray2);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: 99px;
  line-height: 1.3;
  border: 1px solid rgba(255,255,255,0.04);
}
.notif-dropdown-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.notif-mark-all-btn {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray2);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 5px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.notif-mark-all-btn:hover {
  color: var(--accent);
  background: rgba(0,245,196,0.06);
}
.notif-mark-all-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ─── Notifications List ─── */
.notif-dropdown-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,245,196,0.15) transparent;
}
.notif-dropdown-list::-webkit-scrollbar {
  width: 4px;
}
.notif-dropdown-list::-webkit-scrollbar-track {
  background: transparent;
}
.notif-dropdown-list::-webkit-scrollbar-thumb {
  background: rgba(0,245,196,0.15);
  border-radius: 99px;
}
.notif-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0,245,196,0.3);
}

/* ─── Notification Item ─── */
.notif-dd-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.notif-dd-item:active {
  transform: scale(0.98);
}
.notif-dd-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.notif-dd-item:hover {
  background: rgba(255,255,255,0.03);
}
.notif-dd-item.unread {
  background: rgba(0,245,196,0.02);
}
.notif-dd-item.unread:hover {
  background: rgba(0,245,196,0.035);
}

/* ─── Type Icon ─── */
.notif-dd-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 0.65rem;
  transition: all 0.2s ease;
}
.notif-dd-icon.teal {
  background: rgba(0,245,196,0.08);
  color: var(--accent);
  border: 1px solid rgba(0,245,196,0.12);
}
.notif-dd-icon.blue {
  background: rgba(59,130,246,0.08);
  color: #3b82f6;
  border: 1px solid rgba(59,130,246,0.12);
}
.notif-dd-icon.green {
  background: rgba(34,197,94,0.08);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.12);
}
.notif-dd-icon.orange {
  background: rgba(245,158,11,0.08);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.12);
}
.notif-dd-icon.purple {
  background: rgba(168,85,247,0.08);
  color: #a855f7;
  border: 1px solid rgba(168,85,247,0.12);
}
.notif-dd-icon svg {
  width: 14px;
  height: 14px;
}

/* ─── Content ─── */
.notif-dd-content {
  flex: 1;
  min-width: 0;
}
.notif-dd-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1.35;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-dd-item.unread .notif-dd-title {
  font-weight: 600;
}
.notif-dd-message {
  font-size: 0.76rem;
  color: var(--gray);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.notif-dd-time {
  font-size: 0.65rem;
  color: var(--gray2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.notif-dd-unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(0,245,196,0.4);
  display: none;
  flex-shrink: 0;
}
.notif-dd-item.unread .notif-dd-unread-dot {
  display: inline-block;
}

/* ─── Mark Read Button ─── */
.notif-dd-mark-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: none;
  border: 1px solid transparent;
  color: var(--gray2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  transition: all 0.2s ease;
  margin-top: 2px;
}
.notif-dd-item:hover .notif-dd-mark-btn {
  opacity: 1;
}
.notif-dd-mark-btn:hover {
  background: rgba(0,245,196,0.08);
  border-color: rgba(0,245,196,0.15);
  color: var(--accent);
}
.notif-dd-mark-btn svg {
  width: 12px;
  height: 12px;
}

/* ─── Empty State ─── */
@keyframes ndd-fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ndd-float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.notif-dd-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 24px;
  text-align: center;
  animation: ndd-fadeInUp 0.4s ease-out;
}
.notif-dd-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0,245,196,0.05);
  border: 1px solid rgba(0,245,196,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
  animation: ndd-float-icon 3s ease-in-out infinite;
  transition: all var(--transition);
}
.notif-dd-empty:hover .notif-dd-empty-icon {
  background: rgba(0,245,196,0.08);
  border-color: rgba(0,245,196,0.15);
  transform: scale(1.05);
}
.notif-dd-empty-icon svg {
  width: 20px;
  height: 20px;
}
.notif-dd-empty-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
}
.notif-dd-empty-text {
  font-size: 0.78rem;
  color: var(--gray2);
  line-height: 1.5;
  max-width: 220px;
}

/* ─── Skeleton Loading ─── */
.notif-dd-skeleton {
  padding: 6px;
}
.notif-dd-skeleton-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  pointer-events: none;
}
.notif-dd-skel-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: notifShimmer 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
.notif-dd-skel-content {
  flex: 1;
  min-width: 0;
}
.notif-dd-skel-line {
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: notifShimmer 1.5s ease-in-out infinite;
  margin-bottom: 6px;
}
.notif-dd-skel-line.w40 { width: 40%; }
.notif-dd-skel-line.w65 { width: 65%; }
.notif-dd-skel-line.w25 { width: 25%; }
.notif-dd-skel-line.h8 { height: 8px; }
.notif-dd-skel-line.h10 { height: 10px; }
.notif-dd-skel-line.h12 { height: 12px; }
.notif-dd-skel-line.mb0 { margin-bottom: 0; }

@keyframes notifShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ─── Footer / View All ─── */
.notif-dropdown-footer {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 10px 18px;
  flex-shrink: 0;
}
.notif-view-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray2);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 8px;
  border-radius: 10px;
  transition: all 0.2s ease;
}
.notif-view-all-btn:hover {
  color: var(--accent);
  background: rgba(0,245,196,0.05);
}
.notif-view-all-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.notif-view-all-btn:hover svg {
  transform: translateX(2px);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .notif-dropdown {
    position: fixed;
    top: 68px;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 100px);
    border-radius: 16px;
    transform-origin: top center;
  }
  .notif-dropdown-header {
    padding: 14px 16px 12px;
  }
  .notif-dropdown-list {
    padding: 4px;
  }
  .notif-dd-item {
    padding: 11px 12px;
  }
}

@media (max-width: 480px) {
  .notif-dropdown {
    left: 4px;
    right: 4px;
    max-height: calc(100vh - 90px);
  }
}
