/* =====================================================
   NOTIFICATIONS — campana header + dropdown
   File isolato: niente regole su elementi del tema esistente,
   solo classi `.notif-*` proprie. Caricato globalmente.
===================================================== */

.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0 6px;
}

/* Su desktop (>=1024px) vediamo solo la versione desktop nel buttons-col */
.notif-bell--mobile { display: none; }
@media (max-width: 1023px) {
  .notif-bell--desktop { display: none; }
  .notif-bell--mobile {
    display: inline-flex;
    order: 3;            /* tra search-btn (order:2) e mp-holder (order:4) */
    margin-left: 4px;
  }
}
.notif-bell__btn {
  position: relative;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--general-color, #c8c8c8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .15s, color .15s;
}
.notif-bell__btn:hover {
  background: rgba(128,128,128,0.12);
  color: var(--primary-color, #ff6b00);
}
.notif-bell__icon {
  width: 22px;
  height: 22px;
  /* outline icon: stroke è già "currentColor" inline; niente fill */
}
.notif-bell__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.notif-bell__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-width: 90vw;
  background: var(--member-menu-bg, #161616);
  border: 1px solid rgba(128,128,128,0.22);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  z-index: 1000;
  padding: 12px;
  color: var(--general-color, #fff);
  max-height: 70vh;
  overflow-y: auto;
}
.notif-bell__dropdown[hidden] { display: none; }

/* Mobile: dropdown più stretto + allineato al bordo dx senza traboccare */
@media (max-width: 600px) {
  .notif-bell--mobile .notif-bell__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    max-width: calc(100vw - 16px);
  }
}

.notif-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(128,128,128,0.16);
}
.notif-dropdown__see-all-mini {
  font-size: 12px;
  color: var(--primary-color, #ff6b00);
  text-decoration: none;
  font-weight: 600;
}
.notif-dropdown__see-all-mini:hover { text-decoration: underline; }

.notif-dropdown__empty {
  margin: 16px 0 4px;
  text-align: center;
  color: var(--main-grey-color, #888);
  font-size: 13px;
}

/* Lista notifiche (shared dropdown + page inbox) */
.notif-list {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notif-list li { padding: 0; margin: 0; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  position: relative;
  text-decoration: none;
  color: var(--general-color, #fff);
  transition: background .15s;
}
.notif-item:hover { background: rgba(128,128,128,0.10); color: var(--general-color, #fff); }
.notif-item.is-unread { background: rgba(255,107,0,0.06); }
.notif-item.is-unread:hover { background: rgba(255,107,0,0.12); }

.notif-item__avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(128,128,128,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-item__avatar img { width: 100%; height: 100%; object-fit: cover; }
.notif-item__avatar-fallback {
  font-size: 14px;
  font-weight: 700;
  color: var(--general-color, #fff);
  text-transform: uppercase;
}

.notif-item__body { flex: 1; min-width: 0; }
.notif-item__meta {
  font-size: 13px;
  line-height: 1.35;
  color: var(--general-color, #fff);
}
.notif-item__action {
  color: var(--main-grey-color, #888);
  margin: 0 4px;
  font-weight: 400;
}
.notif-item__target {
  font-style: italic;
  font-weight: 500;
}
.notif-item__comment {
  font-size: 12px;
  color: var(--main-grey-color, #aaa);
  margin-top: 4px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.notif-item__time {
  display: block;
  font-size: 11px;
  color: var(--main-grey-color, #888);
  margin-top: 4px;
  opacity: 0.8;
}
.notif-item__dot {
  position: absolute;
  top: 14px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color, #ff6b00);
}

/* Wrapper item + bottone delete */
.notif-item-wrap {
  position: relative;
  border-radius: 8px;
  transition: background .15s, opacity .2s, transform .2s;
}
.notif-item-wrap:hover { background: rgba(128,128,128,0.10); }
.notif-item-wrap.is-unread { background: rgba(255,107,0,0.06); }
.notif-item-wrap.is-unread:hover { background: rgba(255,107,0,0.12); }

/* Quando il wrapper ha hover, l'item interno non deve avere il proprio sfondo */
.notif-item-wrap .notif-item:hover { background: transparent; }
.notif-item-wrap.is-unread .notif-item { background: transparent; }

.notif-item__delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--main-grey-color, #888);
  opacity: 0;
  transition: opacity .15s, color .15s, background .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notif-item-wrap:hover .notif-item__delete { opacity: 0.7; }
.notif-item__delete:hover {
  opacity: 1 !important;
  color: #ef4444;
  background: rgba(239,68,68,0.12);
}
@media (max-width: 600px) {
  /* Su mobile mostra sempre, niente hover */
  .notif-item__delete { opacity: 0.5; }
}

.notif-dropdown__see-all {
  display: block;
  text-align: center;
  padding: 10px;
  margin-top: 6px;
  border-top: 1px solid rgba(128,128,128,0.16);
  color: var(--primary-color, #ff6b00);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.notif-dropdown__see-all:hover { background: rgba(255,107,0,0.06); }

/* =====================================================
   INBOX page (/my/notifications/)
===================================================== */
.notif-inbox {
  margin: 24px 0 40px;
}
.notif-inbox__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.notif-inbox__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--general-color, #fff);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.notif-inbox__unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.notif-inbox__actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}
.notif-inbox__mark-all,
.notif-inbox__delete-all {
  background: transparent;
  border: 1px solid rgba(128,128,128,0.32);
  color: var(--main-grey-color, #888);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.notif-inbox__mark-all:hover {
  color: var(--primary-color, #ff6b00);
  border-color: var(--primary-color, #ff6b00);
}
.notif-inbox__delete-all:hover {
  color: #fff;
  background: #ef4444;
  border-color: #ef4444;
}
.notif-inbox__mark-all:disabled,
.notif-inbox__delete-all:disabled { opacity: .5; cursor: not-allowed; }
.notif-inbox__empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--main-grey-color, #888);
}
.notif-inbox__empty-icon { font-size: 48px; margin-bottom: 12px; }

/* Inbox carica anche member_dashboard.css → niente duplicati con .load-more */
.notif-inbox .load-more {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
.notif-inbox .load-more .btn {
  display: inline-flex;
  padding: 10px 24px;
  background: var(--thumbs-bottom-btn-bg, rgba(128,128,128,0.08));
  color: var(--general-color, #fff);
  border: 1px solid rgba(128,128,128,0.28);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.notif-inbox .load-more .btn:hover {
  border-color: var(--primary-color, #ff6b00);
  color: var(--primary-color, #ff6b00);
}

@media (max-width: 600px) {
  .notif-inbox__title { font-size: 18px; }
}

/* Highlight animato del commento target (arrivo da notifica) */
@keyframes comment-highlight-pulse {
  0%   { background-color: rgba(255, 107, 0, 0.0); }
  20%  { background-color: rgba(255, 107, 0, 0.22); }
  100% { background-color: rgba(255, 107, 0, 0.0); }
}
.comment-highlight {
  animation: comment-highlight-pulse 3s ease-out;
  border-radius: 8px;
}
