/*
 * product-comments.css
 * 商品ページのコメント欄。色は product.html の :root（--panel など）に合わせる。
 */

.pc-comments {
  max-width: 1100px;
  margin: 48px auto 0;
  padding: 0 20px 8px;
}

.pc-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.pc-head h2 {
  font-size: 1.2rem;
  margin: 0;
}

.pc-count {
  color: var(--muted, #a3a7b5);
  font-size: .85rem;
}

.pc-lead {
  color: var(--muted, #a3a7b5);
  font-size: .85rem;
  margin: 0 0 16px;
}

/* 投稿フォーム */
.pc-form,
.pc-signin {
  background: var(--panel, #12141b);
  border: 1px solid var(--line, rgba(255, 255, 255, .08));
  border-radius: 14px;
  padding: 14px;
}

.pc-form textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 84px;
  resize: vertical;
  background: var(--bg, #0a0b10);
  color: var(--fg, #e7e8ee);
  border: 1px solid var(--line, rgba(255, 255, 255, .08));
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: .92rem;
  line-height: 1.7;
}

.pc-form textarea:focus {
  outline: none;
  border-color: var(--accent, #d4af37);
}

.pc-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.pc-counter {
  color: #6d7280;
  font-size: .78rem;
}

.pc-submit {
  background: var(--accent, #d4af37);
  color: #10131a;
  border: none;
  border-radius: 999px;
  padding: 9px 24px;
  font-weight: 800;
  font-size: .88rem;
  cursor: pointer;
}

.pc-submit:disabled {
  opacity: .55;
  cursor: default;
}

.pc-signin {
  color: var(--muted, #a3a7b5);
  font-size: .9rem;
}

.pc-signin a {
  color: var(--accent, #d4af37);
  font-weight: 700;
}

.pc-error {
  color: #ff6b7a;
  font-size: .85rem;
  margin-top: 10px;
}

/* 投稿一覧 */
.pc-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pc-item {
  display: flex;
  gap: 12px;
  background: var(--panel, #12141b);
  border: 1px solid var(--line, rgba(255, 255, 255, .08));
  border-radius: 14px;
  padding: 12px 14px;
}

.pc-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .9rem;
  color: #10131a;
}

.pc-main {
  flex: 1;
  min-width: 0;
}

.pc-item-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.pc-name {
  font-weight: 700;
  font-size: .9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-time {
  color: #6d7280;
  font-size: .75rem;
  flex: 0 0 auto;
}

.pc-delete {
  margin-left: auto;
  flex: 0 0 auto;
  background: none;
  border: none;
  color: #6d7280;
  font-size: .75rem;
  padding: 2px 4px;
  cursor: pointer;
}

.pc-delete:hover {
  color: #ff6b7a;
}

/* 投稿文。改行はそのまま出すが、HTML としては解釈しない */
.pc-body {
  margin: 6px 0 0;
  font-size: .92rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.pc-empty,
.pc-loading {
  color: var(--muted, #a3a7b5);
  font-size: .9rem;
  padding: 4px 2px;
}

/* スマホでは商品の本体部分と左右をそろえる（.wrap が 16px 持っている） */
@media (max-width: 768px) {
  .pc-comments {
    margin-top: 36px;
    padding-left: 0;
    padding-right: 0;
  }

  .pc-avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: .8rem;
  }
}
