/* Windows-style Notification Container (Bottom Right) */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1200;
  display: flex;
  flex-direction: column-reverse; /* Newest at bottom */
  gap: 12px;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  width: 340px;
  background: rgba(255, 253, 250, 0.98);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(44, 24, 16, 0.15);
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(20px);
  opacity: 0;
  animation: winSlideIn 0.4s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
  backdrop-filter: blur(10px);
}

.toast-message span {
  font-size: 1.4rem;
}

.toast-message strong {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.4;
}

@keyframes winSlideIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-message.fade-out {
  animation: winSlideOut 0.3s ease-in forwards;
}

@keyframes winSlideOut {
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@media (max-width: 760px) {
  .toast-container {
    right: 12px;
    left: 12px;
    bottom: 80px;
  }
  .toast-message { width: 100%; }
}

/* ── Notification Dropdown ───────────────────────────────── */
.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: -8px;
  width: 340px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e8e8e8);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.14);
  z-index: 1300;
  overflow: hidden;
  animation: notifDropIn 0.2s cubic-bezier(0.2,0,0.2,1);
  transform-origin: top right;
}
.notif-dropdown.open { display: flex; flex-direction: column; }

@keyframes notifDropIn {
  from { opacity: 0; transform: scale(0.94) translateY(-6px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* Arrow */
.notif-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 16px;
  width: 12px; height: 12px;
  background: var(--surface, #fff);
  border-left: 1px solid var(--line, #e8e8e8);
  border-top:  1px solid var(--line, #e8e8e8);
  transform: rotate(45deg);
}

.notif-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line, #e8e8e8);
  flex-shrink: 0;
}

.notif-dropdown-title {
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--text, #1a1a1a);
  letter-spacing: -0.01em;
}

.notif-clear-btn {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-soft, #aaa);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.13s, background 0.13s;
  font-family: inherit;
}
.notif-clear-btn:hover { color: var(--accent, #e67e22); background: var(--accent-soft, #fde8d4); }

.notif-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 6px 0;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: var(--line, #e8e8e8); border-radius: 2px; }

.notif-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-soft, #bbb);
  font-size: 0.82rem;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 16px;
  transition: background 0.13s;
  position: relative;
}
.notif-item:hover { background: var(--surface-2, #f9f9f9); }
.notif-item.unread { background: #fff8f2; }
.notif-item.unread::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent, #e67e22);
}

.notif-item-ava {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-soft, #fde8d4);
  color: var(--accent, #e67e22);
  font-weight: 900;
  font-size: 0.85rem;
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

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

.notif-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.notif-item-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text, #1a1a1a);
}
.notif-item-time {
  font-size: 0.65rem;
  color: var(--text-soft, #bbb);
  flex-shrink: 0;
  margin-left: 6px;
}
.notif-item-text {
  font-size: 0.8rem;
  color: var(--text-soft, #666);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-item-conv {
  font-size: 0.68rem;
  color: var(--text-soft, #bbb);
  margin-top: 2px;
}
