/* ================================================================
   S.T.A.L.K.E.R. 2 Wiki — Bookmarks Slide-out Panel
   Аналогічна до new-articles-panel, префікс .bp-*
   ================================================================ */

/* ─── OVERLAY ───────────────────────────────────────────────── */
.bp-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;
}
.bp-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* ─── ПАНЕЛЬ ────────────────────────────────────────────────── */
.bp-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);
  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;
}
.bp-panel.is-active { transform: translateX(0); }

/* Декоративна золота лінія справа */
.bp-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, #E0AF4C) 50%,
    rgba(224, 175, 76, 0.4) 70%,
    transparent);
  pointer-events: none;
}

/* ─── HEADER ────────────────────────────────────────────────── */
.bp-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);
}
.bp-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bp-title {
  display: flex;
  align-items: center;
  gap: 12rem;
  margin: 0;
}
.bp-title__icon {
  width: 30rem;
  height: 30rem;
  object-fit: contain;
  flex-shrink: 0;
}

/* Текстовий блок: основна назва + підпис в стовпчик */
.bp-title__text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  line-height: 1;
}
.bp-title__main {
  font-family: 'Oswald', sans-serif;
  font-size: 22rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5rem;
  color: var(--colorMain, #fff);
}
.bp-title__sub {
  font-family: 'Rubik', sans-serif;
  font-size: 10rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.3rem;
  color: var(--colorGalk);
  opacity: 0.75;
}
.bp-title__count {
  background: var(--accentlite);
  color: var(--bgColorMainBlack, #0c0905);
  font-size: 12rem;
  font-weight: 600;
  padding: 2rem 8rem;
  border-radius: 10rem;
  margin-left: 4rem;
  margin-top: -6rem;
  letter-spacing: 0;
  font-family: 'Oswald', sans-serif;
}
.bp-title__count[hidden] { display: none; }

.bp-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;
}
.bp-close:hover {
  background: rgba(224, 175, 76, 0.12);
  color: var(--accent, #E0AF4C);
}
.bp-close:active { transform: scale(0.92); }
.bp-close svg {
  width: 16rem;
  height: 16rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

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

/* ─── КАРТКА ЗАКЛАДКИ ───────────────────────────────────────── */
.bp-item {
  display: flex;
  gap: 12rem;
  padding: 10rem 24rem;
  margin-bottom: 2rem;
  cursor: pointer;
  border-left: 3rem solid transparent;
  position: relative;
  transition: background 0.18s, border-color 0.18s, opacity 0.25s, transform 0.25s;
  text-decoration: none;
  color: inherit;
}
.bp-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-left-color: rgba(224, 175, 76, 0.5);
}
.bp-item.removing {
  opacity: 0;
  transform: translateX(-20rem);
  pointer-events: none;
}

.bp-item__cover {
  width: 72rem;
  height: 72rem;
  border-radius: 8rem;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  border: 1rem solid rgba(224, 175, 76, 0.15);
}
.bp-item__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bp-item__cover--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(224, 175, 76, 0.4);
}
.bp-item__cover--empty svg { width: 28rem; height: 28rem; }

.bp-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4rem;
  padding-right: 28rem;
}

/* Бейдж категорії */
.bp-item__category {
  display: inline-block;
  align-self: flex-start;
  padding: 4rem 6rem;
  border: 1rem solid rgba(224, 175, 76, 0.25);
  border-radius: 4rem;
  color: var(--accentlite, #E0AF4C);
  font-family: 'Oswald', sans-serif;
  font-size: 9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180rem;
}

.bp-item__title {
  font-family: 'Oswald', sans-serif;
  font-size: 14rem;
  font-weight: 500;
  color: var(--colorMain, #fff);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
}

.bp-item__excerpt {
  font-family: 'Rubik', sans-serif;
  font-size: 11rem;
  color: var(--colorFwoolf-black, #a0a0a0);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
}

/* Кнопка видалення закладки — у правому верхньому куті картки */
.bp-item__remove {
  position: absolute;
  top: 10rem;
  right: 16rem;
  width: 24rem;
  height: 24rem;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: 6rem;
  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;
  z-index: 2;
}
.bp-item__remove:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.bp-item__remove:active { transform: scale(0.9); }
.bp-item__remove svg {
  width: 12rem;
  height: 12rem;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* ─── EMPTY ─────────────────────────────────────────────────── */
.bp-empty {
  padding: 80rem 24rem;
  text-align: center;
  color: var(--colorFwoolf-black, #a0a0a0);
}
.bp-empty__icon {
  width: 56rem;
  height: 56rem;
  margin: 0 auto 16rem;
  opacity: 0.3;
}
.bp-empty__text {
  font-size: 14rem;
  margin: 0 0 6rem;
}
.bp-empty__hint {
  font-size: 12rem;
  margin: 0;
  opacity: 0.7;
}

/* ─── FOOTER ────────────────────────────────────────────────── */
.bp-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;
  gap: 12rem;
  min-height: 56rem;
}

.bp-view-all {
  background: var(--accent, #E0AF4C);
  color: var(--bgColorMainBlack, #0c0905);
  border: none;
  padding: 8rem 16rem;
  border-radius: 6rem;
  font-family: 'Oswald', sans-serif;
  font-size: 11rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1rem;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 6rem;
  text-decoration: none;
}
.bp-view-all:hover {
  background: var(--accentlite, #E0AF4C);
  transform: translateY(-1rem);
}

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

/* Body scroll lock */
body.bp-panel-open { overflow: hidden; }
