/* Toast notifications + bell + notification panel */

/* — Neon notification icons — */
.bb-nicon {
  font-style: normal;
  line-height: 1;
}
.bb-nicon-default {
  color: #9184d9;
  text-shadow: 0 0 8px rgba(145,132,217,.7), 0 0 20px rgba(145,132,217,.3);
}
.bb-nicon-friend {
  color: #4aeabc;
  text-shadow: 0 0 8px rgba(74,234,188,.7), 0 0 20px rgba(74,234,188,.3);
}
.bb-nicon-game {
  color: #f0d79a;
  text-shadow: 0 0 8px rgba(216,180,90,.7), 0 0 20px rgba(216,180,90,.3);
}
.bb-nicon-accepted {
  color: #4aeabc;
  text-shadow: 0 0 8px rgba(74,234,188,.7), 0 0 20px rgba(74,234,188,.3);
}
.bb-nicon-custom {
  color: #e74c3c;
  text-shadow: 0 0 8px rgba(231,76,60,.6), 0 0 20px rgba(231,76,60,.25);
}

/* — Toast container — */
.bb-toast-container {
  position: fixed; top: 72px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; max-width: 380px; width: calc(100% - 48px);
}

/* — Individual toast — */
.bb-toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  background: rgba(35, 37, 50, .96);
  border: 1px solid rgba(145, 132, 217, .25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .45), 0 0 20px rgba(145, 132, 217, .12);
  backdrop-filter: blur(12px);
  pointer-events: auto; cursor: default;
  transform: translateX(110%);
  opacity: 0;
  transition: transform .35s cubic-bezier(.22, .61, .36, 1), opacity .3s ease;
}
.bb-toast-show {
  transform: translateX(0);
  opacity: 1;
}
.bb-toast-hide {
  transform: translateX(110%);
  opacity: 0;
}

.bb-toast-icon {
  font-size: 20px; flex: none; line-height: 1;
  margin-top: 1px;
}

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

.bb-toast-title {
  font-size: 14px; font-weight: 600;
  color: #e9e9ed;
}

.bb-toast-body {
  font-size: 13px;
  color: rgba(233, 233, 237, .6);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-toast-close {
  background: none; border: none;
  color: rgba(233, 233, 237, .4);
  font-size: 18px; cursor: pointer;
  padding: 0 2px; line-height: 1; flex: none;
}
.bb-toast-close:hover { color: #e9e9ed; }

/* Type accents */
.bb-toast-friend_request { border-color: rgba(74, 234, 188, .3); }
.bb-toast-game_invite { border-color: rgba(216, 180, 90, .35); }
.bb-toast-friend_accepted { border-color: rgba(74, 234, 188, .3); }

/* — Bell icon in nav — */
.bb-bell-wrap {
  position: relative; cursor: pointer; flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
}

.bb-bell-icon {
  font-size: 18px;
  color: #9184d9;
  text-shadow: 0 0 8px rgba(145,132,217,.6), 0 0 20px rgba(145,132,217,.25);
  transition: transform .2s;
  font-family: var(--neon-font, 'Lobster', cursive);
}
.bb-bell-wrap:hover .bb-bell-icon {
  transform: rotate(12deg) scale(1.1);
}

.bb-notif-badge {
  position: absolute; top: 0; right: -2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 8px rgba(231, 76, 60, .5);
  line-height: 1;
}

/* — Notification panel (dropdown) — */
.bb-notif-panel {
  position: fixed; top: 60px; right: 20px; z-index: 500;
  width: 360px; max-height: 480px;
  background: rgba(35, 37, 50, .98);
  border: 1px solid rgba(145, 132, 217, .2);
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .55), 0 0 24px rgba(145, 132, 217, .08);
  backdrop-filter: blur(16px);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.bb-notif-panel.hidden { display: none; }

.bb-notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(233, 233, 237, .08);
}

.bb-notif-header-title {
  font-size: 15px; font-weight: 600; color: #e9e9ed;
}

.bb-notif-mark-read {
  background: none; border: none;
  font-size: 12px; color: var(--color-accent, #9184d9);
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.bb-notif-mark-read:hover {
  background: rgba(145, 132, 217, .12);
}

.bb-notif-list {
  flex: 1; overflow-y: auto; padding: 6px 0;
}

.bb-notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 16px; cursor: pointer;
  transition: background .15s;
}
.bb-notif-item:hover {
  background: rgba(145, 132, 217, .06);
}
.bb-notif-item.unread {
  background: rgba(145, 132, 217, .04);
}
.bb-notif-item.unread::before {
  content: '';
  position: absolute; left: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-accent, #9184d9);
  box-shadow: 0 0 6px rgba(145, 132, 217, .6);
  margin-top: 6px;
}
.bb-notif-item { position: relative; padding-left: 22px; }

.bb-notif-item-icon {
  font-size: 16px; flex: none; margin-top: 1px;
}

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

.bb-notif-item-title {
  font-size: 13px; font-weight: 500; color: #e9e9ed;
}

.bb-notif-item-body {
  font-size: 12px; color: rgba(233, 233, 237, .5);
  margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.bb-notif-item-time {
  font-size: 11px; color: rgba(233, 233, 237, .35);
  margin-top: 3px;
}

.bb-notif-empty {
  padding: 40px 16px; text-align: center;
  color: rgba(233, 233, 237, .4); font-size: 13px;
}

.bb-notif-browser-prompt {
  padding: 12px 16px;
  border-top: 1px solid rgba(233, 233, 237, .08);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}

.bb-notif-browser-text {
  font-size: 12px; color: rgba(233, 233, 237, .5);
}

.bb-notif-browser-btn {
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 6px;
  background: transparent; border: 1px solid var(--color-accent, #9184d9);
  color: var(--color-accent, #9184d9);
  cursor: pointer; white-space: nowrap;
}
.bb-notif-browser-btn:hover {
  background: rgba(145, 132, 217, .12);
}

/* — Responsive — */
@media (max-width: 768px) {
  .bb-toast-container {
    top: auto; bottom: 16px; right: 12px; left: 12px;
    max-width: none; width: auto;
  }
  .bb-toast {
    transform: translateY(110%);
  }
  .bb-toast-show {
    transform: translateY(0);
  }
  .bb-toast-hide {
    transform: translateY(110%);
  }
  .bb-notif-panel {
    right: 8px; left: 8px; width: auto;
    top: 56px;
  }
}

@media (max-width: 480px) {
  .bb-toast-container {
    bottom: 12px; right: 8px; left: 8px;
  }
  .bb-notif-panel {
    top: 50px; max-height: calc(100vh - 60px);
  }
}
