/**
 * SOURX Margin Report - Notifications Panel Styles
 */

.notifications-dropdown-container {
  position: relative;
  display: inline-block;
}

/* Pulsing notification indicator dot on the bell */
.notification-indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #E11D48;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.2);
  animation: notifPulse 2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes notifPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(225, 29, 72, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
  }
}

/* Dropdown Menu Overlay */
.notifications-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: #FFFFFF;
  border: 1px solid var(--sourx-border, #E2E8F0);
  border-radius: 16px;
  box-shadow: 0 20px 48px -8px rgba(1, 46, 92, 0.22), 0 0 0 1px rgba(1, 46, 92, 0.08);
  z-index: 1100;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: notifSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notifSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--sourx-border, #E2E8F0);
}

.notif-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-header-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  color: var(--sourx-navy, #012e5c);
  letter-spacing: -0.01em;
}

.notif-unread-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--sourx-lime, #b6e82c);
  color: var(--sourx-navy, #012e5c);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 9999px;
}

.notif-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-notif-header-action {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  transition: color 0.15s ease;
}

.btn-notif-header-action:hover {
  color: var(--sourx-navy, #012e5c);
}

.btn-notif-header-action.notif-action-clear:hover {
  color: #E11D48;
}

/* Scrollable List */
.notif-list-wrap {
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Individual Item */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sourx-border, #F1F5F9);
  background: #FFFFFF;
  transition: background-color 0.15s ease;
  position: relative;
  cursor: pointer;
}

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

.notif-item.is-unread {
  background: rgba(1, 46, 92, 0.025);
}

.notif-item.is-unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3.5px;
  background: var(--sourx-lime, #b6e82c);
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}

.notif-item:hover {
  background: rgba(1, 46, 92, 0.04);
}

/* Icon Badges */
.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-badge-emerald {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.notif-badge-rose {
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FECDD3;
}

.notif-badge-blue {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.notif-badge-amber {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.notif-badge-purple {
  background: #FAF5FF;
  color: #7C3AED;
  border: 1px solid #E9D5FF;
}

/* Content Area */
.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.notif-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-time {
  font-size: 10.5px;
  font-weight: 500;
  color: #94A3B8;
  flex-shrink: 0;
}

.notif-item-message {
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
  word-break: break-word;
}

/* Call to action */
.notif-item-action-wrap {
  margin-top: 6px;
}

.btn-notif-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-notif-cta:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #0284C7;
}

/* Dismiss (x) button */
.btn-notif-dismiss {
  background: none;
  border: none;
  padding: 4px;
  color: #94A3B8;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.notif-item:hover .btn-notif-dismiss {
  opacity: 1;
}

.btn-notif-dismiss:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* Empty State */
.notif-empty-state {
  padding: 42px 20px;
  text-align: center;
}

.notif-empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #F1F5F9;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-empty-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 4px;
}

.notif-empty-desc {
  font-size: 12px;
  color: #64748B;
}
