/**
 * Notifications System CSS
 * CSP-compliant styling for notification bell and dropdown
 */

/* Notification Bell Container */
.notification-bell-container {
  position: relative;
  margin-right: 4px;
}

.notification-bell--system {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.notification-bell--system:hover {
  background: rgba(0, 0, 0, 0.05);
}

.notification-bell--system .notification-bell__icon {
  width: 24px;
  height: 24px;
  color: #333;
}

/* Notification Badge */
.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.notification-badge--hidden {
  display: none;
}

/* Notifications Dropdown */
.notifications-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 420px;
  max-width: 95vw;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.notifications-dropdown--hidden {
  display: none;
}

/* Dropdown Header */
.notifications-dropdown__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e5e5;
}

.notifications-dropdown__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: #000;
}

.notifications-dropdown__mark-all {
  background: transparent;
  border: none;
  color: #0a66c2;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.notifications-dropdown__mark-all:hover {
  background: rgba(10, 102, 194, 0.1);
}

/* Notifications List */
.notifications-dropdown__list {
  overflow-y: auto;
  max-height: 480px;
  flex: 1;
}

.notifications-dropdown__loading {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
}

.notifications-dropdown__empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
}

/* Notification Item */
.notification-item {
  display: flex;
  align-items: flex-start;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}

.notification-item:hover {
  background: #f8f8f8;
}

.notification-item--unread {
  background: #e3f2fd;
}

.notification-item--unread:hover {
  background: #d1e9f8;
}

/* Notification Icon */
.notification-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
  font-size: 18px;
}

/* Color system per notification type */
.notification-item__icon--file {
  background: #dbeafe;
  color: #1e40af;
}

.notification-item__icon--meeting {
  background: #fce7f3;
  color: #be185d;
}

.notification-item__icon--chat {
  background: #f3e8ff;
  color: #7c3aed;
}

.notification-item__icon--job {
  background: #fef3c7;
  color: #d97706;
}

.notification-item__icon--connection {
  background: #d1fae5;
  color: #047857;
}

.notification-item__icon--default {
  background: #e5e7eb;
  color: #6b7280;
}

/* Notification Content */
.notification-item__content {
  flex: 1;
  min-width: 0;
}

.notification-item__title {
  font-weight: 600;
  font-size: 14px;
  color: #000;
  margin-bottom: 4px;
}

.notification-item--unread .notification-item__title {
  font-weight: 700;
}

.notification-item__message {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notification-item__time {
  font-size: 12px;
  color: #999;
}

/* Unread Indicator Dot */
.notification-item__unread-dot {
  width: 8px;
  height: 8px;
  background: #0a66c2;
  border-radius: 50%;
  margin-left: 8px;
  flex-shrink: 0;
  align-self: center;
}

/* Responsive */
@media (max-width: 768px) {
  .notifications-dropdown {
    width: 100vw;
    max-width: 100vw;
    right: -20px;
    border-radius: 0;
    max-height: 80vh;
  }
  
  .notification-item__message {
    -webkit-line-clamp: 1;
  }
}

/* Scrollbar Styling */
.notifications-dropdown__list::-webkit-scrollbar {
  width: 8px;
}

.notifications-dropdown__list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.notifications-dropdown__list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.notifications-dropdown__list::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}
