/* ============================================
   NOTIFICATION STYLES
   Bell icon, dropdown panel, toasts
   ============================================ */

/* --- Bell Icon in Nav --- */
.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  color: var(--link-color);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.notif-bell:hover {
  color: var(--hover-link-color);
}

.notif-bell:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

.notif-bell-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* --- Notification Dropdown Panel --- */
.notif-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--nav-submenu-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-panel-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
}

.notif-panel-list {
  flex: 1;
  overflow-y: auto;
}

/* --- Panel Footer --- */
.notif-panel-footer {
  padding: 0.6rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.notif-view-all {
  font-size: 0.8rem;
  color: var(--link-color);
  text-decoration: none;
}

.notif-view-all:hover {
  text-decoration: underline;
}

/* --- Notification Item --- */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s ease;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-item:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: -2px;
}

.notif-item.unread {
  background: rgba(77, 171, 247, 0.05);
}

.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--link-color);
}

.notif-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-message {
  font-size: 0.85rem;
  color: var(--text-color);
  line-height: 1.4;
}

.notif-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 0.2rem;
}

/* --- Notification Action Buttons (friend requests, invites) --- */
.notif-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.notif-action-btn {
  padding: 0.3rem 0.75rem;
  min-height: 32px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.notif-action-btn:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

.notif-action-accept {
  background: var(--link-color);
  color: var(--bg-color);
}

.notif-action-accept:hover {
  background: var(--hover-link-color);
}

.notif-action-decline {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

.notif-action-decline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.notif-action-view {
  background: rgba(255, 255, 255, 0.08);
  color: var(--link-color);
  text-decoration: none;
}

.notif-action-view:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* --- Group Label --- */
.notif-group-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem 0.25rem;
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: var(--nav-submenu-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  font-size: 0.9rem;
  color: var(--text-color);
  min-width: 280px;
  max-width: 420px;
  animation: toast-in 0.3s ease;
}

.toast.toast-exit {
  animation: toast-out 0.25s ease forwards;
}

.toast-success {
  border-left: 3px solid #2ecc71;
}

.toast-error {
  border-left: 3px solid #e74c3c;
}

.toast-info {
  border-left: 3px solid var(--link-color);
}

.toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.toast-success .toast-icon { color: #2ecc71; }
.toast-error .toast-icon { color: #e74c3c; }
.toast-info .toast-icon { color: var(--link-color); }

.toast-message {
  flex: 1;
  line-height: 1.3;
}

.toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 4px;
  font-size: 0.9rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.toast-close:hover {
  color: var(--text-color);
}

.toast-close:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (max-width: 768px) {
  .notif-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .notif-action-btn {
    min-height: 44px;
  }

  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }
}


/* ============================================
   NOTIFICATIONS PAGE (full view)
   ============================================ */

.notifications-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.notif-page-header {
  margin-bottom: 1.5rem;
}

.notif-page-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.notif-page-heading i {
  margin-right: 0.5rem;
  opacity: 0.6;
}

.notif-page-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.notif-page-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.notif-page-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s ease;
}

.notif-page-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notif-page-item.unread {
  background: rgba(77, 171, 247, 0.06);
  border-left: 3px solid var(--link-color);
}

.notif-page-content {
  flex: 1;
  min-width: 0;
}

.notif-page-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.2rem;
}

.notif-page-body {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

.notif-page-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 0.3rem;
}

.notif-page-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  align-items: center;
}

.notif-page-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 0;
}

.notif-page-info {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .notifications-container {
    padding: 1.25rem 0.75rem;
  }

  .notif-page-item {
    padding: 0.85rem 0.75rem;
  }
}
