/*
 * my-future-list.css
 * 未来予想投稿一覧の新しいデザイン案
 */

/*----- 全体のコンテナ -----*/
.my-future-list {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  max-width: 800px;
  margin: 0 auto;
}

/*----- 未来予想 投稿一覧カード全体 -----*/
.my-future-list .future-post-card {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
  margin: 16px 0;
  padding: 20px 24px;
  position: relative;
  overflow: hidden; /* 左のカラーバーのため */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px; /* カード内の要素間のスペース */
  /* ★追加/変更: ステータス表示分の余白を確保し、コンテンツが重ならないようにする */
  padding-top: 40px; /* 例えば、上からのパディングを少し増やす */
}

/* カードホバー時のエフェクト */
.my-future-list .future-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
}

/* ステータスを示す左のカラーバー */
.my-future-list .future-post-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background-color: #6c757d; /* デフォルトは非公開色 */
}
.my-future-list .future-post-card.status-publish::before {
  background-color: #28a745; /* 公開時は緑 */
}

/* ★★★ 追加: ステータス表示を右上へ絶対配置 ★★★ */
.my-future-list .post-status-top-right {
    position: absolute;
    top: 10px; /* カードの上端からの距離 */
    right: 10px; /* カードの右端からの距離 */
    padding: 4px 10px; /* パディング */
    border-radius: 12px; /* 角丸 (バッジ風) */
    font-size: 0.8em; /* 文字サイズ */
    font-weight: 600; /* 太字 */
    z-index: 10; /* 他のコンテンツの上に表示されるように */
    white-space: nowrap; /* テキストの折り返しを防ぐ */
    color: #fff; /* 文字色を白に統一 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 影 */
}

/* 公開中のスタイル */
.my-future-list .post-status-top-right.status-publish {
    background-color: #28a745; /* 緑色 */
}

/* 非公開のスタイル */
.my-future-list .post-status-top-right.status-draft {
    background-color: #6c757d; /* グレー */
}


/* ----- カード上部 (タイトル) ----- */
/* ステータスが分離されたため、post-headerは不要になった可能性がありますが、
   既存のスタイルとの兼ね合いで残す場合も考慮 */
.my-future-list .post-header {
  /* display: flex; */ /* もしタイトルと何かを並べるなら残す */
  /* justify-content: space-between; */
  /* align-items: flex-start; */
  /* gap: 16px; */
  margin-bottom: 5px; /* タイトルの下の余白 */
}

.my-future-list .post-title-status {
    /* ステータスが分離されたため、このdivはタイトルのみを囲むことになります */
    /* text-align: left; */ /* 明示的に左寄せ */
}

.my-future-list .post-title-status .post-title-link {
  font-size: 1.25em;
  font-weight: 700;
  color: #1a202c;
  text-decoration: none;
  transition: color 0.2s ease;
}
.my-future-list .post-title-status .post-title-link:hover {
  color: #0073aa;
}

/* 既存の .post-status はPHPで使われなくなったため、このCSSルールは適用されません */
/*
.my-future-list .post-status {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.8em;
  font-weight: 600;
  border-radius: 12px;
  color: #fff;
  margin-left: 8px;
}
.my-future-list .post-status.status-publish {
  background-color: #28a745;
}
.my-future-list .post-status.status-draft {
  background-color: #6c757d;
}
*/

/* ----- カード中央部 (各種情報) ----- */
.my-future-list .post-meta-info {
  display: flex;
  justify-content: space-between; /* 左右に配置 */
  align-items: flex-end; /* 下揃え */
  font-size: 0.9em;
  color: #4a5568;
}

.my-future-list .filled-count {
  /* 背景色を削除 */
  padding: 4px 0px; /* パディングを調整 */
  border-radius: 4px;
}

/* 投稿日時のコンテナとカテゴリ情報のコンテナを右寄せに (既存だが念のため再確認) */
.my-future-list .post-last-updated,
.my-future-list .post-category-info {
  text-align: right; /* これにより右寄せになる */
  margin: 0;
  line-height: 1.5;
}

/* 念のため、post-category-info内のpタグにもtext-alignを適用 */
.my-future-list .post-category-info p {
  margin: 0;
  line-height: 1.5;
  text-align: right;
}

/*----- アクションボタン -----*/
.my-future-list .post-actions {
  display: flex;
  flex-direction: row; /* デフォルトは横並び */
  justify-content: flex-end; /* 通常時は右寄せ */
  gap: 12px; /* ボタン間のスペース */
  margin-top: 12px;
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
  flex-wrap: wrap; /* ボタンがはみ出たら折り返す */
}

/* ボタンをグループ化するdiv */
.my-future-list .post-actions .action-group {
    display: flex; /* グループ内のボタンを横並びにする */
    gap: 12px; /* グループ内のボタン間のスペース */
    /* flex-grow: 1; */ /* 必要に応じて、利用可能なスペースを埋める */
    /* justify-content はメディアクエリで調整 */
}

.my-future-list .action-button,
.my-future-list .inline-form input[type="submit"] {
  display: inline-flex; /* アイコンとテキストを中央揃え */
  align-items: center;
  gap: 6px; /* アイコンとテキストの間隔 */
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-size: 0.9em;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.my-future-list .action-button:hover,
.my-future-list .inline-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* グラデーションを削除し、単色に */
/* 表示 */
.my-future-list .action-button.view { background: #596164; }
/* 編集 */
.my-future-list .action-button.edit { background: #0073aa; }
/* 公開/非公開 */
.my-future-list .inline-form input[type="submit"] { background: #10b981; }
/* 削除 */
.my-future-list .inline-form.delete-form input[type="submit"] { background: #dc2626; }

/* ボタン内アイコン (SVG) */
.my-future-list .btn-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}


/* ----- 投稿件数表示のスタイリング ----- */
.my-list-info {
    text-align: center;
    margin-bottom: 25px;
    margin-top: 10px;
    font-size: 0.95em;
    color: #555;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.my-list-info p {
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
}


/* ----- ページネーションのスタイリング ----- */
.my-list-pagination {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.my-list-pagination .page-numbers {
    display: inline-block;
    vertical-align: middle;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
    background-color: #fff;
    transition: all 0.3s ease;
    line-height: 1;
    box-sizing: border-box;
    min-width: 30px;
    text-align: center;
}

.my-list-pagination .page-numbers:hover {
    background-color: #eaf2f8;
    border-color: #b3d4f4;
}

.my-list-pagination .page-numbers.current {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
    font-weight: bold;
    cursor: default;
}

/* 「前へ」「次へ」の矢印部分の調整 */
.my-list-pagination .page-numbers.prev,
.my-list-pagination .page-numbers.next {
    padding: 8px 10px;
}

.my-list-pagination .page-numbers.dots {
    border: none;
    background: none;
    cursor: default;
    padding: 8px 4px;
    color: #888;
    min-width: auto;
}


/* ----- レスポンシブ対応 ----- */
@media (max-width: 600px) {
  .my-future-list .future-post-card {
    padding: 16px;
    padding-top: 40px; /* レスポンシブ時もステータス分のパディングを確保 */
  }
  .my-future-list .post-header,
  .my-future-list .post-meta-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  /* レスポンシブ時も日時とカテゴリ情報を右寄せに (既存だが念のため再確認) */
  .my-future-list .post-last-updated,
  .my-future-list .post-category-info {
    width: 100%;
    text-align: right;
  }

  .my-future-list .post-actions {
    flex-direction: column; /* ★変更: ボタン群全体を縦並びにする */
    align-items: flex-end; /* ★変更: 各行を右寄せにする */
    gap: 10px; /* 行間のスペース */
    flex-wrap: nowrap; /* ボタン群は折り返さない */
  }

  /* 各ボタンのグループ */
  .my-future-list .post-actions .action-group {
      width: 100%; /* 各グループをフル幅にする */
      justify-content: flex-end; /* グループ内のボタンを右寄せにする */
      flex-wrap: wrap; /* グループ内のボタンがはみ出たら折り返す */
  }

  /* フォームのdisplay:inlineを上書きして、text-alignが効くようにする */
  .my-future-list .post-actions .inline-form {
      display: inline-block !important;
  }

  /* レスポンシブ: ページネーション */
  .my-list-pagination .page-numbers {
    padding: 6px 10px;
    margin: 0 2px;
    font-size: 0.85em;
  }
}