/*
 * EmpireG — Last Comments Widget (redesign)
 * Корректная работа в light + dark режимах
 */

/* ── Виджет: light-тема по умолчанию ── */
.eg-lastcomments .eg-widget__body {
  padding: 6px;
}

.eg-lastcomments .eg-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Карточка комментария ── */
.eg-lastcomments .eg-cmt {
  display: flex;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  position: relative;
  transition: background .2s ease;
}

.eg-lastcomments .eg-cmt + .eg-cmt {
  margin-top: 6px;
  border-top: 1px solid rgba(15,23,42,.06);
  padding-top: 12px;
}

.eg-lastcomments .eg-cmt:hover {
  background: rgba(34,197,94,.04);
}

/* ── Аватар ── */
.eg-lastcomments .eg-cmt__ava {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  text-decoration: none;
  background: rgba(15,23,42,.06);
  border: 2px solid rgba(34,197,94,.15);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.eg-lastcomments .eg-cmt:hover .eg-cmt__ava {
  border-color: rgba(34,197,94,.4);
  box-shadow: 0 0 0 3px rgba(34,197,94,.08);
}

.eg-lastcomments .eg-cmt__ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Тело ── */
.eg-lastcomments .eg-cmt__body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── Шапка: имя + время ── */
.eg-lastcomments .eg-cmt__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1.2;
}

.eg-lastcomments .eg-cmt__user {
  font-weight: 700;
  text-decoration: none;
  color: #1f2937;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .15s;
}
.eg-lastcomments .eg-cmt__user:hover {
  color: #16a34a;
}

.eg-lastcomments .eg-cmt__sep {
  color: rgba(15,23,42,.25);
  font-size: 8px;
  line-height: 1;
}

.eg-lastcomments .eg-cmt__date {
  color: #9ca3af;
  white-space: nowrap;
  font-size: 10.5px;
}

/* ── Название публикации ── */
.eg-lastcomments .eg-cmt__news {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.3;
  color: #16a34a;
  transition: color .15s, opacity .15s;
}
.eg-lastcomments .eg-cmt__news:hover {
  color: #15803d;
  text-decoration: underline;
}

/* ── Текст комментария ── */
.eg-lastcomments .eg-cmt__text {
  font-size: 12px;
  line-height: 1.4;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eg-lastcomments .eg-cmt__text img,
.eg-lastcomments .eg-cmt__text video,
.eg-lastcomments .eg-cmt__text iframe {
  display: none;
}

/* ── Ссылка "Перейти" ── */
.eg-lastcomments .eg-cmt__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  text-decoration: none;
  margin-top: 2px;
  transition: color .15s;
}
.eg-lastcomments .eg-cmt__link:hover {
  color: #16a34a;
}
.eg-lastcomments .eg-cmt__link svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* ── Кнопка "Смотреть все" ── */
.eg-lastcomments .eg-widget__foot {
  padding: 8px 10px 10px;
}

.eg-lastcomments .eg-widget__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .02em;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 2px 8px rgba(34,197,94,.25);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.eg-lastcomments .eg-widget__more:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(34,197,94,.35);
  transform: translateY(-1px);
}
.eg-lastcomments .eg-widget__more:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(34,197,94,.2);
}

/* ════════════════════════════════════════════════
   ТЁМНАЯ ТЕМА
   ════════════════════════════════════════════════ */

[data-theme="dark"] .eg-lastcomments .eg-cmt + .eg-cmt {
  border-top-color: rgba(255,255,255,.05);
}

[data-theme="dark"] .eg-lastcomments .eg-cmt:hover {
  background: rgba(34,197,94,.04);
}

[data-theme="dark"] .eg-lastcomments .eg-cmt__ava {
  background: rgba(255,255,255,.06);
  border-color: rgba(34,197,94,.2);
}
[data-theme="dark"] .eg-lastcomments .eg-cmt:hover .eg-cmt__ava {
  border-color: rgba(34,197,94,.5);
  box-shadow: 0 0 0 3px rgba(34,197,94,.1);
}

[data-theme="dark"] .eg-lastcomments .eg-cmt__user {
  color: #e2e5ea;
}
[data-theme="dark"] .eg-lastcomments .eg-cmt__user:hover {
  color: #4ade80;
}

[data-theme="dark"] .eg-lastcomments .eg-cmt__sep {
  color: rgba(255,255,255,.15);
}

[data-theme="dark"] .eg-lastcomments .eg-cmt__date {
  color: #6b7280;
}

[data-theme="dark"] .eg-lastcomments .eg-cmt__news {
  color: #4ade80;
}
[data-theme="dark"] .eg-lastcomments .eg-cmt__news:hover {
  color: #86efac;
}

[data-theme="dark"] .eg-lastcomments .eg-cmt__text {
  color: #9da3ad;
}

[data-theme="dark"] .eg-lastcomments .eg-cmt__link {
  color: #6b7280;
}
[data-theme="dark"] .eg-lastcomments .eg-cmt__link:hover {
  color: #4ade80;
}

[data-theme="dark"] .eg-lastcomments .eg-widget__more {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: rgba(34,197,94,.35);
  box-shadow: 0 2px 10px rgba(34,197,94,.3), 0 0 20px rgba(34,197,94,.1);
  color: #fff;
}
[data-theme="dark"] .eg-lastcomments .eg-widget__more:hover {
  box-shadow: 0 4px 20px rgba(34,197,94,.4), 0 0 30px rgba(34,197,94,.15);
}