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

.notification-icon {
  position: relative;
  cursor: pointer;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.notification-icon:hover {
  background-color: #e9ecef;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.4);
  padding: 0 4px;
}

.notification-dropdown {
  width: 320px;
  padding: 0;
  max-height: none; /* Remove max-height from dropdown */
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  overflow: hidden; /* Change to hidden to prevent scrollbar here */
}

.notification-list {
  max-height: 340px; /* Fixed height for the list */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #adb5bd #f8f9fa;
}

.notification-list::-webkit-scrollbar {
  width: 6px;
}

.notification-list::-webkit-scrollbar-track {
  background: #f8f9fa;
}

.notification-list::-webkit-scrollbar-thumb {
  background-color: #adb5bd;
  border-radius: 6px;
}

.notification-header {
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
  background-color: #f8f9fa;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.notification-header h6 {
  font-weight: 600;
  margin: 0;
  color: #495057;
}

.notification-list {
  max-height: calc(45vh - 60px);
  overflow-y: auto;
}

.notification-item {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid #f1f1f1;
  transition: all 0.2s ease;
  text-decoration: none !important;
  cursor: pointer;
}

.notification-item:hover {
  background-color: #f8f9fa;
}

.notification-item.unread {
  background-color: rgba(13, 110, 253, 0.05);
  position: relative;
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: #0d6efd;
}

.notification-icon-small {
  margin-right: 12px;
  display: flex;
  align-items: flex-start;
  font-size: 1.2rem;
}

.notification-content {
  flex: 1;
  overflow: hidden;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 5px;
  color: #212529;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-message {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.notification-time {
  font-size: 0.75rem;
  color: #adb5bd;
  display: flex;
  align-items: center;
}

.notification-time::before {
  content: '•';
  margin-right: 5px;
}

.no-notifications {
  padding: 30px 20px;
  text-align: center;
  color: #adb5bd;
}

.no-notifications p {
  margin: 0;
  font-size: 0.9rem;
}

/* Notification type styles */
.notification-success .notification-icon-small i {
  color: #28a745;
}

.notification-error .notification-icon-small i {
  color: #dc3545;
}

.notification-warning .notification-icon-small i {
  color: #ffc107;
}

.notification-info .notification-icon-small i {
  color: #17a2b8;
}

/* Modal styles */
.modal-header {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  padding: 18px 24px;
  border-bottom: none;
  display: flex;
  align-items: center;
}

.modal-header .modal-title {
  font-weight: 600;
  font-size: 1.25rem;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header .close {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.2s;
  padding: 0;
  margin: -8px -8px -8px auto;
  border: none;
}

.modal-header .close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.4);
}

.modal-body {
  padding: 24px;
  background-color: #f8f9fa;
}

.modal-body p {
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 1rem;
  color: #495057;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.modal-body small {
  display: block;
  text-align: right;
  color: #6c757d;
  font-style: italic;
}

.modal-footer {
  padding: 16px 24px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border-top: none;
  background-color: #f8f9fa;
}

.modal-footer .btn {
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 8px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}

.modal-footer .btn-secondary:hover {
  background-color: #5a6268;
  border-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.modal-content {
  border: none;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .notification-dropdown {
    width: 280px;
    position: fixed !important;
    top: 60px !important;
    right: 10px !important;
    left: auto !important;
    transform: none !important;
    max-height: none; /* Remove max-height */
  }

  .notification-list {
    max-height: 60vh; /* Use viewport height for mobile */
  }

  .notification-item {
    padding: 12px;
  }

  .notification-message {
    -webkit-line-clamp: 1;
  }
}

/* Add a medium screen breakpoint */
@media (min-width: 577px) and (max-width: 992px) {
  .notification-dropdown {
    width: 300px;
    max-height: none; /* Remove max-height */
  }

  .notification-list {
    max-height: 70vh; /* Use viewport height for tablets */
  }
}
