/* ============================================================
   30_feed_social_layout.css — Социальная лента, сторис, сайдбар и форма
   ============================================================ */

/* ── Двухколоночный макет ─────────────────────────────────── */
.astrogram-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
  margin-top: 16px;
}

@media (max-width: 980px) {
  .astrogram-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ── Верхняя плашка сторис / хайлайтов ───────────────────── */
.ag-stories-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 4px 16px;
  margin-bottom: 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.ag-stories-strip::-webkit-scrollbar {
  display: none;
}

.ag-story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  transition: transform 0.2s ease;
}
.ag-story-item:hover {
  transform: translateY(-3px) scale(1.04);
}
.ag-story-item:active {
  transform: scale(0.96);
}

.ag-story-avatar-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, var(--gold, #e2b853), var(--pink, #ec4899), var(--purple, #8b5cf6));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(226, 184, 83, 0.25);
  transition: all 0.3s ease;
}
.ag-story-item.seen .ag-story-avatar-ring {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
  box-shadow: none;
  opacity: 0.8;
}

.ag-story-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-solid, #0b0a12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border: 2px solid var(--bg, #050409);
  transition: transform 0.2s ease;
}
.ag-story-item:hover .ag-story-avatar {
  transform: scale(1.05);
}

.ag-story-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text, #f1f5f9);
  opacity: 0.9;
  max-width: 72px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

/* ── Форма создания поста ─────────────────────────────────── */
.ag-create-post-card {
  background: var(--card, rgba(15, 13, 25, 0.85));
  border: 1px solid rgba(226, 184, 83, 0.22);
  border-radius: 24px;
  padding: 20px 22px;
  margin-bottom: 24px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.ag-create-post-card:focus-within {
  border-color: rgba(226, 184, 83, 0.55);
  box-shadow: 0 16px 44px rgba(226, 184, 83, 0.15);
}

.ag-create-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ag-create-author-ava {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(226, 184, 83, 0.3));
  border: 1.5px solid var(--gold, #e2b853);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.ag-create-author-meta {
  flex: 1;
}
.ag-create-author-name {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text, #fff);
  line-height: 1.2;
}
.ag-create-author-sub {
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
}

.ag-post-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text, #fff);
  font-family: var(--font, inherit);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 80px;
  transition: all 0.25s ease;
}
.ag-post-textarea:focus {
  outline: none;
  border-color: var(--purple, #8b5cf6);
  background: rgba(139, 92, 246, 0.06);
}
.ag-post-textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* Выбор тегов */
.ag-tags-section {
  margin: 14px 0 12px;
}
.ag-tags-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold, #e2b853);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ag-tags-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.ag-tag-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.ag-tag-chip:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  transform: translateY(-1px);
}
.ag-tag-chip.active {
  background: linear-gradient(135deg, rgba(226, 184, 83, 0.25), rgba(139, 92, 246, 0.25));
  border-color: var(--gold, #e2b853);
  color: var(--gold, #e2b853);
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(226, 184, 83, 0.2);
}

/* Действия формы */
.ag-create-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.ag-create-category-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text, #fff);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font, inherit);
  cursor: pointer;
  outline: none;
}
.ag-create-category-select option {
  background: #110e20;
  color: #fff;
}

.ag-btn-publish {
  background: linear-gradient(135deg, var(--gold, #e2b853) 0%, #ec4899 50%, var(--purple, #8b5cf6) 100%);
  background-size: 200% auto;
  color: #0a0818;
  font-weight: 900;
  font-size: 0.85rem;
  border: none;
  border-radius: 14px;
  padding: 10px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(226, 184, 83, 0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
  font-family: var(--font, inherit);
}
.ag-btn-publish:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(226, 184, 83, 0.5);
  background-position: right center;
}
.ag-btn-publish:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Фильтры ленты ────────────────────────────────────────── */
.ag-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  margin-bottom: 18px;
  scrollbar-width: none;
}
.ag-filter-bar::-webkit-scrollbar {
  display: none;
}

.ag-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted, #94a3b8);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: var(--font, inherit);
}
.ag-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.ag-filter-btn.active {
  background: linear-gradient(135deg, var(--gold, #e2b853), #f59e0b);
  color: #0a0818;
  border-color: var(--gold, #e2b853);
  box-shadow: 0 4px 14px rgba(226, 184, 83, 0.35);
}

/* ── Авторская плашка в карточке поста ────────────────────── */
.ag-card-author-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ag-card-author-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ag-card-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(226, 184, 83, 0.25));
  border: 1.5px solid rgba(226, 184, 83, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.ag-card-author-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.ag-card-author-role {
  font-size: 0.7rem;
  color: var(--gold, #e2b853);
  font-weight: 600;
}
.ag-card-date {
  font-size: 0.72rem;
  color: var(--muted, rgba(255, 255, 255, 0.4));
}

.ag-card-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  margin-bottom: 12px;
}
.ag-card-tag-item {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gold, #e2b853);
  background: rgba(226, 184, 83, 0.08);
  border: 1px solid rgba(226, 184, 83, 0.2);
  border-radius: 10px;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ag-card-tag-item:hover {
  background: rgba(226, 184, 83, 0.2);
  border-color: var(--gold, #e2b853);
}

/* ── Сайдбар ──────────────────────────────────────────────── */
.ag-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 90px;
}

.ag-sidebar-widget {
  background: var(--card, rgba(15, 13, 25, 0.85));
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ag-sidebar-widget-title {
  font-size: 0.98rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}

.ag-popular-tags-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ag-popular-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.ag-popular-tag-row:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateX(4px);
}
.ag-popular-tag-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold, #e2b853);
}
.ag-popular-tag-count {
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 8px;
}

/* Карточки экспертов в сайдбаре */
.ag-master-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ag-master-item:last-child {
  border-bottom: none;
}
.ag-master-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ag-master-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(226, 184, 83, 0.15);
  border: 1px solid rgba(226, 184, 83, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.ag-master-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.ag-master-role {
  font-size: 0.68rem;
  color: var(--gold, #e2b853);
  font-weight: 700;
}
.ag-master-chat-btn {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c084fc;
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ag-master-chat-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  color: #fff;
  transform: scale(1.05);
}

/* Виджет лунного компаса */
.ag-compass-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-color: rgba(56, 189, 248, 0.25);
}
.ag-compass-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin-bottom: 12px;
}
.ag-compass-btn {
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  color: #061120;
  font-weight: 900;
  font-size: 0.8rem;
  border: none;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: transform 0.2s ease;
}
.ag-compass-btn:hover {
  transform: translateY(-2px);
}
