
/* --- NOTIFICATIONS (GLOBAL) --- */
.notifications-dropdown {
  position: absolute;
  top: 70px;
  right: max(4%, 20px);
  width: 320px;
  background: rgba(18, 20, 24, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  z-index: 2000;
  display: none;
  overflow: hidden;
  max-width: 90vw;
  animation: notifSlideDown 0.3s ease forwards;
}

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

.notifications-dropdown.active {
  display: block;
}

.notif-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--glass-border);
  font-family: "Exo 2", sans-serif;
  font-weight: 600;
  color: white;
  background: rgba(255,255,255,0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notif-actions {
  display: flex;
  gap: 10px;
}

.notif-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s;
}

.notif-action-btn:hover {
  color: white;
}

.notif-list {
  max-height: 400px;
  overflow-y: auto;
}

.notif-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  position: relative;
}

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

.notif-item:hover {
  background: rgba(255,255,255,0.05);
}

.notif-item.unread {
  background: rgba(0, 102, 179, 0.1);
  border-left: 3px solid var(--bmw-blue);
}

.notif-icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bmw-blue);
  flex-shrink: 0;
}


/* Fix horizontal scroll */
.notif-content {
  flex: 1;
  overflow: hidden; /* Prevent spillover */
  min-width: 0; /* Enable text truncation/wrapping in flex item */
}

.notif-title {
  font-size: 13px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.3;
  word-wrap: break-word; /* Legacy support */
  overflow-wrap: break-word; /* Modern standard */
  white-space: normal; /* Ensure wrapping */
}

/* New class for text body in JS rendered items */
.notif-text-body {
  font-size: 13px;
  color: #fff;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word; /* Modern standard */
  white-space: normal; /* Ensure wrapping */
  max-width: 100%;
}

/* --- NOTIFICATION MODAL --- */
#notif-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#notif-modal.active {
  opacity: 1;
  pointer-events: auto;
}

#notif-modal .modal-content {
  background: rgba(18, 20, 24, 0.95);
  border: 1px solid var(--glass-border);
  width: 90%;
  max-width: 500px;
  border-radius: 16px;
  padding: 25px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

#notif-modal.active .modal-content {
  transform: translateY(0);
}

#notif-modal h3 {
  color: white;
  font-family: "Exo 2", sans-serif;
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--glass-border);
}

#notif-modal p {
  color: var(--text-gray);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 25px;
  white-space: pre-wrap; /* Preserve formatting */
  overflow-wrap: break-word;
}

/* Modal Actions */
.notif-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.notif-btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.notif-btn.primary {
  background: var(--bmw-blue, #3498db);
  color: white;
  border: none;
}
.notif-btn.primary:hover {
  background: var(--bmw-blue-hover, #2980b9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 179, 0.3);
}

.notif-btn.secondary {
  background: transparent;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  color: var(--text-gray, #aaa);
}
.notif-btn.secondary:hover {
  background: rgba(255,255,255,0.05);
  color: white;
  border-color: rgba(255,255,255,0.2);
}


#notif-modal .modal-close-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  transition: color 0.2s;
}

#notif-modal .modal-close-icon:hover {
  color: white;
}
