@charset "UTF-8";
/* ============================================================
   download.css
   - ダウンロード履歴用スタイル
   - サムネイル付き履歴カード（.fs-hist__*）
   - シンプル行レイアウト履歴（.fs-history__*）
   - 共通ダウンロードボタン（.fs-dl__btn）
   ============================================================ */

/* ------------------------------------------------------------
 * 共通：ダウンロードボタン
 * --------------------------------------------------------- */
.fs-dl__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
}

/* ------------------------------------------------------------
 * 見出し
 * --------------------------------------------------------- */
.fs-hist__hd {
  font-size: var(--size-md);
  font-weight: 700;
  margin: 1rem 0 0.6rem;
}

/* ------------------------------------------------------------
 * カードレイアウト（fs-hist__*）
 * --------------------------------------------------------- */

/* リスト全体 */
.fs-hist__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* カードレイアウト用グリッド */
.fs-hist__list--cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* 1件分のカード共通 */
.fs-hist__item {
  margin: 0;
  padding: 0;
}

.fs-hist__item--card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg, #ffffff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
  overflow: hidden;
}

/* サムネイル枠・プレースホルダ */
.fs-hist__thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f4f4f6;
}

.fs-hist__ph {
  display: block;
  width: 100%;
  height: 100%;
  background: #f4f4f6;
}

/* サムネイル画像 */
.fs-hist__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 音源用の再生アイコン */
.fs-hist__audio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2.4rem;
  background: #111111;
  color: #ffffff;
}

/* 本文部分 */
.fs-hist__body {
  padding: 10px 12px 12px;
}

/* 種別ラベル（画像 / 動画 / 音楽） */
.fs-hist__head {
  margin-bottom: 4px;
}

.fs-hist__type {
  display: inline-flex;
  align-items: center;
  font-size: var(--size-xxs);
  line-height: 1;
}

/* タイトルリンク */
.fs-hist__title {
  display: block;
  font-size: var(--size-sm);
  font-weight: bold;
  line-height: 1.5;
  color: var(--color-text, #222222);
  text-decoration: none;
  margin-top:0.4em;
}

.fs-hist__title:hover {
  text-decoration: underline;
}

/* メタ情報（バッジ＋日時） */
.fs-hist__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-muted, #666666);
}

/* MIME / variant バッジ */
.fs-hist__badge {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 999px;
  background: #ffffff;
}

/* 日時 */
.fs-hist__time {
  font-size: 12px;
  color: var(--color-muted, #666666);
}

/* 0件時のカード */
.fs-hist__item--empty {
  padding: 10px 12px;
  background: var(--color-bg, #ffffff);
  border: 1px dashed var(--color-border, #e5e7eb);
  border-radius: 8px;
}

.fs-hist__empty-msg {
  margin: 0;
  font-size: 13px;
  color: var(--color-muted, #666666);
}

/* ------------------------------------------------------------
 * シンプル行レイアウト履歴（テキストのみで使う場合の汎用クラス）
 * --------------------------------------------------------- */

.fs-history {
  margin-bottom: 4rem;
}

.fs-history__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 1行（=1レコード） */
.fs-history__item {
  display: flex;
  flex-direction: column; /* モバイルは縦積み */
  row-gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border, #eeeeee);
}

/* タイトル */
.fs-history__title {
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text, #222222);
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* バッジ（MIME / variant） */
.fs-history__badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid var(--color-border, #dddddd);
  border-radius: 9999px;
  background: #ffffff;
  vertical-align: middle;
  margin-right: 6px;
}

/* 日時 */
.fs-history__time {
  font-size: 12px;
  color: var(--color-muted, #666666);
  white-space: nowrap;
}

/* ------------------------------------------------------------
 * ページャ（fs-hist / fs-history 共通）
 * --------------------------------------------------------- */

.fs-history__pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
}

.fs-history__page {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--color-border, #dddddd);
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-text, #222222);
  text-decoration: none;
}

.fs-history__page--current {
  font-weight: 700;
  background: var(--grad-primary, #5a2bcf);
  color: #ffffff;
  border-color: var(--grad-primary, #5a2bcf);
}

/* ------------------------------------------------------------
 * アイコン付き種別ラベル
 * --------------------------------------------------------- */

.fs-hist__head--type {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width:fit-content;
  background: #eef1f7;
  padding:0.4rem 1rem;
  border-radius:999px;
}

.fs-hist__type-icon {
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  background: currentColor;
  -webkit-mask: no-repeat center / contain;
  mask: no-repeat center / contain;
}

/* 画像 */
.fs-hist__type-icon--image {
  -webkit-mask-image: url("/assets/img/common/icon-image.svg");
  mask-image: url("/assets/img/common/icon-image.svg");
}

/* 動画 */
.fs-hist__type-icon--video {
  -webkit-mask-image: url("/assets/img/common/icon-video.svg");
  mask-image: url("/assets/img/common/icon-video.svg");
}

/* 音楽 */
.fs-hist__type-icon--audio {
  -webkit-mask-image: url("/assets/img/common/icon-audio.svg");
  mask-image: url("/assets/img/common/icon-audio.svg");
}

/* ------------------------------------------------------------
 * Breakpoints (min-width, モバイルファースト)
 * --------------------------------------------------------- */
@media (min-width: 640px) {
  .fs-hist__list--cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .fs-hist__list--cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* シンプル行レイアウト：横並び化 */
  .fs-history__item {
    flex-direction: row;
    align-items: center;
    column-gap: 12px;
  }

  .fs-history__title {
    flex: 1 1 auto;
    min-width: 0; /* 省略表示を効かせる */
  }

  .fs-history__time {
    margin-left: auto; /* 右端寄せ */
  }
}
