/* Notification Styling */

/* Header notification icon */
.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 13px;
  height: 13px;
  background-color: #dc3545;
  border-radius: 50%;
  border: 2px solid var(--bs-body-bg);
}

.notification-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: #dc3545;
  color: white;
  font-size: 10px;
  font-weight: bold;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--bs-body-bg);
}

/* Notification dropdown */
.notification-dropdown {
  width: 350px;
  max-width: 90vw;
  padding: 0;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border-radius: var(--bs-border-radius-lg);
  overflow: hidden;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: var(--bs-gray-50);
  border-bottom: 1px solid var(--bs-border-color);
}

.notification-header h6 {
  color: var(--bs-gray-900);
  font-weight: 600;
}

.notification-body {
  max-height: 400px;
  overflow-y: auto;
}

.notification-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--bs-gray-100);
  transition: background-color 0.2s ease;
  cursor: pointer;
  position: relative;
}

.notification-item:hover {
  background-color: var(--bs-gray-200) !important;
}

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

.notification-item.unread {
  background-color: rgba(13, 110, 253, 0.05);
  border-left: 3px solid var(--bs-primary);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background-color: var(--bs-primary);
  border-radius: 50%;
}

.notification-content {
  margin-left: 15px;
}

.notification-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--bs-gray-900);
  margin-bottom: 4px;
  line-height: 1.3;
}

.notification-text {
  font-size: 13px;
  color: var(--bs-gray-600);
  margin-bottom: 6px;
  line-height: 1.4;
}

.notification-time {
  font-size: 11px;
  color: var(--bs-gray-500);
  font-weight: 500;
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  flex-shrink: 0;
}

.notification-icon.mail {
  background-color: #198754;
}

.notification-icon.appointment {
  background-color: #0d6efd;
}

.notification-icon.application {
  background-color: #fd7e14;
}

.notification-icon.document {
  background-color: #6f42c1;
}

.notification-footer {
  padding: 15px 20px;
  background-color: var(--bs-gray-50);
  border-top: 1px solid var(--bs-border-color);
}

.notification-empty {
  padding: 40px 20px;
}

.notification-empty i {
  font-size: 32px;
  display: block;
}

/* Sidebar notification badges */
.notification-badge {
  position: absolute;
  right: 15px;
  background-color: #dc3545;
  color: white;
  font-size: 13px;
  font-weight: bold;
  min-width: 21px;
  height: 21px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive adjustments */
@media screen and (max-width: 575px) {
  .notification-dropdown {
    width: 300px;
  }

  .notification-item {
    padding: 12px 15px;
  }

  .notification-header,
  .notification-footer {
    padding: 12px 15px;
  }
}

/* Loading state */
.notification-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--bs-gray-500);
}

.notification-loading .spinner-border {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 10px;
}

/* Toast notifications */
.toast-notification {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1060;
  min-width: 300px;
  max-width: 400px;
}

.toast-notification .toast {
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-notification .toast-header {
  background-color: var(--bs-primary);
  color: white;
  border-bottom: none;
}

.toast-notification .toast-header .btn-close {
  filter: brightness(0) invert(1);
}

/* Custom scrollbar for notification body */
.notification-body::-webkit-scrollbar {
  width: 4px;
}

.notification-body::-webkit-scrollbar-track {
  background: var(--bs-gray-100);
}

.notification-body::-webkit-scrollbar-thumb {
  background: var(--bs-gray-400);
  border-radius: 2px;
}

.notification-body::-webkit-scrollbar-thumb:hover {
  background: var(--bs-gray-500);
}