/* ================== Notification Center Styles ================== */

/* Top Bar */
.top-bar {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 16px;
  background: none;
}

/* Notification Bell Wrapper */
#notification-bell-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

#notification-bell {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

/* Bell Icon */
#bell-icon {
  font-size: 24px;
  color: #ffa500;    /* Orange bell by default */
  transition: color 0.2s;
}
#notification-bell:hover #bell-icon {
  color: #ff7300;    /* Darker orange on hover */
}

/* Unread Notification Bubble */
#notification-count {
  position: absolute;
  top: -6px;
  right: -7px;
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  padding: 1px 6px;
  font-weight: bold;
  min-width: 16px;
  text-align: center;
  line-height: 1.2;
  z-index: 2;
}
#notification-count.hidden { display: none; }

/* Dropdown Panel */
.notification-dropdown {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 320px;
  max-height: 400px;
  background: #232323;
  border: 1px solid #444;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.22);
  z-index: 3000;
  padding: 12px 8px 8px 8px;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  color: #fff;
  animation: fadeIn .16s;
}
.notification-dropdown.visible { display: flex; }

/* Notification Actions */
.notification-actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 6px;
}
.notification-actions button {
  background: #242526;
  color: #ffa500;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background .13s;
}
.notification-actions button:hover {
  background: #444;
}

.notification-item {
  position: relative;
}
.notification-delete {
  position: absolute;
  top: 10px;
  right: 8px;
  cursor: pointer;
  color: #e74c3c;
  opacity: 0.7;
  transition: opacity .12s;
}
.notification-item:hover .notification-delete {
  opacity: 1;
}

@media (max-width: 600px) {
  .notification-delete {
    display: none; /* Hide trash can on mobile; swipe gesture will be used */
  }
  .notification-item.swipe-delete {
    transform: translateX(-60px);
    background: #3a3a4a;
  }
  .notification-item .swipe-delete-btn {
    display: block;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    text-align: center;
    line-height: 36px;
    font-size: 18px;
    z-index: 10;
    cursor: pointer;
  }
}

/* Notification Item Styles */
.notification-item {
  padding: 10px 5px 8px 5px;
  border-bottom: 1px solid #333;
  cursor: pointer;
  font-size: 15px;
  background: transparent;
  transition: background 0.15s;
}
.notification-item:last-child { border-bottom: none; }
.notification-item.unread { background-color: #293e53; font-weight: bold; }
.notification-item:hover { background: #3a3a4a; }
#notifications-container:empty::before {
  content: "No notifications.";
  display: block;
  color: #bbb;
  text-align: center;
  padding: 30px 0;
}

/* Pagination */
#notification-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
#notification-pagination button {
  padding: 4px 14px;
  font-size: 13px;
  border: none;
  background: #ffa500;
  color: #222;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: background 0.12s;
}
#notification-pagination button:disabled {
  background: #888;
  color: #ccc;
  cursor: default;
}

/* Fade in animation for dropdown */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-15px);}
  to { opacity: 1; transform: translateY(0);}
}

/* ============ Responsive ============ */
@media (max-width: 480px) {
  .top-bar { top: 8px; right: 6px; gap: 8px; }
  #notification-bell-wrapper, #notification-bell { width: 26px; height: 26px; }
  #bell-icon { font-size: 18px; }
  .notification-dropdown {
    top: 50px; right: 4px;
    width: 95vw; min-width: 0; max-width: 98vw; padding: 7px 2px 6px 2px;
  }
  #notification-count { font-size: 10px; min-width: 13px; top: -4px; right: -5px; }
}

/* =========== Dark Mode =========== */
body.dark-mode .notification-dropdown {
  background: #191d21;
  border-color: #222;
  color: #fff;
}
body.dark-mode #bell-icon {
  color: #ffcb67;
}
body.dark-mode #notification-bell:hover #bell-icon {
  color: #ffa500;
}
body.dark-mode .notification-item.unread {
  background: #232e4e;
}
body.dark-mode .notification-item:hover {
  background: #444;
}
