/* order-history-card.css */
/* 注文履歴カード（マイページトップ・購入履歴ページ共通） */

.order-history-card {
  display: flex;
  gap: 1em;
  padding: 1em;
  background: #fff;
  border: 1px solid var(--color-border-light, #e5e7eb);
  border-radius: 8px;
}

.order-history-card-thumbnail {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--color-bg-gray, #f5f5f5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-history-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-history-card-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-gray, #999);
  font-size: 1.5em;
}

.order-history-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.order-history-card-name {
  font-size: 1rem;
  font-weight: bold;
}

.order-history-card-name a {
  color: var(--color-text-dark, #333);
  text-decoration: none !important;
}

.order-history-card-name a:hover {
  color: var(--fanika-primary, #ec4899);
  text-decoration: none !important;
}

.order-history-card-creator {
  font-size: 0.85rem;
  color: var(--color-text-gray, #666);
}

.order-history-card-creator a {
  color: var(--fanika-primary, #ec4899);
  text-decoration: none !important;
}

.order-history-card-creator a:hover {
  text-decoration: underline !important;
  color: var(--fanika-primary-600, #db2777);
}

.order-history-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  font-size: 0.85rem;
  color: var(--color-text-gray, #666);
}

/* アクション行：商品ページを見る・ダウンロードを同じ行に並べる。カード高さを不自然に増やさない。 */
.order-history-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5em 1.25em;
}

.order-history-card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--fanika-primary, #ec4899);
  text-decoration: none !important;
  font-weight: bold;
  font-size: 0.9rem;
}

.order-history-card-action:hover {
  text-decoration: underline !important;
}

/* ダウンロードを主操作寄りに：小さな塗りボタン風にして視認性を上げる */
.order-history-card-action-download {
  background: var(--fanika-primary, #ec4899);
  color: #fff !important;
  padding: 0.4em 0.9em;
  border-radius: 9999px;
  font-size: 0.85rem;
}

.order-history-card-action-download:hover {
  background: var(--fanika-primary-600, #db2777);
  text-decoration: none !important;
}

@media (max-width: 768px) {
  .order-history-card {
    flex-direction: column;
    padding: 0.75em;
  }

  .order-history-card-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .order-history-card-meta {
    flex-direction: column;
    gap: 0.25em;
    font-size: 0.75rem;
  }

  .order-history-card-name {
    font-size: 0.85rem;
  }

  .order-history-card-actions {
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.8rem;
  }
}
