/* ================================================================
   S.T.A.L.K.E.R. 2 Wiki — Discussions Slide-out Panel
   ================================================================ */

.dp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 99998;
  pointer-events: none;
}
.dp-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.dp-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 460rem;
  max-width: 92vw;
  background: var(--bgColorMainBlack, #0c0905);
  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;
}
.dp-panel.is-active { transform: translateX(0); }

.dp-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, #ffd47a) 50%,
    rgba(224, 175, 76, 0.4) 70%,
    transparent);
  pointer-events: none;
}

/* HEADER */
.dp-header {
  flex-shrink: 0;
  padding: 22rem 24rem 16rem;
  border-bottom: 1rem solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(224, 175, 76, 0.04), transparent);
}
.dp-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dp-title {
  display: flex;
  align-items: center;
  gap: 12rem;
  margin: 0;
}
.dp-title__icon {
  width: 32rem;
  height: 32rem;
  color: var(--accent, #E0AF4C);
  filter: drop-shadow(0 0 8rem rgba(224, 175, 76, 0.4));
  flex-shrink: 0;
}
.dp-title__text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  line-height: 1;
}
.dp-title__main {
  font-family: 'Oswald', sans-serif;
  font-size: 22rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5rem;
  color: var(--colorMain, #fff);
}
.dp-title__sub {
  font-family: 'Rubik', sans-serif;
  font-size: 10rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.3rem;
  color: var(--colorFwoolf-black, #a0a0a0);
}
.dp-title__count {
  background: var(--accent, #E0AF4C);
  color: var(--bgColorMainBlack, #0c0905);
  font-size: 12rem;
  font-weight: 600;
  padding: 2rem 8rem;
  border-radius: 10rem;
  margin-left: 4rem;
  letter-spacing: 0;
  font-family: 'Oswald', sans-serif;
}
.dp-title__count[hidden] { display: none; }

.dp-close {
  width: 32rem;
  height: 32rem;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: 8rem;
  color: var(--colorFwoolf-black, #a0a0a0);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s, transform 0.1s;
  padding: 0;
}
.dp-close:hover {
  background: rgba(224, 175, 76, 0.12);
  color: var(--accent, #E0AF4C);
}
.dp-close:active { transform: scale(0.92); }
.dp-close svg {
  width: 16rem;
  height: 16rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* BODY */
.dp-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8rem 0;
}
.dp-body::-webkit-scrollbar { width: 6rem; }
.dp-body::-webkit-scrollbar-track { background: transparent; }
.dp-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3rem;
}
.dp-body::-webkit-scrollbar-thumb:hover {
  background: rgba(224, 175, 76, 0.3);
}

/* SECTION */
.dp-section { margin-bottom: 4rem; }
.dp-section__head {
  padding: 14rem 24rem 8rem;
  font-family: 'Oswald', sans-serif;
  font-size: 11rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5rem;
  color: var(--colorFwoolf-black);
  display: flex;
  align-items: center;
  gap: 10rem;
}
.dp-section__head::after {
  content: '';
  flex: 1;
  height: 1rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
}

/* COMMENT CARD */
.dp-item {
  display: flex;
  gap: 12rem;
  padding: 12rem 24rem;
  margin-bottom: 2rem;
  cursor: pointer;
  border-left: 3rem solid transparent;
  position: relative;
  transition: background 0.18s, border-color 0.18s;
  text-decoration: none;
  color: inherit;
}
.dp-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-left-color: rgba(224, 175, 76, 0.5);
}
.dp-item.is-new {
  border-left-color: var(--accentlite, #ffd47a);
  background: rgba(224, 175, 76, 0.04);
}
.dp-item.is-new::before {
  content: '';
  position: absolute;
  top: 20rem;
  right: 18rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: var(--accent, #E0AF4C);
  box-shadow: 0 0 8rem var(--accent, #E0AF4C);
}

/* AVATAR */
.dp-item__avatar {
  width: 40rem;
  height: 40rem;
  border-radius: 50%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  border: 2rem solid rgba(224, 175, 76, 0.2);
}
.dp-item.is-new .dp-item__avatar {
  border-color: rgba(224, 175, 76, 0.5);
}
.dp-item__verif {
  position: absolute;
  bottom: -2rem;
  right: -2rem;
  width: 14rem;
  height: 14rem;
  background: var(--accent, #E0AF4C);
  border-radius: 50%;
  border: 2rem solid var(--bgColorMainBlack, #0c0905);
}

/* BODY */
.dp-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.dp-item__head {
  display: flex;
  align-items: baseline;
  gap: 6rem;
}
.dp-item__nick {
  font-family: 'Oswald', sans-serif;
  font-size: 13rem;
  font-weight: 500;
  color: var(--colorMain, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.dp-item__time {
  font-size: 10rem;
  color: var(--colorFwoolf-black, #a0a0a0);
  opacity: 0.7;
  white-space: nowrap;
  margin-left: auto;
  right: 14rem;
}

.dp-item__text {
  font-size: 12rem;
  color: var(--colorMain, #fff);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
  word-break: break-word;
}

.dp-item__article {
  font-family: 'Oswald', sans-serif;
  font-size: 10rem;
  font-weight: 500;
  color: var(--accentlite, #ffd47a);
  text-transform: uppercase;
  letter-spacing: 0.4rem;
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}
.dp-item__article-icon {
  width: 10rem;
  height: 10rem;
  flex-shrink: 0;
  opacity: 0.6;
}

/* EMPTY */
.dp-empty {
  padding: 80rem 24rem;
  text-align: center;
  color: var(--colorFwoolf-black, #a0a0a0);
}
.dp-empty__text {
  font-size: 14rem;
  margin: 0;
}

/* FOOTER */
.dp-footer {
  flex-shrink: 0;
  padding: 12rem 24rem;
  border-top: 1rem solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 56rem;
}
.dp-mark-read {
  background: transparent;
  border: none;
  color: var(--colorFwoolf-black, #a0a0a0);
  font-family: 'Rubik', sans-serif;
  font-size: 12rem;
  cursor: pointer;
  padding: 6rem 10rem;
  border-radius: 6rem;
  transition: background 0.18s, color 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 6rem;
}
.dp-mark-read:hover {
  background: rgba(224, 175, 76, 0.08);
  color: var(--accent, #E0AF4C);
}
.dp-mark-read svg { width: 14rem; height: 14rem; }
.dp-mark-read[hidden] { display: none; }

/* MOBILE */
@media (max-width: 768px) {
  .dp-panel {
    width: 100vw;
    max-width: 100vw;
  }
  .dp-header { padding: 18rem 18rem 14rem; }
  .dp-title__main { font-size: 18rem; }
  .dp-item { padding: 10rem 18rem; }
}

body.dp-panel-open { overflow: hidden; }
