/* Community Page Styles */

/* Post List */
.post-list {
  padding: var(--space-md) var(--space-lg) var(--space-xl);
}

.post-list__item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #F1F5F9;
  cursor: pointer;
}

.post-list__item:last-child {
  border-bottom: none;
}

.post-list__item:active {
  opacity: 0.7;
}

.post-list__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.post-list__body {
  flex: 1;
  min-width: 0;
}

.post-list__header {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 4px;
}

.post-list__title {
  font-size: 15px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 4px;
  line-height: 1.4;
}

.post-list__preview {
  font-size: 13px;
  color: #64748B;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.post-list__footer {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #94A3B8;
}

.post-list__badge {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 4px;
}

.post-list__badge--supply {
  background: #FEF3C7;
  color: #D97706;
}

.post-list__badge--price {
  background: #DBEAFE;
  color: #2563EB;
}

.post-list__badge--tech {
  background: #F3E8FF;
  color: #9333EA;
}

/* Post Detail */
.post-detail {
  padding: 20px;
  background: white;
  min-height: calc(100vh - 56px);
  padding-bottom: 80px;
}

.post-detail__user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.post-detail__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
}

.post-detail__name {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
}

.post-detail__time {
  font-size: 12px;
  color: #94A3B8;
}

.post-detail__title {
  font-size: 20px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 12px;
  line-height: 1.4;
}

.post-detail__content {
  font-size: 15px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 20px;
}

.post-detail__stats {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #F1F5F9;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 16px;
  font-size: 13px;
  color: #64748B;
}

/* Comments */
.comment {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.comment__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.comment__body {
  flex: 1;
}

.comment__header {
  font-size: 12px;
  margin-bottom: 4px;
}

.comment__name {
  font-weight: 600;
  color: #1E293B;
}

.comment__time {
  color: #94A3B8;
  margin-left: 8px;
}

.comment__content {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
}

/* Comment List Component */
.comment-list__item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
}

.comment-list__item--reply {
  margin-left: 36px;
}

.comment-list__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.comment-list__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-list__avatar-letter {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.comment-list__body {
  flex: 1;
  min-width: 0;
}

.comment-list__meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  margin-bottom: 4px;
}

.comment-list__nickname {
  font-weight: 600;
  color: #1E293B;
}

.comment-list__time {
  color: #94A3B8;
}

.comment-list__content {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  word-break: break-word;
}

.comment-list__empty {
  padding: 24px 0;
  text-align: center;
  color: #94A3B8;
  font-size: 13px;
}

/* Reply Input */
.post-detail__reply {
  position: fixed;
  bottom: calc(var(--tab-bar-height) + var(--space-lg) + var(--safe-bottom) + 8px);
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: white;
  border-top: 1px solid #E2E8F0;
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: var(--app-max-width);
  margin: 0 auto;
}

.post-detail__reply input {
  flex: 1;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
}

.post-detail__reply input:focus {
  border-color: var(--primary);
}

.post-detail__reply button {
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.post-detail__reply button:active {
  opacity: 0.8;
}

.post-detail__reply button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Publish Page */
.publish {
  padding: 20px;
}

.publish__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1E293B;
}

.publish__categories {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.publish__category {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid #E2E8F0;
  background: white;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s;
}

.publish__category--active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.publish__input {
  width: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
}

.publish__input:focus {
  border-color: var(--primary);
}

.publish__textarea {
  width: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  resize: none;
  box-sizing: border-box;
  outline: none;
  min-height: 120px;
}

.publish__textarea:focus {
  border-color: var(--primary);
}

.publish__submit {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.publish__submit:active {
  opacity: 0.8;
}

.publish__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Load more */
.post-loadmore {
  text-align: center;
  padding: 16px;
  font-size: 13px;
  color: #94A3B8;
}
