/* PC用閲覧履歴カルーセル基本スタイル */
.history-carousel-section-pc {
  background: transparent; /* 背景色を透明に変更 */
  padding: 20px;
  margin: 30px auto;
  max-width: 1200px;
  border-radius: 8px;
  box-shadow: none; /* シャドウも削除 */
}

.history-carousel-container-pc {
  width: 100%;
}

/* ヘッダー部分 */
.history-carousel-header-pc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.history-carousel-title-pc {
  font-size: 18px;
  font-weight: bold;
  margin: 0;
  color: #333;
}

/* 履歴削除ボタン */
.clear-history-pc {
  font-size: 14px;
  color: #666;
  background: #e9ecef;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: bold;
}

.clear-history-pc:hover {
  background: #dee2e6;
  color: #495057;
}

.clear-history-pc:active {
  transform: translateY(1px);
}

/* カルーセルラッパー */
.history-carousel-wrapper-pc {
  position: relative;
  width: 100%;
}

/* 履歴アイテムを横に並べるコンテナ（PC版は6件表示） */
.history-carousel-items-pc {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefoxのスクロールバー非表示 */
  padding-bottom: 10px;
  gap: 15px;
  cursor: grab; /* ドラッグ可能であることを示すカーソル */
  user-select: none; /* テキスト選択を無効化 */
}

.history-carousel-items-pc:active {
  cursor: grabbing; /* ドラッグ中のカーソル */
}

/* スクロールバー非表示（Chrome, Safari） */
.history-carousel-items-pc::-webkit-scrollbar {
  display: none;
}

/* 履歴アイテム - PC版は6件表示（16.66%ずつ） */
.history-carousel-items-pc .history-item {
  flex: 0 0 calc(16.66% - 12px); /* 6件表示、ガップを考慮 */
  scroll-snap-align: start;
  box-sizing: border-box;
  height: 250px; /* 200px → 250px に増加 */
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* 空のアイテム（固定幅スクロール用） */
.history-carousel-items-pc .history-item-empty {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.history-carousel-items-pc .history-item-empty:hover {
  transform: none;
  box-shadow: none;
}

.history-carousel-items-pc .history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.history-carousel-items-pc .history-item a {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* 画像コンテナ */
.history-carousel-items-pc .history-item-image-container {
  width: 100%;
  height: 180px; /* 140px → 180px に増加 */
  overflow: hidden;
  position: relative;
}

.history-carousel-items-pc .history-item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.3s;
}

.history-carousel-items-pc .history-item:hover .history-item-image {
  transform: scale(1.05);
}

.history-carousel-items-pc .history-item-image.no-image {
  object-fit: contain;
  background-color: #f8f9fa;
}

/* テキスト情報 */
.history-carousel-items-pc .history-item-content {
  padding: 4px 12px 12px 12px; /* 上パディングを12px → 4px に減少（1/3） */
  height: 70px; /* 60px → 70px に増加 */
  overflow: hidden;
}

.history-carousel-items-pc .history-item-name {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 2px; /* 4px → 2px に半減 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333;
}

.history-carousel-items-pc .history-item-stats {
  font-size: 11px;
  color: #666;
  margin-bottom: 1px; /* 2px → 1px に半減 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-carousel-items-pc .history-item-date {
  font-size: 10px;
  color: #999;
}

/* ページネーションドット */
.history-carousel-pagination-pc {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  gap: 8px;
}

.history-carousel-pagination-pc .pagination-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dee2e6;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.history-carousel-pagination-pc .pagination-dot:hover {
  transform: scale(1.1);
}

.history-carousel-pagination-pc .pagination-dot.active {
  background: #495057;
}

/* 履歴がない場合のメッセージ */
.history-carousel-items-pc .history-empty {
  width: 100%;
  text-align: center;
  padding: 40px 0;
  color: #6c757d;
  font-size: 16px;
  background: #fff;
  border-radius: 8px;
}

/* スケルトンローディング */
.history-carousel-items-pc .history-item-skeleton {
  flex: 0 0 calc(16.66% - 12px);
  height: 250px; /* 200px → 250px に増加 */
  background: #f8f9fa;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.history-carousel-items-pc .history-item-skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* レスポンシブ対応 */
@media screen and (max-width: 1200px) {
  .history-carousel-items-pc .history-item,
  .history-carousel-items-pc .history-item-skeleton {
    flex: 0 0 calc(20% - 12px); /* 5件表示 */
  }
}

@media screen and (max-width: 992px) {
  .history-carousel-items-pc .history-item,
  .history-carousel-items-pc .history-item-skeleton {
    flex: 0 0 calc(25% - 12px); /* 4件表示 */
  }
}

@media screen and (max-width: 768px) {
  .history-carousel-section-pc {
    padding: 15px;
    margin: 20px auto;
  }
  
  .history-carousel-items-pc .history-item,
  .history-carousel-items-pc .history-item-skeleton {
    flex: 0 0 calc(33.33% - 10px); /* 3件表示 */
  }
  
  .history-carousel-items-pc .history-item {
    height: 180px;
  }
  
  .history-carousel-items-pc .history-item-image-container {
    height: 120px;
  }
} 