/* ================================================================
   S.T.A.L.K.E.R. 2 Wiki — Notifications Slide-out Panel
   Виїжджає зліва замість модалки. Виклик через showModal('modal-notifications').
   ================================================================ */

/* ─── Overlay (затемнення під панеллю) ───────────────────────── */
.notif-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4rem);
  backdrop-filter: blur(4rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 99998;
  pointer-events: none;
}

.notif-panel-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* ─── Сама панель ────────────────────────────────────────────── */
.notif-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 420rem;
  max-width: 92vw;
  background: var(--bgColorMainBlack);
  border-right: 1rem solid rgba(224, 175, 76, 0.15);
  box-shadow: 0 0 60rem rgba(0, 0, 0, 0.6);
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Rubik', sans-serif;
}

.notif-panel.is-active {
  transform: translateX(0);
}

/* Декоративна вертикальна золота лінія справа */
.notif-panel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 2rem;
  background: linear-gradient(180deg,
    transparent,
    rgba(224, 175, 76, 0.4) 30%,
    var(--accentlite) 50%,
    rgba(224, 175, 76, 0.4) 70%,
    transparent);
  pointer-events: none;
}

/* ─── Header ─────────────────────────────────────────────────── */
.notif-panel__header {
  flex-shrink: 0;
  padding: 22rem 24rem 16rem;
  border-bottom: 1rem solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.notif-panel__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14rem;
}

.notif-panel__title {
  display: flex;
  align-items: center;
  gap: 10rem;
  font-family: 'Oswald', sans-serif;
  font-size: 22rem;
  font-weight: 600;
  color: var(--colorMain);
  text-transform: uppercase;
  letter-spacing: 1.5rem;
  margin: 0;
}

.notif-panel__title-badge {
  background: var(--accent);
  color: var(--bgColorMainBlack);
  font-family: 'Oswald', sans-serif;
  font-size: 12rem;
  font-weight: 600;
  letter-spacing: 0;
  padding: 2rem 8rem;
  border-radius: 10rem;
  min-width: 22rem;
  text-align: center;
  display: none;
}

.notif-panel__title-badge.has-count {
  display: inline-block;
}

.notif-panel__actions {
  display: flex;
  align-items: center;
  gap: 6rem;
}

.notif-panel__action-btn {
  width: 32rem;
  height: 32rem;
  border-radius: 8rem;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: var(--colorFwoolf-black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s, transform 0.1s;
  padding: 0;
}

.notif-panel__action-btn:hover {
  background: rgba(224, 175, 76, 0.12);
  color: var(--accent);
}

.notif-panel__action-btn:active {
  transform: scale(0.92);
}

.notif-panel__action-btn svg {
  width: 16rem;
  height: 16rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ─── Tabs (фільтри Усі / Непрочитані) ───────────────────────── */
.notif-panel__tabs {
  display: flex;
  gap: 4rem;
}

.notif-panel__tab {
  flex: 1;
  padding: 8rem 12rem;
  background: transparent;
  border: none;
  border-radius: 8rem;
  color: var(--colorFwoolf-black);
  font-family: 'Oswald', sans-serif;
  font-size: 12rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6rem;
}

.notif-panel__tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--colorMain);
}

.notif-panel__tab.is-active {
  background: rgba(224, 175, 76, 0.1);
  color: var(--accent);
}

.notif-panel__tab-count {
  background: rgba(224, 175, 76, 0.18);
  color: var(--accent);
  font-size: 10rem;
  padding: 1rem 6rem;
  border-radius: 8rem;
  min-width: 18rem;
  font-weight: 600;
  letter-spacing: 0;
}

.notif-panel__tab.is-active .notif-panel__tab-count {
  background: var(--accent);
  color: var(--bgColorMainBlack);
}

/* ─── Список ─────────────────────────────────────────────────── */
.notif-panel__list-wrap {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.notif-panel__list-wrap::-webkit-scrollbar {
  width: 6rem;
}
.notif-panel__list-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.notif-panel__list-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3rem;
}
.notif-panel__list-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(224, 175, 76, 0.3);
}

.notif-panel__list {
  list-style: none;
  margin: 0;
  padding: 6rem 0;
}

/* Окремий пункт сповіщення */
.notif-panel__list .notification-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12rem;
  padding: 14rem 24rem 14rem 22rem;
  border-left: 3rem solid transparent;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}

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

.notif-panel__list .notification-item.unread {
  border-left-color: var(--accentlite);
  background: rgba(224, 175, 76, 0.04);
}

.notif-panel__list .notification-item.unread::before {
  content: '';
  position: absolute;
  top: 18rem;
  right: 36rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8rem var(--accent);
}

.notif-panel__list .notification-icon {
  width: 44rem;
  height: 44rem;
  border-radius: 10rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20rem;
  overflow: hidden;
}

.notif-panel__list .notification-icon-img {
  width: 28rem;
  height: 28rem;
  object-fit: contain;
}

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

.notif-panel__list .notification-title {
  font-family: 'Oswald', sans-serif;
  font-size: 14rem;
  font-weight: 500;
  color: var(--colorMain);
  margin: 0 0 4rem;
  line-height: 1.3;
  word-wrap: break-word;
}

.notif-panel__list .notification-message {
  font-family: 'Rubik', sans-serif;
  font-size: 13rem;
  color: var(--colorFwoolf-black);
  margin: 0 0 6rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.notif-panel__list .notification-time {
  font-family: 'Rubik', sans-serif;
  font-size: 11rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.5rem;
}

.notif-panel__list .notification-delete {
  position: absolute;
  top: 50%;
  right: 12rem;
  transform: translateY(-50%);
  width: 22rem;
  height: 22rem;
  border-radius: 6rem;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14rem;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s, background 0.18s, color 0.18s;
}

.notif-panel__list .notification-item:hover .notification-delete {
  opacity: 1;
}

.notif-panel__list .notification-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ─── Empty state ────────────────────────────────────────────── */
.notif-panel__list .notifications-empty {
  border-left: none !important;
  background: transparent !important;
  cursor: default;
  padding: 60rem 24rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-panel__list .notifications-empty:hover {
  background: transparent !important;
}

.notif-panel__list .notifications-empty::before {
  display: none !important;
}

.notif-panel__list .notifications-empty-text {
  text-align: center;
  color: var(--colorFwoolf-black);
}

.notif-panel__list .notifications-empty-icon {
  width: 56rem;
  height: 56rem;
  display: block;
  margin: 0 auto 14rem;
  opacity: 0.35;
}

.notif-panel__list .notifications-empty-text p {
  font-family: 'Rubik', sans-serif;
  font-size: 14rem;
  margin: 0;
}

/* ─── Footer (пагінація + очистка) ───────────────────────────── */
.notif-panel__footer {
  flex-shrink: 0;
  padding: 12rem 20rem;
  border-top: 1rem solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12rem;
  min-height: 56rem;
}

.notif-panel__footer-clear {
  background: transparent;
  border: none;
  color: var(--colorFwoolf-black);
  font-family: 'Rubik', sans-serif;
  font-size: 12rem;
  cursor: pointer;
  padding: 6rem 10rem;
  border-radius: 6rem;
  transition: background 0.18s, color 0.18s;
}

.notif-panel__footer-clear:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.notif-panel__footer-clear:disabled,
.notif-panel__footer-clear[hidden],
.notif-panel__footer-clear[style*="display: none"],
.notif-panel__footer-clear[style*="display:none"] {
  display: none;
}

.notif-panel__pagination {
  display: flex;
  align-items: center;
  gap: 8rem;
}

.notif-panel__pagination .notif-page-btn {
  width: 30rem;
  height: 30rem;
  border-radius: 6rem;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: var(--colorMain);
  font-size: 14rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-panel__pagination .notif-page-btn:hover:not(:disabled) {
  background: rgba(224, 175, 76, 0.15);
  color: var(--accent);
}

.notif-panel__pagination .notif-page-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.notif-panel__pagination .notif-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.notif-panel__pagination .notif-page-info {
  font-family: 'Oswald', sans-serif;
  font-size: 12rem;
  color: var(--colorFwoolf-black);
  letter-spacing: 1rem;
  min-width: 50rem;
  text-align: center;
}

/* ─── Mobile (< 768px) ───────────────────────────────────────── */
@media (max-width: 768px) {
  .notif-panel {
    width: 100vw;
    max-width: 100vw;
  }
  
  .notif-panel__header {
    padding: 18rem 18rem 14rem;
  }
  
  .notif-panel__title {
    font-size: 18rem;
  }
  
  .notif-panel__list .notification-item {
    padding: 12rem 18rem 12rem 16rem;
  }
}

/* Lock body scroll when panel is open */
body.notif-panel-open {
  overflow: hidden;
}
