/* 宠医 CHONGYI — 社区动态。
   只在 /feed 加载（pages/feed.blade.php 走 @push('styles')），
   类名一律 feed- 前缀，不覆盖 web.css 的任何既有类，其它页面不受影响。
   尺寸、圆角、配色全部沿用 :root 的设计变量，保证与站内同一套视觉。 */

/* ------------------------------------------------------------------ 布局 */

/* 左右两栏：左边是发布框与时间线，右边是规则提醒。1.45:1 让正文更好读。 */
.feed-layout { align-items: start; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.feed-main,
.feed-rail { display: grid; gap: 17px; min-width: 0; }
.feed-rail { align-content: start; }
.feed-total { font-size: 11px; color: var(--sub); letter-spacing: .04em; }

/* ------------------------------------------------------------------ 发布框 */

.feed-composer { display: grid; gap: 12px; }
.feed-composer .feed-who { display: flex; align-items: center; gap: 12px; }
.feed-who { min-width: 0; }
.feed-who b { display: block; font-size: 13px; }
.feed-who small { display: block; color: var(--sub); font-size: 11px; }
.feed-textarea { resize: vertical; min-height: 78px; line-height: 1.75; font-size: 13px; }

.feed-composer-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

/* web.css 里 .btn 带 margin-left:auto，会把整排按钮推到右边；
   这里收回，只让「发布」靠右。 */
.feed-composer-foot .btn { margin-left: 0; }
.feed-composer-foot .btn.primary { margin-left: auto; }
.feed-pick { cursor: pointer; }

.feed-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.feed-preview {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--solid);
}
.feed-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feed-preview-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(21, 62, 52, .72);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

/* ------------------------------------------------------------------ 时间线 */

.feed-list { display: grid; }
.feed-post {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.feed-post:first-child { padding-top: 4px; }
.feed-post:last-child { border-bottom: 0; padding-bottom: 2px; }

.feed-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.feed-head .avatar {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  font-size: 14px;
  flex: 0 0 auto;
}
.feed-head .feed-who { flex: 1; min-width: 0; }
.feed-flag {
  flex: 0 0 auto;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f9f1e2;
  color: #8d6132;
  letter-spacing: .04em;
}
.feed-del { flex: 0 0 auto; }

.feed-body {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink);
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ 配图 */

.feed-shots { display: grid; gap: 8px; margin-top: 12px; }
.feed-shots-n1 { grid-template-columns: 1fr; }
.feed-shots-n2,
.feed-shots-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feed-shots-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.feed-shot {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--solid);
}
.feed-shot img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.feed-shot:hover img { transform: scale(1.03); }

/* 单图不裁成 4:3：竖图会变成一个巨大的方块，这里保留原比例只限高。 */
.feed-shots-n1 .feed-shot img { aspect-ratio: auto; max-height: 460px; }

/* ------------------------------------------------------------------ 操作条 */

.feed-acts { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.feed-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.feed-act:hover { background: var(--mint); color: var(--darkpine); }
.feed-act:active { transform: scale(.96); }
.feed-act-icon { font-size: 14px; line-height: 1; }

/* 已赞：走 btn.warn / notice.rose 那套暖色，不引入新色系 */
.feed-act[aria-pressed="true"] { background: #f9ece6; color: #923d35; }
.feed-act[aria-pressed="true"] .feed-act-icon { color: #b4553d; }

/* ------------------------------------------------------------------ 评论 */

.feed-cmt {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--mint);
  display: grid;
  gap: 12px;
}
.feed-cmt-list { display: grid; gap: 11px; }
.feed-cmt-item { display: flex; align-items: flex-start; gap: 9px; }
.feed-avatar-xs {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  font-size: 10px;
  flex: 0 0 auto;
}
.feed-cmt-main { display: block; min-width: 0; }
.feed-cmt-main b { display: block; font-size: 12px; }
.feed-cmt-text {
  display: block;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.feed-cmt-main small { display: block; margin-top: 2px; font-size: 10px; color: var(--sub); }

.feed-cmt-form { display: flex; align-items: center; gap: 8px; }
.feed-cmt-form .input { flex: 1; min-width: 0; padding: 9px 12px; font-size: 12px; }
.feed-cmt-form .btn { margin-left: 0; flex: 0 0 auto; }

/* HTML 的 hidden 属性只是 UA 样式（display:none），
   本文件给 .feed-cmt / .feed-more / .feed-previews 设了 display，
   特异性更高会把 hidden 顶掉 —— 必须显式补一条，否则评论区永远展开。 */
.feed-cmt[hidden],
.feed-more[hidden],
.feed-previews[hidden],
.feed-empty[hidden] { display: none; }

/* ------------------------------------------------------------------ 空态与分页 */

.feed-empty { margin-top: 8px; }
.feed-more { display: flex; justify-content: center; padding-top: 16px; }
.feed-more .btn { margin-left: 0; }

/* ------------------------------------------------------------------ 右栏 */

.feed-rule { border-top: 1px solid var(--line); padding: 13px 0; }
.panelhead + .feed-rule { border-top: 0; padding-top: 0; }
.feed-rule:last-child { padding-bottom: 0; }
.feed-rule b { display: block; font-size: 12.5px; }
.feed-rule small { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.7; color: var(--sub); }

/* ------------------------------------------------------------------ 治理检索 */

.feed-search-form { display: grid; gap: 8px; }
.feed-search-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.feed-search-row .input { flex: 1 1 150px; min-width: 120px; padding: 9px 12px; font-size: 12px; }
.feed-search-row .btn { margin-left: 0; flex: 0 0 auto; }
.feed-search-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--sub);
  flex: 0 0 auto;
}
.feed-search-date .input { flex: 0 0 auto; width: 142px; }
.feed-search-hint { margin: 10px 0 0; }

/* ------------------------------------------------------------------ 正文与作者 */

/* 正文整块是详情页的入口：保持阅读样式，不显示下划线，只在悬停时给一点暗示 */
.feed-body {
  display: block;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink);
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: color .2s;
}
a.feed-body:hover { color: var(--pine); }

.feed-who a { color: inherit; text-decoration: none; }
.feed-who a:hover { color: var(--pine); }

.feed-avatar-lg {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 18px;
  flex: 0 0 auto;
}

.feed-author { display: flex; align-items: center; gap: 12px; }
.feed-author b { display: block; font-size: 14px; }
.feed-author small { display: block; color: var(--sub); font-size: 11px; }
.feed-author-go { margin-top: 14px; width: 100%; }

.feed-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.feed-stats > div { min-width: 0; }
.feed-stats small { display: block; font-size: 10px; color: var(--sub); letter-spacing: .06em; }
.feed-stats b { display: block; font-size: 13px; margin-top: 2px; }

/* ------------------------------------------------------------------ 公开宠物 */

.feed-pet {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.feed-pet:last-of-type { border-bottom: 0; }
.feed-pet-photo,
.feed-pet-glyph {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid var(--line);
}
.feed-pet-glyph {
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--darkpine);
  font-size: 18px;
}
.feed-pet-main { min-width: 0; }
.feed-pet-main b { display: block; font-size: 13px; }
.feed-pet-main small { display: block; font-size: 11px; color: var(--sub); }
.feed-pet + .notice { margin-top: 14px; }

/* ------------------------------------------------------------------ 上传进度 */

.feed-preview .feed-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(21, 62, 52, .35);
}
.feed-preview .feed-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: #09CEB3;
  transition: width .18s linear;
}
.feed-preview.is-uploading img { opacity: .5; }
.feed-preview.is-failed { border-color: #d08b7f; }
.feed-preview.is-failed .feed-bar > i { background: #b4553d; }
.feed-preview-pct {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(21, 62, 52, .78);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
}
.feed-preview.is-done .feed-preview-pct { display: none; }

/* ------------------------------------------------------------------ 主页上的公开信息 */

/* 四块公开内容（领养 / 走失 / 寄养 / 互助）挂在动态流下方，横向铺满，
   与上方两栏形成节奏变化；每条右侧是「复制」，用于转发到群里。 */
.feed-open-wrap {
  display: grid;
  gap: 12px;
  margin-top: 17px;
}
.feed-open-head { margin: 2px 0 0; }
.feed-open-head h2 { font-size: 17px; }

.feed-open-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.feed-open-item:last-of-type { border-bottom: 0; }
.feed-open-main { flex: 1; min-width: 0; }
.feed-open-main b { display: block; font-size: 13px; }
.feed-open-main small { display: block; font-size: 11px; color: var(--sub); }
.feed-open-note { margin-top: 2px; line-height: 1.65; }
.feed-open-item .btn { margin-left: 0; flex: 0 0 auto; }
.feed-open-more { margin-top: 12px; width: 100%; }

/* ------------------------------------------------------------------ 骨架屏 */

.feed-skeleton { display: grid; gap: 10px; padding: 12px 0 4px; }
.feed-skeleton .skeleton { height: 88px; border-radius: 18px; }
.feed-skeleton[hidden] { display: none; }

/* ------------------------------------------------------------------ 静态操作位 */

/* 详情页的评论数不是按钮，去掉 hover 与手型 */
.feed-act.is-static { cursor: default; }
.feed-act.is-static:hover { background: transparent; color: var(--sub); }

.feed-cmt-none { margin: 0; }

/* ------------------------------------------------------------------ 窄屏 */

/* .grid2 在 web.css 的窄屏媒体查询里会塌成 1 列，
   但本文件的 .feed-layout 写在后面，会盖掉那条规则，所以这里必须显式再塌一次。 */
@media (max-width: 700px) {
  .feed-layout { grid-template-columns: 1fr; }
  .feed-post { padding: 15px 0; }
  .feed-acts { gap: 2px; }
  .feed-shots-n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed-composer-foot .btn.primary { margin-left: 0; width: 100%; }
  .feed-total { display: inline-block; margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .feed-shot img,
  .feed-act { transition: none; }
  .feed-shot:hover img { transform: none; }
}
