/* =====================================================================
   STALKERX — ZX ARTICLE (shared detail pages) scope: body.zx  · needs zx-theme.css
   ===================================================================== */

/* ---------------- ARTICLE HERO ---------------- */
.zx .zx-article-hero {
    position: relative; min-height: 58vh; display: flex; flex-direction: column; justify-content: flex-end;
    overflow: hidden; padding-top: 30px; /* header clearance is global (body.zx); this is just breathing room for tall titles */
}
.zx .zx-article-hero-bg {
    position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center;
    transform: scale(1.05); filter: saturate(.9) contrast(1.05);
}
.zx .zx-article-hero-bg::after {
    content: ""; position: absolute; inset: 0;
    background:
      radial-gradient(120% 90% at 50% 0%, transparent 20%, rgba(8,11,10,.55) 100%),
      linear-gradient(180deg, rgba(8,11,10,.65) 0%, rgba(8,11,10,.25) 35%, rgba(8,11,10,.9) 88%, var(--zx-bg) 100%);
}
.zx .zx-article-hero-scan {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.1) 3px, rgba(0,0,0,0) 4px);
    opacity: .3; mix-blend-mode: multiply;
}
.zx .zx-article-hero-inner {
    position: relative; z-index: 3; max-width: 1000px; width: 100%; margin: 0 auto; padding: 0 20px 44px;
}
.zx .zx-article-back {
    display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px;
    letter-spacing: 1.5px; text-transform: uppercase; color: var(--zx-dim); text-decoration: none;
    margin-bottom: 24px; transition: color .2s, gap .2s;
}
.zx .zx-article-back:hover { color: var(--zx-amber); gap: 12px; }
.zx .zx-article-hero-eyebrow {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 4px; text-transform: uppercase;
    color: var(--zx-amber); margin-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.zx .zx-article-hero-eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--zx-amber); }
.zx .zx-article-title {
    font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4.6vw, 60px);
    line-height: 1; letter-spacing: -1.5px; text-transform: uppercase; color: #f2f0e8; margin: 0;
    text-shadow: 0 0 50px rgba(0,0,0,.6);
}
.zx .zx-article-meta {
    display: flex; align-items: center; gap: 20px; margin-top: 22px; flex-wrap: wrap;
    font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase; color: rgba(217,222,212,.82);
    text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.zx .zx-article-meta span { display: inline-flex; align-items: center; gap: 7px; }
.zx .zx-article-meta i { color: var(--zx-amber); }

/* ---------------- ARTICLE BODY ---------------- */
.zx .zx-article-wrap { max-width: 1000px; margin: 0 auto; padding: 48px 20px 0; }
.zx .zx-article-content { font-size: 16.5px; line-height: 1.75; color: rgba(217,222,212,.85); }
.zx .zx-article-content > *:first-child { margin-top: 0; }
.zx .zx-article-content p { margin: 0 0 20px; }
.zx .zx-article-content h2, .zx .zx-article-content h3 {
    font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: -.5px;
    color: #f2f0e8; margin: 40px 0 16px; line-height: 1.1;
}
.zx .zx-article-content h2 { font-size: 26px; padding-left: 16px; border-left: 3px solid var(--zx-amber); }
.zx .zx-article-content h3 { font-size: 20px; }
.zx .zx-article-content a { color: var(--zx-amber); text-decoration: none; border-bottom: 1px solid var(--zx-amber-dim); }
.zx .zx-article-content a:hover { border-bottom-color: var(--zx-amber); }
.zx .zx-article-content strong, .zx .zx-article-content b { color: #f2f0e8; }
.zx .zx-article-content ul, .zx .zx-article-content ol { margin: 0 0 20px; padding-left: 24px; }
.zx .zx-article-content li { margin-bottom: 8px; }
.zx .zx-article-content li::marker { color: var(--zx-amber-dim); }
.zx .zx-article-content img { max-width: 100%; height: auto; border: 1px solid var(--zx-line-2); margin: 8px 0; }
.zx .zx-article-content blockquote {
    margin: 24px 0; padding: 16px 22px; border-left: 3px solid var(--zx-amber); background: var(--zx-bg-2);
    font-style: italic; color: rgba(217,222,212,.75);
}

/* ---------------- GALLERY ---------------- */
.zx .gallery-wrap { margin: 32px 0; }
.zx .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.zx .gallery img { width: 100%; aspect-ratio: 16/10; object-fit: cover; cursor: pointer; border: 1px solid var(--zx-line-2); transition: filter .25s, border-color .25s; }
.zx .gallery img:hover { filter: brightness(1.12); border-color: var(--zx-amber-dim); }

/* ---------------- LIGHTBOX ---------------- */
.zx .lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; }
.zx .lightbox.is-open { display: flex; }
.zx .lightbox__backdrop { position: absolute; inset: 0; background: rgba(5,7,6,.92); backdrop-filter: blur(6px); }
.zx .lightbox__image { position: relative; z-index: 2; max-width: 92vw; max-height: 88vh; border-radius: 0 !important; box-shadow: none !important; }
.zx .lightbox__image img { max-width: 92vw; max-height: 88vh; object-fit: contain; border: 1px solid var(--zx-line-2); border-radius: 0 !important; transition: opacity .12s; }
.zx .lightbox__close {
    position: fixed !important; top: 128px; right: 24px; z-index: 2147483647 !important; /* well below the header */
    background: rgba(8,11,10,.75) !important; border: 1px solid var(--zx-line-2) !important; border-radius: 0 !important;
    color: var(--zx-text); width: 44px; height: 44px; cursor: pointer; transition: all .2s; font-size: 20px;
}
.zx .lightbox__close:hover { border-color: var(--zx-amber) !important; color: var(--zx-amber); background: rgba(8,11,10,.9) !important; }
/* kill the global border-arrow ::after — keep a single amber chevron via ::before */
.zx .lightbox__nav--prev::after, .zx .lightbox__nav--next::after { content: none !important; display: none !important; }
.zx .lightbox__nav {
    position: fixed; top: 50% !important; bottom: auto !important; transform: translateY(-50%); z-index: 2147483646;
    width: 54px !important; height: 54px !important; background: rgba(8,11,10,.6); border: 1px solid var(--zx-line-2);
    color: var(--zx-amber); cursor: pointer; display: grid; place-items: center;
}
.zx .lightbox__nav:hover { background: var(--zx-amber); color: #10130f; }
/* CSS-drawn chevrons — perfectly centered (unlike font glyphs) */
.zx .lightbox__nav::before {
    content: ""; display: block; width: 11px; height: 11px;
    border: 2px solid currentColor; border-left: 0; border-bottom: 0;
}
.zx .lightbox__nav--prev { left: 24px; } .zx .lightbox__nav--prev::before { transform: rotate(-135deg); margin-left: 4px; }
.zx .lightbox__nav--next { right: 24px; } .zx .lightbox__nav--next::before { transform: rotate(45deg); margin-right: 4px; }

/* ---------------- COMMENTS ---------------- */
.zx .zx-comments { max-width: 1000px; margin: 56px auto 0; padding: 0 20px; }
.zx .zx-comments-head {
    font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--zx-dim);
    display: flex; align-items: center; gap: 10px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--zx-line);
}
.zx .zx-comments-head b { color: var(--zx-amber); font-weight: 500; }
.zx .zx-comments-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--zx-ok); box-shadow: 0 0 8px var(--zx-ok); }

.zx .news-item-comments-wrap { margin-bottom: 34px; }
.zx .news-item-comments-textarea-wrap { display: flex; flex-direction: column; gap: 8px; }
.zx .news-item-comments-textarea-wrap label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--zx-amber-dim); }
.zx .news-item-comments-wrap textarea {
    width: 100%; min-height: 96px; resize: vertical; background: var(--zx-bg-2); border: 1px solid var(--zx-line-2);
    color: var(--zx-text); font-family: var(--font-body); font-size: 14px; padding: 14px 16px; outline: none; transition: border-color .2s;
}
.zx .news-item-comments-wrap textarea:focus { border-color: var(--zx-amber-dim); }
/* Страница новости: в style.css поле объявлено через ID (#news-item-comments-textarea)
   с полупрозрачным фоном var(--cyan). ID весомее класса, поэтому правило выше
   проигрывало и сквозь поле просвечивал фоновый слой с пылью.
   Бьём тем же оружием: селектор с ID перекрывает легаси. */
.zx #news-item-comments-textarea {
    max-width: none; min-height: 96px; background: var(--zx-bg-2);
    border: 1px solid var(--zx-line-2); border-radius: 0; padding: 14px 16px;
}
.zx #news-item-comments-textarea:focus { border-color: var(--zx-amber-dim); }
.zx .news-item-comments-textarea-btn {
    margin-top: 12px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600;
    background: var(--zx-amber); color: #10130f; border: none; padding: 13px 28px; cursor: pointer; transition: all .2s;
}
.zx .news-item-comments-textarea-btn:hover { background: transparent; color: var(--zx-amber); box-shadow: inset 0 0 0 1.5px var(--zx-amber); }
.zx .mod-show-guest-notice { font-family: var(--font-mono); font-size: 13px; color: var(--zx-faint); padding: 18px; border: 1px dashed var(--zx-line-2); text-align: center; margin-bottom: 30px; }

.zx .news-item-comments-messages { display: flex; flex-direction: column; gap: 20px; }
/* Оформление обнуляем явно: старый style.css вешает на .chat-message скруглённую
   полупрозрачную плашку с рамкой, а это правило раньше задавало только раскладку,
   поэтому легаси-вид доживал до всех страниц с комментариями.
   position: relative обязателен — крестик удаления позиционируется абсолютно. */
.zx .chat-message {
    display: flex; gap: 12px; min-width: 0; position: relative;
    background: none; border: none; border-radius: 0; padding: 0;
}
.zx .chat-message:hover { border: none; }
.zx .chat-message-img { flex-shrink: 0; width: 42px; height: 42px; text-decoration: none; }
.zx .chat-message-img img, .zx .comment-avatar-initial {
    width: 42px; height: 42px; object-fit: cover;
    display: grid; place-items: center; font-family: var(--font-display); color: var(--zx-amber); background: var(--zx-bg-2);
}
.zx .chat-message-right { flex: 1; min-width: 0; }
.zx .chat-message-name-user-date { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.zx .chat-message-name-user-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.zx .chat-message-name-user { font-family: var(--font-mono); font-size: 13.5px; color: var(--zx-text); }
.zx .faction-icon { width: 16px; height: 16px; object-fit: contain; }
.zx .chat-message-date { font-family: var(--font-mono); font-size: 10.5px; color: var(--zx-faint); white-space: nowrap; flex-shrink: 0; }
.zx .chat-message-text { font-size: 14.5px; line-height: 1.6; color: rgba(217,222,212,.82); word-break: break-word; }
/* Крестик удаления.
   В style.css он позиционируется абсолютно в правый верхний угол карточки —
   ровно туда, где стоит дата, поэтому они накладывались (раньше их случайно
   разводил паддинг карточки, который ушёл вместе со старой плашкой).
   Ставим крестик на одну линию с датой и резервируем под него место в самой
   дате, чтобы получилось [дата][зазор][крестик], прижатое вправо. */
.zx .chat-message {
    --zx-cross: 16px;      /* ширина кнопки крестика */
    --zx-cross-gap: 12px;  /* зазор между датой и крестиком */
}
.zx .delete-meassage-cross {
    position: absolute; top: 0; right: 0;
    width: var(--zx-cross); height: 18px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; line-height: 1;
    background: none; border: none; color: var(--zx-faint); cursor: pointer; transition: color .2s;
}
.zx .delete-meassage-cross:hover { color: var(--zx-danger); }
/* Отступ добавляем только когда крестик реально есть: гостю его не отдают,
   и дата у него должна оставаться прижатой к правому краю. */
.zx .chat-message:has(.delete-meassage-cross) .chat-message-date {
    padding-right: calc(var(--zx-cross) + var(--zx-cross-gap));
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 860px) {
    .zx .zx-article-hero { min-height: 46vh; }
    .zx .gallery { grid-template-columns: repeat(2, 1fr); }
    .zx .lightbox__nav { width: 44px; height: 44px; }
}
@media (max-width: 560px) {
    .zx .gallery { grid-template-columns: 1fr 1fr; }
    .zx .zx-article-content { font-size: 15.5px; }
}

/* Буква-заглушка коммента — как в чате: без скругления. */
.zx .comment-avatar-initial { border-radius: 0 !important; }
