#ef-toast-container {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 0.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
  z-index: 1000;
}

#ef-toast-container[data-position="top"] {
  top: 0.5rem;
  bottom: auto;
}

.ef-toast {
  background: #333;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: min(360px, 90%);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  transition: opacity 0.2s ease, transform 0.2s ease;
  min-height: 48px;
  overflow-wrap: anywhere;
}

.ef-toast.hide {
  opacity: 0;
  transform: translateY(20px);
}

.ef-toast__title {
  font-weight: bold;
}

.ef-toast__actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
}

.ef-toast button,
.ef-toast a {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  border: none;
  background: #555;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

.ef-toast button:focus,
.ef-toast a:focus,
#ef-toast-close-all:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

#ef-toast-close-all {
  margin-bottom: 0.5rem;
  min-height: 44px;
  min-width: 88px;
  padding: 0.25rem 0.75rem;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .ef-toast {
    transition: none;
  }
}

.ef-toast__message {
  overflow-wrap: anywhere;
}

.notifications-center {
  /* Padding handled by .section-body */
  overflow-x: hidden;
  overflow-wrap: anywhere;
}

#notif-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

#empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 300px;
  flex: 1;
}

#empty .material-symbols-outlined {
  font-size: 3rem;
  opacity: 0.5;
  margin-bottom: 1rem;
}

#empty p {
  color: rgba(255, 255, 255, 0.7);
}

.notifications-empty-hint {
  max-width: 520px;
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
}

.notifications-empty-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.notifications-sample {
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.notifications-sample-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.notifications-sample-list {
  margin: 0;
  padding-left: 1.15rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  display: grid;
  gap: 0.3rem;
}

.notifications-center .notif .title {
  font-weight: bold;
}

.notifications-center .notif .meta {
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  color: var(--color-text);
  opacity: 0.7;
}

.notifications-center .actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.notifications-center .actions .filters,
.notifications-center .actions .actions-right {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.notifications-center .actions .actions-right {
  margin-left: auto;
}

@media (max-width: 768px) {
  .notifications-center .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .notifications-center .actions .filters,
  .notifications-center .actions .actions-right {
    justify-content: center;
    width: 100%;
  }

  .notifications-center .actions .actions-right {
    margin-left: 0;
  }
}

.notifications-center .btn-link {
  background: none;
  color: var(--color-primary);
  padding: 0.25rem 0.5rem;
  border: none;
  text-decoration: underline;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notifications-center .btn-link:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.notifications-center img.avatar {
  width: 40px;
  aspect-ratio: 1/1;
  object-fit: cover;
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Bell in navigation bar */
.notifications-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
  color: inherit;
  background: none;
  border: none;
}

.notifications-bell:focus {
  outline: none;
  border: none;
  background: none;
}

.notifications-bell .icon-bell::before {
  content: "\1F514";
  /* bell emoji */
}

.notifications-bell .icon-bell {
  font-size: 1.25rem;
}

.notifications-bell .badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #d00;
  color: #fff;
  border-radius: 999px;
  padding: 0 4px;
  font-size: 0.75rem;
  line-height: 1.2;
  min-width: 1.2em;
  text-align: center;
}

.notifications-bell .badge.hidden {
  display: none;
}

.notifications-bell:hover,
.notifications-bell:active,
.notifications-bell.active {
  background: none;
  border: none;
  opacity: 1;
  border-bottom-color: transparent;
  outline: none;
}
