/* ============================================
   Notification Bell + Dropdown Styles
   ============================================ */

.notification-bell-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
}

.notification-bell-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  font-size: 20px;
  color: #4b5563;
  transition: color 0.2s ease;
  line-height: 1;
}

.notification-bell-btn:hover {
  color: #667eea;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid white;
  box-sizing: content-box;
}

.notification-badge.hidden {
  display: none;
}

/* ============================================
   Notification Dropdown Panel
   ============================================ */

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.notification-dropdown.open {
  display: flex;
}

.notification-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.notification-dropdown-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.notification-mark-all-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: #667eea;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.notification-mark-all-btn:hover {
  background: #f3f4ff;
}

/* ============================================
   Notification List
   ============================================ */

.notification-list {
  overflow-y: auto;
  flex: 1;
  max-height: 400px;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.notification-item:hover {
  background: #f9fafb;
  text-decoration: none;
  color: inherit;
}

.notification-item.unread {
  background: #f0f4ff;
}

.notification-item.unread:hover {
  background: #e8edff;
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: #e5e7eb;
}

.notification-icon.announcement {
  background: #dbeafe;
}

.notification-icon.schedule_change {
  background: #fef3c7;
}

.notification-icon.reminder {
  background: #d1fae5;
}

.notification-icon.general {
  background: #e5e7eb;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-body {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #667eea;
  flex-shrink: 0;
  margin-top: 4px;
}

.notification-unread-dot.hidden {
  visibility: hidden;
}

/* ============================================
   Empty State
   ============================================ */

.notification-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #9ca3af;
}

.notification-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.notification-empty-text {
  font-size: 14px;
  margin: 0;
}

/* ============================================
   Push Permission Banner
   ============================================ */

.notification-permission-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 20px;
  max-width: 340px;
  z-index: 10000;
  border: 1px solid #e5e7eb;
  display: none;
}

.notification-permission-banner.show {
  display: block;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-permission-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.notification-permission-text {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.notification-permission-actions {
  display: flex;
  gap: 8px;
}

.notification-permission-allow {
  flex: 1;
  padding: 10px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.notification-permission-allow:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.notification-permission-dismiss {
  padding: 10px 16px;
  background: #f3f4f6;
  color: #4b5563;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.notification-permission-dismiss:hover {
  background: #e5e7eb;
}

/* ============================================
   Foreground Toast
   ============================================ */

.notification-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  max-width: 360px;
  z-index: 10001;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  border-left: 4px solid #667eea;
  animation: slideInRight 0.3s ease;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification-toast.hiding {
  opacity: 0;
  transform: translateX(100%);
}

.notification-toast-content {
  flex: 1;
}

.notification-toast-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.notification-toast-body {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

.notification-toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 16px;
  padding: 0;
  line-height: 1;
}

.notification-toast-close:hover {
  color: #4b5563;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .notification-dropdown {
    width: calc(100vw - 32px);
    right: -60px;
    max-height: 70vh;
  }

  .notification-permission-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .notification-toast {
    left: 16px;
    right: 16px;
    max-width: none;
  }
}
