/* AI: for notifications dropwdown */
#notification-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
  }
  
  .notifications-container .notification-item {
	margin-bottom: 10px;
	padding: 15px;
	border-radius: 10px;
	background: rgba(226, 227, 228, 0.99);
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
	min-width: 300px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .notifications-container .notification-item:last-child {
    border-bottom: none;
}
  
  /* .notifications-container .notification-item {
	padding: 10px 15px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  } */
  
  .notifications-container .notification-item.unread {
	color: #000 !important;
	background-color: rgba(29, 140, 248, 0.1) !important;
  }
  
  /* Style for read notifications */
  .notifications-container .notification-item.read {
	opacity: 0.8;  /* Slightly dimmed but still readable */
	background-color: rgba(255, 255, 255, 0.05);  /* Subtle background */
  }
  
  .notifications-container .notification-item.read .notification-text {
	color: #000 !important;  /* Still quite readable */
  }
  
  .notifications-container .notification-content {
	color: #000;
	margin-left: 10px;
	flex: 1;
  }

  .notification-day-header {
	color: #000;
	margin-left: 10px;
	flex: 1;
  }
  
  .notifications-container .notification-item .tim-icons {
	font-size: 18px;  /* Larger icons */
	margin-right: 12px;
  }
  
  
  .dropdown-header {
	color: #000;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .notifications-container::-webkit-scrollbar {
	width: 4px;
  }
  
  .notifications-container::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 2px;
  }
  
  .notifications-container .notification-count {
	color: #000;
	line-height: 1;
	display: inline-block;
  }
  
  .notifications-container .notification.transaction {
	border-left: 4px solid #ff3636;
  }
  
  .notifications-container .notification.balance {
	border-left: 4px solid #00f2c3;
  }
  
  .notifications-container .notification.login {
	border-left: 4px solid #e14eca;
  }
  
  .notification-item .btn-link {
    padding: 4px 8px;
    /* color: rgba(255, 255, 255, 0.8); */
    transition: all 0.2s ease;
}
  
.notification-item .btn-link:hover {
    color: #00f2c3 !important;
    background: rgba(226, 227, 228, 0.99);
}
  
.notification-item .btn-link:hover .icon-check-2,
.notification-item .btn-link:hover .icon-refresh-01 {
    color: #00f2c3 !important;
    transform: scale(1.1);
}
  
  .notification-item .btn-link .tim-icons {
	transition: all 0.2s ease;
  }

  .badge-success-visible {
	color: #ffffff;
	background-color: #1f5714;
  }

  .notification {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 6px;
    width: 6px;
    position: absolute;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    top: 10px;
    right: 10px;
  }
  
  .notification-count-dot {
    position: absolute;
    color: #fd5d93;
    font-size: 11px;
    font-weight: bold;
  }

/* Improve notifications dropdown scrollability */
#notification-dropdown {
  max-height: 600px;
  overflow: visible;
  padding: 0;
  min-width: 320px;
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.notifications-container {
  max-height: 500px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  background-color: #ffffff !important;
}

.notifications-container::-webkit-scrollbar {
  width: 6px;
}

.notifications-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.notifications-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Make notification items more compact */
.notifications-container .notification-item {
  margin-bottom: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
  background-color: #ffffff !important;
}

.notifications-container .notification-item:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

.notifications-container .notification-item .notification-text {
  font-size: 14px;
  line-height: 1.3;
  color: #333333 !important;
}

.notifications-container .notification-item small {
  font-size: 11px;
  color: #666666 !important;
}

.notifications-container .notification-item .tim-icons {
  font-size: 16px;
  margin-right: 8px;
}

/* Set dropdown header background */
.dropdown-header {
  background-color: #ffffff !important;
  color: #333333 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.dropdown-header span {
  color: #333333 !important;
}

.dropdown-header small {
  color: #666666 !important;
}

/* Set dropdown divider color */
.dropdown-divider {
  border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Set dropdown item colors */
.dropdown-item {
  color: #333333 !important;
}

.dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
  color: #333333 !important;
}

/* Mobile responsive fixes for notification dropdown */
@media screen and (max-width: 768px) {
  #notification-dropdown {
    position: fixed !important;
    top: 60px !important;
    left: 10px !important;
    right: 10px !important;
    width: calc(100vw - 20px) !important;
    min-width: auto !important;
    max-width: none !important;
    transform: none !important;
    margin: 0 !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  }
  
  /* Override the problematic black-dashboard.css rule */
  .dropdown-menu.dropdown-navbar {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: auto !important;
    max-width: none !important;
    background-color: #ffffff !important;
  }
  
  .dropdown-menu.dropdown-menu-right.dropdown-navbar {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: auto !important;
    max-width: none !important;
    background-color: #ffffff !important;
  }
  
  /* Ensure the dropdown container doesn't overflow */
  .dropdown-menu.dropdown-menu-right.dropdown-navbar:before,
  .dropdown-menu.dropdown-menu-right.dropdown-navbar:after {
    display: none !important;
  }
  
  .notifications-container .notification-item {
    min-width: auto !important;
    width: 100% !important;
    padding: 10px 15px !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  }
  
  .notifications-container .notification-item:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
  }
  
  .notifications-container .notification-content {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
  
  .notifications-container .notification-item .notification-text {
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #333333 !important;
  }
  
  .notifications-container .notification-item small {
    color: #666666 !important;
  }
  
  .dropdown-header {
    padding: 12px 15px !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  }
  
  .dropdown-header span {
    font-size: 14px !important;
    color: #333333 !important;
  }
  
  .dropdown-header small {
    font-size: 11px !important;
    color: #666666 !important;
  }
  
  /* Ensure proper z-index for mobile */
  .dropdown-menu {
    z-index: 1050 !important;
  }
  
  /* Handle potential sidebar overlay issues */
  .nav-open .dropdown-menu {
    z-index: 1060 !important;
  }
  
  /* Ensure dropdown is above any sidebar */
  .sidebar + .main-panel .dropdown-menu {
    z-index: 1060 !important;
  }
  
  /* Prevent any overflow from parent containers */
  .navbar .dropdown-menu {
    overflow: visible !important;
  }
  
  /* Ensure notification text doesn't get truncated */
  .notifications-container .notification-item .notification-text {
    white-space: normal !important;
    word-break: break-word !important;
    hyphens: auto !important;
    max-width: 100% !important;
    color: #333333 !important;
  }
  
  /* Ensure the notification content container is properly sized */
  .notifications-container .notification-item .d-flex {
    width: 100% !important;
    min-width: 0 !important;
  }
  
  /* Ensure the notification content takes available space */
  .notifications-container .notification-content {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

@media screen and (max-width: 576px) {
  #notification-dropdown {
    top: 50px !important;
    left: 5px !important;
    right: 5px !important;
    width: calc(100vw - 10px) !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  }
  
  .notifications-container .notification-item {
    padding: 8px 12px !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  }
  
  .notifications-container .notification-item:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
  }
  
  .notifications-container .notification-item .notification-text {
    font-size: 12px !important;
    color: #333333 !important;
  }
  
  .notifications-container .notification-item small {
    font-size: 10px !important;
    color: #666666 !important;
  }
  
  .dropdown-header {
    padding: 10px 12px !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  }
  
  .dropdown-header span {
    font-size: 13px !important;
    color: #333333 !important;
  }
  
  .dropdown-header small {
    font-size: 10px !important;
    color: #666666 !important;
  }
}