/* Mendflow — лента. Токены (:root, кнопки) остаются в /style.css */

/* ── Social posts ── */
[data-theme="dark"] .social-post {
  background: #1a1625;
  border-color: var(--border);
}

[data-theme="dark"] .social-post-name {
  color: var(--ink);
}

[data-theme="dark"] .social-post-content p {
  color: var(--ink);
}

[data-theme="dark"] .del-btn {
  background: #231c3a;
  border-color: var(--border);
  color: var(--ink-muted);
}

[data-theme="dark"] .del-btn:hover {
  background: #3a1520;
  color: #fb7185;
}

/* ── Filter input ── */
[data-theme="dark"] .filter-input {
  background: #1a1625;
  border-color: var(--border);
  color: var(--ink);
}

/* ── Feed search shell ── */
[data-theme="dark"] .feed-search-shell {
  background: #1a1625;
}

[data-theme="dark"] .feed-filter-popover {
  background: #1a1625;
  border-color: var(--border);
}

/* ── Feed rail panels (shared) ───────────────────────────────── */
.feed-rail-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  border: 1.5px solid rgba(124, 58, 237, 0.24) !important;
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 12px 36px rgba(124, 58, 237, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset !important;
  isolation: isolate;
}

.feed-rail-glow {
  position: absolute;
  top: -36px;
  right: -24px;
  width: 130px;
  height: 110px;
  border-radius: 50%;
  pointer-events: none;
}

.feed-rail-glow--events {
  background: radial-gradient(circle, rgba(249, 115, 22, 0.22), transparent 70%);
}

.feed-rail-glow--friends {
  background: radial-gradient(circle, rgba(236, 72, 153, 0.2), transparent 70%);
}

.feed-rail-head {
  position: relative;
  z-index: 1;
  margin: 0;
}

.feed-rail-kicker {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0891b2;
  margin-bottom: 4px;
}

.feed-rail-title {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.25;
  background: linear-gradient(135deg, #4c1d95, #7c3aed 50%, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.events-rail-panel .feed-rail-kicker {
  color: #ea580c;
}

.friends-rail-panel .feed-rail-kicker {
  color: #db2777;
}

.friends-rail-panel .feed-rail-title {
  background: linear-gradient(135deg, #831843, #db2777 45%, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
}

.feed-rail-loading {
  padding: 12px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #9ca3af);
  text-align: center;
}

.feed-rail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px 4px;
  gap: 6px;
}

.feed-rail-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(124, 58, 237, 0.08);
  border: 1px dashed rgba(124, 58, 237, 0.2);
  margin-bottom: 2px;
}

.feed-rail-empty-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text, #111827);
  line-height: 1.35;
}

.feed-rail-empty-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted, #9ca3af);
  max-width: 240px;
}

.feed-rail-cta {
  position: relative;
  z-index: 1;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
  font-weight: 800 !important;
  border: 1.5px solid rgba(124, 58, 237, 0.22) !important;
  background: rgba(124, 58, 237, 0.06) !important;
  color: #5b21b6 !important;
  border-radius: 14px !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.feed-rail-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.35) !important;
  background: rgba(124, 58, 237, 0.1) !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.12);
}

.feed-rail-cta-icon {
  display: inline-flex;
  line-height: 0;
}

/* Events rail items */
.event-rail-list,
.friends-rail-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-rail-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(124, 58, 237, 0.14);
  background: rgba(255, 255, 255, 0.85);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.event-rail-item:hover {
  transform: translateX(2px);
  border-color: rgba(249, 115, 22, 0.35);
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.12);
}

.event-rail-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #f97316, #7c3aed);
  opacity: 0.75;
}

.event-rail-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(124, 58, 237, 0.1));
  border: 1px solid rgba(249, 115, 22, 0.2);
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.1);
}

.event-rail-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.event-rail-name {
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text, #111827);
}

.event-rail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  line-height: 1.35;
}

.event-rail-meta--sub {
  font-weight: 500;
  color: var(--text-muted, #9ca3af);
}

.event-rail-format {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
}

.event-rail-meta-pill {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  color: #c2410c;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

/* Friends rail rows */
.friend-rail-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(124, 58, 237, 0.14);
  background: rgba(255, 255, 255, 0.85);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.friend-rail-row:hover {
  transform: translateX(2px);
  border-color: rgba(219, 39, 119, 0.28);
  box-shadow: 0 4px 16px rgba(219, 39, 119, 0.1);
}

.friend-rail-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #ec4899, #7c3aed);
  opacity: 0.75;
}

.friend-rail-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #6366f1 55%, #22d3ee);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.friend-rail-avatar--b {
  background: linear-gradient(135deg, #6366f1, #818cf8);
}

.friend-rail-avatar--c {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
}

.friend-rail-avatar--d {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.friend-rail-avatar.has-photo {
  font-size: 0;
}

.friend-rail-avatar.has-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.friend-rail-body {
  min-width: 0;
  flex: 1;
}

.friend-rail-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text, #111827);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-rail-reason {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  color: #7c3aed;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-rail-add {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 11px;
  border: 1.5px solid rgba(124, 58, 237, 0.22);
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.friend-rail-add:hover {
  transform: scale(1.06);
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.friend-rail-add.is-sent {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #15803d;
  font-size: 14px;
}

[data-theme="dark"] .feed-rail-panel {
  background: linear-gradient(180deg, rgba(32, 28, 44, 0.99), rgba(22, 18, 34, 0.97)) !important;
  border-color: rgba(167, 139, 250, 0.3) !important;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.25),
    0 20px 48px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .feed-rail-empty-title,
[data-theme="dark"] .event-rail-name,
[data-theme="dark"] .friend-rail-name {
  color: #f5f1ff;
}

[data-theme="dark"] .event-rail-item,
[data-theme="dark"] .friend-rail-row {
  background: rgba(26, 22, 37, 0.88);
  border-color: rgba(167, 139, 250, 0.16);
}

[data-theme="dark"] .feed-rail-cta {
  background: rgba(124, 58, 237, 0.14) !important;
  border-color: rgba(167, 139, 250, 0.28) !important;
  color: #c4b5fd !important;
}

[data-theme="dark"] .friend-rail-reason {
  color: #a78bfa;
}


/* ── Feed article mini-card ─────────────────────────────────── */
.feed-article-card {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.feed-article-card-glow {
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(34, 211, 238, 0.2));
  opacity: 0.45;
  filter: blur(8px);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.feed-article-card-inner {
  position: relative;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 240, 255, 0.92));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.65) inset,
    0 12px 36px rgba(124, 58, 237, 0.12);
  backdrop-filter: blur(12px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feed-article-card:hover .feed-article-card-inner {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.42);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75) inset,
    0 18px 44px rgba(124, 58, 237, 0.18),
    0 0 28px rgba(34, 211, 238, 0.08);
}

.feed-article-card:hover .feed-article-card-glow {
  opacity: 0.75;
}

.feed-article-card-cover {
  position: relative;
  min-height: 132px;
  background: linear-gradient(145deg, #7c3aed 0%, #4f46e5 45%, #22d3ee 100%);
  background-size: cover;
  background-position: center;
}

.feed-article-card-cover.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 10, 30, 0.05), rgba(15, 10, 30, 0.45));
}

.feed-article-card-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5f1ff;
  background: rgba(15, 10, 30, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.feed-article-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.feed-article-card-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: #1e1033;
  letter-spacing: -0.02em;
}

.feed-article-card-preview {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted, #6b7280);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-article-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.feed-article-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #5b21b6;
}

.feed-article-card-cta {
  font-size: 12px;
  font-weight: 800;
  color: #7c3aed;
  letter-spacing: 0.02em;
}

@media (max-width: 560px) {
  .feed-article-card-inner {
    grid-template-columns: 1fr;
  }

  .feed-article-card-cover {
    min-height: 120px;
  }
}

[data-theme="dark"] .feed-article-card-inner {
  background: linear-gradient(135deg, rgba(26, 22, 37, 0.96), rgba(20, 16, 32, 0.92));
  border-color: rgba(167, 139, 250, 0.24);
}

[data-theme="dark"] .feed-article-card-title {
  color: #f5f1ff;
}

[data-theme="dark"] .feed-article-card-meta {
  color: #c4b5fd;
}

[data-theme="dark"] .feed-article-card-cta {
  color: #a78bfa;
}

