/* ==============================
   共通デザイン
   ============================== */
/* ページタイトル */
.diary-title-wrapper {
  text-align: center;
}

.responsive-diary-title {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #1f2937;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.3rem;
}

/* 下線アクセント */
.responsive-diary-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 50px;
  background: linear-gradient(90deg, #81c784, #66bb6a);
}

.responsive-diary-show-title {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #1f2937;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.3rem;
}

/* 下線アクセント */
.responsive-diary-show-title::after {
  content: "";
  position: absolute;
  left: 50%; /* 親要素中央に配置 */
  bottom: 0;
  height: 3px;
  width: 50px;
  background: linear-gradient(90deg, #81c784, #66bb6a);
  transform: translateX(-50%);
}

/* ==============================
   日記一覧（index）デザイン
   ============================== */
.diary-index-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 2rem 0;
}

.diary-index-item {
  background-color: #fff;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.diary-index-title {
  font-weight: bold;
  font-size: 1.2rem;
  color: #1f2937;
}

.diary-index-title a {
  text-decoration: none;
  color: #1f2937;
}

.diary-index-title a:hover {
  color: #2563eb;
}

.diary-index-date {
  font-size: 0.9rem;
  color: #6b7280;
  margin-left: 0.5rem;
}

.diary-index-content {
  font-size: 1rem;
  color: #333;
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.diary-index-images {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.diary-index-images img {
  border-radius: 6px;
  max-width: 120px;
  max-height: 120px;
  object-fit: cover;
}

/* 投稿ボタン上のヘッダー整列 */
.diary-index-header-actions {
  text-align: right;
  max-width: 800px;
  margin: 1rem auto;
}

/* カード全体リンク化 + ホバー演出 */
.diary-index-item-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 12px;
}

.diary-index-item-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.diary-index-item:hover {
  background-color: #f9fafb;
}

.diary-index-item-wrapper {
  position: relative;
}

.diary-delete-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 5;
  padding: 0.25rem;
  font-size: 1.1rem;
  color: #e53935;
}

.diary-delete-btn:hover {
  color: #c62828;
}

.diary-delete-btn i {
  pointer-events: none;
}

/* ==============================
   フィルターバー（一覧ページ上部の操作用UI）
   ============================== */
.filter-bar {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #374151;
}

.filter-date-input {
  padding: 2px 4px;
  width: 120px; 
  height: 28px;
}

.filter-nav-btn {
  width: auto;
  font-size: 14px;
  margin-left: 10px;
  padding: 6px 12px;
}
 
/* ==============================
   日記詳細（show）デザイン
   ============================== */
.diary-show-card {
  max-width: 720px;
  margin: 0 auto 0;
  padding: 2rem;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-family: "Inter", sans-serif;
  min-height: calc(100vh - 69px - 110px -50px);
  align-items: center
}

.diary-show-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.diary-show-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.diary-show-date {
  font-size: 0.9rem;
  color: #6b7280;
}

.diary-show-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #374151;
}

.diary-show-media {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.diary-show-img, .diary-show-video {
  border-radius: 12px;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.diary-show-video {
  max-width: 400px;
}

.diary-show-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.btn-edit {
  background-color: #4CAF50;
  color: #fff;
}

.btn-edit:hover {
  background-color: #45a049;
}

.btn-back {
  background-color: #4CAF50;
  color: #fff;
}

.btn-back:hover {
  background-color: #45a049;
}

/* ==============================
   フォーム（new,edit）デザイン
   ============================== */
.current-media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.media-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.remove-media-label {
  margin-top: 4px;
  font-size: 0.9rem;
  text-align: center;
}

/* カスタムチェックボックス */
.remove-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  cursor: pointer;
  transition: all 0.2s;
}

/* チェック時 */
.remove-checkbox:checked {
  background-color: #4caf50;
  border-color: #4caf50;
}

/* フォーカス時 */
.remove-checkbox:focus {
  box-shadow: 0 0 0 2px #4caf50;
}

/* プレビューおよび既存メディアの共通サイズ調整 */
#current-media-container img,
#current-media-container video,
.media-thumb {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin: 4px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}

/* コンテナを横並びで整列 */
#current-media-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}