/* コミュニティページのスタイル */

.page-header {
  text-align: center;
  margin: 2rem 0;
  padding: 2rem 0;
  border-bottom: 1px solid #ddd;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.page-header p {
  color: #666;
  font-size: 1.1rem;
}

.community-tabs {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  border-bottom: 1px solid #ddd;
}

.tab-btn {
  background: none;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: #f5f5f5;
}

.tab-btn.active {
  border-bottom-color: #dc3545;
  color: #dc3545;
  font-weight: bold;
}

.tab-content {
  display: none;
  padding: 2rem 0;
}

.tab-content.active {
  display: block;
}

/* reviews-section: used when tabs are removed - inherits tab-content active behavior */
.reviews-section {
  display: block;
  padding: 2rem 0;
}

main.container { 
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  max-width: 1200px;
}

.community-section {
  background: #2b2b2b;
  border: 1px solid #191919;
  border-radius: 12px;
  padding: 2rem;
  color: #e6eef2;
}

.community-section h2 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
  border-bottom: 2px solid #dc3545;
  padding-bottom: 0.5rem;
}

.community-sidebar {
  grid-column: 2;
}

.sidebar-box {
  background: #2b2b2b;
  border: 1px solid #191919;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  color: #d8e6eb;
}

.sidebar-box h3 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}

.sidebar-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-box li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.sidebar-box li:last-child {
  border-bottom: none;
}

.sidebar-box a {
  color: #6fb3ff;
  text-decoration: none;
}

.sidebar-box a:hover {
  text-decoration: underline;
}

.placeholder {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
}

.placeholder p {
  color: #6c757d;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.placeholder ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  text-align: left;
}

.placeholder li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
  position: relative;
  padding-left: 2rem;
}

.placeholder li:before {
  content: "💬";
  position: absolute;
  left: 0;
  top: 0.75rem;
}

.placeholder li:last-child {
  border-bottom: none;
}

.btn-placeholder {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.btn-placeholder:hover {
  background: linear-gradient(135deg, #c82333, #a71e2a);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}

/* タブ別アイコン */
.community-tabs .tab-btn:nth-child(1):before { content: "⭐ "; }
.community-tabs .tab-btn:nth-child(2):before { content: "❓ "; }
.community-tabs .tab-btn:nth-child(3):before { content: "📝 "; }

/* レスポンシブ対応 */
@media (max-width: 768px) {
  main.container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .community-sidebar {
    grid-column: 1;
    order: -1;
  }
  
  .community-tabs {
    flex-direction: column;
  }
  
  .tab-btn {
    text-align: center;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
  }
  
  .tab-btn.active {
    border-bottom-color: #dc3545;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .community-section {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .community-section,
  .sidebar-box {
    margin: 0 -0.5rem;
    padding: 1rem;
  }
}

/* 口コミ一覧カード */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* 店铺分组卡片 */
.shop-card {
  background: #2b2b2b;
  border: 1px solid #191919;
  border-radius: 10px;
  padding: 1rem;
}
.shop-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.shop-header .review-shop-img img {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}
.shop-header .review-shop-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.shop-reviews {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.shop-review {
  background: transparent;
  border-radius: 6px;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.02);
}
.shop-review .review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.shop-review .review-meta { color: #9aa6ad; font-size: 0.9rem; margin-top: 0; }
.review-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: #2b2b2b;
  border: 1px solid #191919;
  color: #e6eef2;
}

.review-card.compact {
  /* 当连续同一店铺的后续评论时，稍微缩小间距并增加上边线以区分每条评论 */
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-top: 1px dashed rgba(255,255,255,0.04);
}
.review-left {
  width: 100px;
  flex: 0 0 100px;
}
.review-shop-img img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}
.review-shop-img-placeholder {
  width: 100px;
  height: 80px;
  border-radius: 6px;
  /* 保持空白以维持布局（背景透明） */
  background: transparent;
}
.review-body {
  flex: 1;
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.review-shop-name {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.review-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #f0ad4e;
}
.review-meta {
  color: #9aa6ad;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
.review-comment {
  margin-top: 0.5rem;
}
.review-comment p { margin: 0 0 0.5rem 0; color: #d5e0e6; }
.read-more {
  background: none;
  border: none;
  color: #6fb3ff;
  cursor: pointer;
  padding: 0;
}

@media (max-width: 768px) {
  .review-card { flex-direction: row; }
  .review-left { width: 80px; }
  .review-shop-img img { width: 80px; height: 60px; }
}
