/* Лента lastcomments: стили без сборки webpack (подключается из lastcomments.php через css_array) */

/* ── Layout: toolbar вне .wide-cards — зеркало отступов wide-cards-cont ── */
html:has(.lc-feed-toolbar) {
  scrollbar-gutter: stable;
}

html:has(.lc-feed-toolbar) .lc-feed-toolbar,
html:has(.lc-feed-toolbar) #dle-content {
  box-sizing: border-box;
  width: 100%;
  max-width: 1310px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
}

html:has(.lc-feed-toolbar) .lc-feed-toolbar {
  margin-bottom: 16px;
  padding-top: 0;
  padding-bottom: 0;
}

@media (min-width: 600px) {
  html:has(.lc-feed-toolbar) .lc-feed-toolbar,
  html:has(.lc-feed-toolbar) #dle-content {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (min-width: 1024px) {
  html:has(.lc-feed-toolbar) .lc-feed-toolbar,
  html:has(.lc-feed-toolbar) #dle-content {
    max-width: none;
    margin-left: 64px;
    margin-right: 64px;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 1280px) {
  html:has(.lc-feed-toolbar) .lc-feed-toolbar,
  html:has(.lc-feed-toolbar) #dle-content {
    max-width: 1310px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 64px;
    padding-right: 64px;
  }
}

.lc-feed-toolbar {
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  width: 100%;
  min-height: 44px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .lc-feed-toolbar {
    flex-wrap: wrap;
    min-height: 0;
  }
}

/* Одна колонка на всю ширину контейнера, не card-grid с space-between */
.wide-cards:has(#dle-comments-list) .wide-cards-cont,
.wide-cards:has(#dle-comments-list) #dle-content {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start !important;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  flex: 1 1 100%;
  gap: 0;
}

.wide-cards:has(#dle-comments-list) #dle-content .dle-comments-navigation {
  width: 100%;
  flex: 0 0 auto;
  margin-top: 8px;
}

/* ── Карточки комментариев ── */
#dle-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#dle-comments-list .lc-comment-root {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  padding: 16px 18px 14px;
  margin-bottom: 18px;
  box-sizing: border-box;
}

html[data-theme="dark"] #dle-comments-list .lc-comment-root {
  background: var(--dark-bg-surface-elevated, #252836);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

#dle-comments-list .lc-comment-root .comment-cont {
  background: transparent;
  border: none;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

#dle-comments-list .lc-comment-root .comment-cont.lc-thread-reply {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed rgba(15, 23, 42, 0.12);
}

html[data-theme="dark"] #dle-comments-list .lc-comment-root .comment-cont.lc-thread-reply {
  border-top-color: rgba(255, 255, 255, 0.12);
}

#dle-comments-list .lc-comment-root .comment-cont.lc-thread-reply::before {
  content: "Последний ответ";
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--link-font, #4595d5);
  opacity: 0.85;
}

/* ── Свёрнутая ветка ── */
.lc-thread-stack {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] .lc-thread-stack {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.lc-thread-node {
  padding: 8px 0;
}

.lc-thread-node--root {
  padding-top: 0;
}

.lc-thread-node__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.lc-thread-node__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.lc-thread-node__meta {
  min-width: 0;
}

.lc-thread-node__author {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
}

.lc-thread-node__date {
  font-size: 12px;
  color: var(--text-tertiary, #9aa7b9);
  margin-top: 2px;
}

.lc-thread-node__body {
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  padding-left: 46px;
}

.lc-thread-node__body img {
  display: block;
  width: 100%;
  max-width: 280px;
  max-height: 180px;
  margin-bottom: 16px;
  border-radius: 12px;
}

.lc-thread-expand-btn {
  display: inline-flex;
  align-items: center;
  margin: 6px 0 6px 46px;
  padding: 5px 12px;
  border: 1px dashed rgba(69, 149, 213, 0.45);
  border-radius: 999px;
  background: rgba(69, 149, 213, 0.08);
  color: var(--link-font, #4595d5);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lc-thread-expand-btn:hover,
.lc-thread-expand-btn:focus-visible {
  background: rgba(69, 149, 213, 0.14);
  border-color: rgba(69, 149, 213, 0.65);
}

.lc-thread-middle {
  margin-left: 46px;
  padding-left: 12px;
  border-left: 2px solid rgba(69, 149, 213, 0.25);
}

.lc-thread-middle--collapsed,
.lc-thread-middle[hidden] {
  display: none !important;
}

.lc-thread-connector {
  height: 0;
}

.lc-thread-node--root::before {
  content: "Начало обсуждения";
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary, #9aa7b9);
}

/* ── Кнопки действий: Ответить (primary) vs Перейти (outline) ── */
/* Иконки: mask + -webkit-mask-image (inherit ломает WebKit → квадрат) */
#dle-comments-list .lc-comment-root .reply-dat-comment {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

#dle-comments-list .lc-comment-root .reply-dat-comment > a[onclick*="dle_reply"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#dle-comments-list .lc-comment-root .reply-dat-comment > a[onclick*="dle_reply"]::before {
  content: "";
  display: block !important;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M10 9V5L3 12l7 7v-4h11V9H10z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M10 9V5L3 12l7 7v-4h11V9H10z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

#dle-comments-list .lc-comment-root .reply-dat-comment > a[onclick*="dle_reply"]:hover,
#dle-comments-list .lc-comment-root .reply-dat-comment > a[onclick*="dle_reply"]:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.42);
  color: #fff !important;
  text-decoration: none !important;
}

#dle-comments-list .lc-comment-root .reply-dat-comment > a[onclick*="dle_reply"]:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
}

html[data-theme="dark"] #dle-comments-list .lc-comment-root .reply-dat-comment > a[onclick*="dle_reply"] {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
  color: #fff !important;
}

/* Стикеры: social-auth img:not(.lazyload) { animation: fadeInImage } скрывает opacity:0 */
#dle-comments-list img.comment-sticker,
#dle-comments-list .lc-thread-node__body img.comment-sticker {
  animation: none !important;
  opacity: 1 !important;
  color: inherit !important;
  font-size: inherit !important;
  text-indent: 0 !important;
  width: auto !important;
  margin-bottom: 0 !important;
}

#dle-comments-list .comment-votes a.lc-goto-comment-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 0;
  padding: 6px 13px;
  border: 2px solid #2563eb !important;
  border-radius: 8px;
  background: #ffffff !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.12);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

#dle-comments-list .comment-votes a.lc-goto-comment-btn::before {
  content: "";
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19 19H5V5h7V3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19 19H5V5h7V3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: transform 0.2s ease;
}

#dle-comments-list .comment-votes a.lc-goto-comment-btn:hover,
#dle-comments-list .comment-votes a.lc-goto-comment-btn:focus-visible {
  background: #dbeafe !important;
  border-color: #1d4ed8 !important;
  color: #1e3a8a !important;
  -webkit-text-fill-color: #1e3a8a !important;
  transform: translateY(-1px);
  text-decoration: none !important;
}

#dle-comments-list .comment-votes a.lc-goto-comment-btn:hover::before,
#dle-comments-list .comment-votes a.lc-goto-comment-btn:focus-visible::before {
  transform: translate(1px, -1px);
}

#dle-comments-list .comment-votes a.lc-goto-comment-btn:focus-visible {
  outline: 2px solid rgba(29, 78, 216, 0.45);
  outline-offset: 2px;
}

html[data-theme="dark"] #dle-comments-list .comment-votes a.lc-goto-comment-btn,
[data-theme="dark"] #dle-comments-list .comment-votes a.lc-goto-comment-btn {
  border-color: #38bdf8 !important;
  background: #0c4a6e !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] #dle-comments-list .comment-votes a.lc-goto-comment-btn:hover,
html[data-theme="dark"] #dle-comments-list .comment-votes a.lc-goto-comment-btn:focus-visible,
[data-theme="dark"] #dle-comments-list .comment-votes a.lc-goto-comment-btn:hover,
[data-theme="dark"] #dle-comments-list .comment-votes a.lc-goto-comment-btn:focus-visible {
  background: #0369a1 !important;
  border-color: #7dd3fc !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.last-comm-head {
  position: relative;
  margin-bottom: 6px;
  padding-right: 30px;
}

.last-comm-head .last-comm-link {
  min-width: 0;
}

.last-comm-head > .lc-ignore-news-btn {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
}

.last-comm-head .lc-ignore-news-btn,
.lc-ignore-news-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(120, 120, 120, 0.35);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  color: inherit;
  line-height: 1;
  opacity: 0.65;
  transition: opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.lc-ignore-news-btn__icon {
  display: block;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.last-comm-head .lc-ignore-news-btn:hover,
.last-comm-head .lc-ignore-news-btn:focus-visible,
.lc-ignore-news-btn:hover,
.lc-ignore-news-btn:focus-visible {
  opacity: 1;
  border-color: rgba(180, 80, 80, 0.55);
  color: #c0392b;
  background: rgba(192, 57, 43, 0.06);
}

.lc-ignore-news-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lc-feed-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  row-gap: 6px;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.lc-feed-tab,
.lc-feed-back-link,
.lc-ignore-toolbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color, rgba(128, 128, 128, 0.35));
  background: rgba(0, 0, 0, 0.03);
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--font-color, #374151);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.lc-feed-tab--active {
  background: var(--link-font, #2b7cff);
  color: #fff;
  border-color: var(--link-font, #2b7cff);
  box-shadow: none;
}

/* Мобиль: активный таб — текст, неактивные — SVG-иконки (mask-image) */
@media (max-width: 640px) {
  .lc-feed-tab {
    position: relative;
  }

  .lc-feed-tab::before {
    content: '';
    display: none;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
  }

  .lc-feed-tab:not(.lc-feed-tab--active) {
    padding: 8px 11px;
  }

  .lc-feed-tab:not(.lc-feed-tab--active) .lc-feed-tab__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .lc-feed-tab:not(.lc-feed-tab--active)::before {
    display: block;
  }

  .lc-feed-tab[data-lc-tab="all"]:not(.lc-feed-tab--active)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z'/%3E%3C/svg%3E");
  }

  .lc-feed-tab[data-lc-tab="questions"]:not(.lc-feed-tab--active)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
  }

  .lc-feed-tab[data-lc-tab="reviews"]:not(.lc-feed-tab--active)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
  }

  .lc-feed-tab[data-lc-tab="suggestions"]:not(.lc-feed-tab--active)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0018 8 6 6 0 006 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 018.91 14'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0018 8 6 6 0 006 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 018.91 14'/%3E%3C/svg%3E");
  }
}

.lc-feed-tab:not(.lc-feed-tab--active):hover,
.lc-feed-tab:not(.lc-feed-tab--active):focus-visible,
.lc-feed-back-link:hover,
.lc-feed-back-link:focus-visible {
  background: rgba(43, 124, 255, 0.08);
  border-color: rgba(43, 124, 255, 0.35);
  text-decoration: none;
}

.lc-ignore-toolbar {
  margin: 0;
  flex: 0 0 auto;
  margin-left: auto;
}

.lc-ignore-toolbar__btn:hover,
.lc-ignore-toolbar__btn:focus-visible {
  background: rgba(43, 124, 255, 0.08);
  border-color: rgba(43, 124, 255, 0.35);
}

html[data-theme="dark"] .lc-feed-tab:not(.lc-feed-tab--active),
html[data-theme="dark"] .lc-feed-back-link,
html[data-theme="dark"] .lc-ignore-toolbar__btn {
  color: var(--font-color, #e5e7eb);
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .lc-feed-tab:not(.lc-feed-tab--active):hover,
html[data-theme="dark"] .lc-feed-tab:not(.lc-feed-tab--active):focus-visible,
html[data-theme="dark"] .lc-feed-back-link:hover,
html[data-theme="dark"] .lc-feed-back-link:focus-visible,
html[data-theme="dark"] .lc-ignore-toolbar__btn:hover,
html[data-theme="dark"] .lc-ignore-toolbar__btn:focus-visible {
  background: rgba(43, 124, 255, 0.15);
}

.lc-ignore-toolbar__badge {
  min-width: 1.4em;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.3;
}

html[data-theme="dark"] .lc-ignore-toolbar__badge {
  background: rgba(255, 255, 255, 0.12);
}

/* Копировать ссылку: стили из pb-comments-ui.css (.comment-link-btn).
   Не переопределять .lc-comment-context-btn на кнопке с обоими классами — иначе pill вместо иконки. */

.comment-link-btn--copied {
  border-color: rgba(34, 197, 94, 0.75) !important;
  color: #16a34a !important;
}

html[data-theme="dark"] .comment-link-btn--copied {
  color: #4ade80 !important;
}

.lc-topic-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lc-topic-badge--question {
  background: rgba(234, 179, 8, 0.18);
  color: #a16207;
}

.lc-topic-badge--review {
  background: rgba(168, 85, 247, 0.16);
  color: #7e22ce;
}

.lc-topic-badge--suggestion {
  background: rgba(142, 68, 173, 0.16);
  color: #8e44ad;
}

html[data-theme="dark"] .lc-topic-badge--question {
  color: #facc15;
}

html[data-theme="dark"] .lc-topic-badge--review {
  color: #d8b4fe;
}

.lc-modal {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.lc-modal.lc-modal--open {
  display: flex;
}

.lc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.lc-modal__box {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 100%;
  max-height: min(70vh, 560px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  color: #222;
}

.lc-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.lc-modal__close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}

.lc-modal__body {
  overflow: auto;
  padding: 8px 0;
}

.lc-modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.lc-modal__box--confirm {
  max-width: 400px;
}

.lc-ignore-confirm-text {
  margin: 0;
  padding: 8px 16px 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary, #64748b);
}

.lc-ignore-confirm-cancel,
.lc-ignore-confirm-submit {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
}

.lc-ignore-confirm-cancel {
  border: 1px solid rgba(120, 120, 120, 0.35);
  background: transparent;
  color: inherit;
}

.lc-ignore-confirm-cancel:hover,
.lc-ignore-confirm-cancel:focus-visible {
  background: rgba(0, 0, 0, 0.04);
}

.lc-ignore-confirm-submit {
  border: none;
  background: #c0392b;
  color: #fff;
}

.lc-ignore-confirm-submit:hover,
.lc-ignore-confirm-submit:focus-visible {
  background: #a93226;
}

.lc-ignore-confirm-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.lc-ignore-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.lc-ignore-list-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.lc-ignore-list-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(120, 130, 145, 0.14);
  color: var(--text-secondary, #9aa7b9);
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}

.lc-ignore-list-remove {
  flex-shrink: 0;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(120, 120, 120, 0.35);
  background: transparent;
  cursor: pointer;
}

/* AJAX-контекст ветки комментариев */
.lc-comment-context-slot {
  margin: 12px 0 16px;
  padding: 0;
  border-radius: 18px;
  border: 1px solid #ccd5e1;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
}

html[data-theme="dark"] .lc-comment-context-slot {
  background: var(--bg-surface, #1e1e1e);
  border-color: rgba(255, 255, 255, 0.1);
}

.lc-comment-context-slot .lastcomm-context-branch {
  margin: 0;
  border-radius: 0;
  border-left: none;
  background: transparent;
  overflow: visible;
}

.lc-comment-context-slot .lastcomm-context-branch + .lastcomm-context-branch {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] .lc-comment-context-slot .lastcomm-context-branch + .lastcomm-context-branch {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.lc-comment-context-slot .lastcomm-context-branch.lastcomm-context-branch--target {
  background: rgba(231, 76, 60, 0.07);
}

.lc-comment-context-slot .comment-cont.lc-context-branch-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  padding: 12px 14px;
  margin: 0;
}

.lc-comment-context-slot .comment-user-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lc-comment-context-slot .comment-user-date img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.lc-comment-context-slot .comment-log-and-date {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  max-width: calc(100% - 50px);
}

.lc-comment-context-slot .login-name {
  font-weight: 600;
  color: #111827;
}

html[data-theme="dark"] .lc-comment-context-slot .login-name {
  color: var(--text-primary, #e9eefb);
}

.lc-comment-context-slot .comments-date {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

.lc-comment-context-slot .comment-content {
  display: flex;
  flex-direction: column;
  padding: 0.35rem 0 0;
}

.lc-comment-context-slot .comment-text {
  font-size: 0.95rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.lc-comment-context-slot .comment-text img {
  max-width: 300px;
  max-height: 200px;
  width: 100%;
  height: auto;
  border-radius: 18px;
  margin: 0.75rem 0;
  object-fit: contain;
  display: block;
}

/* Infinite scroll (do=lastcomments) */
.wide-cards:has(#lc-feed-root) #dle-content .dle-comments-navigation {
  display: none !important;
}

#lc-feed-root {
  width: 100%;
}

#lc-feed-root .lc-feed-sentinel {
  width: 100%;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  visibility: hidden;
  pointer-events: none;
}

#lc-feed-root .lc-feed-loading {
  text-align: center;
  padding: 16px 0 8px;
  font-size: 0.875rem;
  color: #6b7280;
}

html[data-theme="dark"] #lc-feed-root .lc-feed-loading {
  color: var(--text-secondary, #9aa3b8);
}
