@charset "UTF-8";
/* reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1100px;
  margin-left: 260px;      
  padding: 20px;
  padding-top: 80px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  text-align: left;
  transition: margin-left 0.3s ease-in-out;  
}
/**/

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  z-index: 1000;
}

.dropdown.visible {
  display: block;
}

/*
.container {
  display: flex;
  flex-direction: row;
}*/

/* SideBar for Admin*/
.sidebar {
  width: 250px;
  background: #f0f0f0; /* Light gray background for better readability */
  color: #333;
  padding: 20px;
  box-sizing: border-box;
  transition: all 0.3s;
}

.sidebar h2 {
  margin-bottom: 20px;
  font-size: 1.5rem;
/*  color: #007bff; /* Blue header for a touch of color */
}

.sidebar ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  margin-bottom: 10px;
}

.sidebar ul li a {
  display: block;
  padding: 10px 15px;
  color: #333;
  background: #e7e7e7;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s;
}

.sidebar ul li a:hover {
  background: #d0d0d0; /* Slightly darker on hover */
  color: #007bff; /* Text color change on hover */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
      flex-direction: column;
      margin-left: 0; /* サイドバーが非表示になるため */      
/*      padding-top: 70px; /* ヘッダーの高さを考慮して調整 */      
  }

/*  .sidebar {
      width: 100%;
      margin-bottom: 20px;
  }*/

  .sidebar {
    width: 100%;
    display: none;
}

.sidebar.active {
    display: block;
}

}

/* Sidebar */

.back-link {
  font-size: 16px;
  color: #007bff;
  text-decoration: none;
  margin-bottom: 20px;
  display: inline-block;
}
.back-link i {
  margin-right: 5px;
}





/*  header, footer {
    background-color: #ffffff;
    padding: 20px;
    text-align: center;
  }
  
  footer {
    background-color: #f3f3f3;
  }*/
/* フォーム */
.form-container {
  margin: 20px auto;
  max-width: 800px;
  padding: 80px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.form-container h2 {
  margin-top: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
select,
button {
/*  width: 100%;*/
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

input[type="number"] {
  width: calc(100% - 24px);
}
/*
button {
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}*/

button {
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

/* フッター */
footer {
  background-color: #333;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}

footer p {
  margin: 10px 0;
}

footer nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

footer nav ul li {
  display: inline;
  margin-right: 20px;
}

footer nav ul li a {
  color: #fff;
  text-decoration: none;
}


/*
.container {
  max-width: 800px;
  margin: 50px auto;
  padding: 70px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}*/

h1 {
  text-align: center;
  color: #333;
}

.post-form {
  background-color: #f0f0f0;
  padding: 20px;
  border-radius: 8px;
}

.post-form h2 {
  margin-top: 0;
}

.post-form label {
  font-weight: bold;
}

.post-form input[type="text"],
.post-form textarea {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.post-form textarea {
  resize: vertical;
}

.post-form button {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 4px;
  margin: 10px; /* ボタン間のスペースを設定 */  
}

.post-form div {
  display: flex; /* フレックスボックスを有効化 */
  justify-content: start; /* ボタンを左寄せに配置 */
}

.post-form button:hover {
  background-color: #0056b3;
}

.posts {
  margin-top: 20px;
}

.post {
  background-color: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.post h3 {
  margin-top: 0;
  color: #333;
}

.post p {
  margin-bottom: 0;
  color: #666;
}

textarea {
  border: 1px solid #ccc; /* 枠線 */
  border-radius: 5px; /* 角の丸み */
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); /* ボックスシャドウ */
  padding: 8px; /* テキストと枠の間隔 */
}
/* Form Radio */
/* ラジオボタンのサイズを調整 */
input[type="radio"] {
  width: 20px; /* 幅の指定 */
  height: 20px; /* 高さの指定 */
  cursor: pointer; /* ホバー時のカーソルをポインターに */
}

input[type="number"] {
  border: 1px solid #ccc; /* 枠線 */
  border-radius: 5px; /* 角の丸み */
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); /* ボックスシャドウ */
  padding: 8px; /* テキストと枠の間隔 */
  width: 50%; /* 幅 */
}

/* カスタムスタイルがあればこちらで調整 */
.custom-radio {
  display: inline-block;
  position: relative;
  width: 20px; /* カスタムラジオのサイズ */
  height: 20px;
  background-color: #f4f4f4; /* 背景色 */
  border-radius: 50%; /* 円形に */
  border: 2px solid #ddd; /* ボーダー */
}

.custom-radio::after {
  content: '';
  position: absolute;
  top: 4px; left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4CAF50; /* 選択時の色 */
  transform: scale(0);
  transition: transform 0.2s ease-out;
}

input[type="radio"]:checked + .custom-radio::after {
  transform: scale(1);
}

.category-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;  
}

.category-list a {
  text-decoration: none;
  color: #333;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 5px;
  background-color: #f0f0f0;
  transition: background-color 0.3s ease;
}

.category-list a:hover {
  background-color: #ddd;
}

/* モーダルウィンドウ全体を隠す */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.4);
  z-index: 1000; /* 他の要素より前面に表示 */      
}

/* モーダルコンテンツ */
.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 50%;
}

/* 閉じるボタン */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.add-category-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 8px; /* ボタンの内部パディングを調整 */
  margin-left: 10px; /* リンクとの間に適度な間隔を設ける */
  width: auto; /* ボタンの幅を自動調整にする */
}

.add-category-btn i {
  color: #007BFF; /* アイコンの色を青に設定 */
  font-size: 16px; /* アイコンのサイズを適切に調整 */
  margin-left: 10px; /* ボタンとバッジの間にスペースを追加 */  
}

.unread-badge {
  background-color: red; /* バッジの背景色 */
  color: white; /* テキストの色 */
  font-size: 0.8em; /* テキストのサイズ */
  padding: 3px 6px; /* パディング */
  border-radius: 50%; /* 円形にする */
  position: relative; /* 絶対位置の基準点とする */
  top: -10px; /* リンクの上に配置 */
  left: 5px; /* リンクの右に少しオフセット */
  display: inline-block;
  min-width: 20px; /* 最小幅 */
  text-align: center; /* テキストを中央揃え */
}

.cap1 {
  font-size: 1em;
  line-height: 1.5em;
  padding: 0 0.5em 0.5em;
  display: block;
  width: 100%;
  height: 4.7em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; }

  .file-upload-icon {
    cursor: pointer;
    color: #333; /* アイコンの色 */
    font-size: 24px; /* アイコンのサイズ */
    padding: 10px; /* クリックしやすいようにパディングを追加 */
  }
  
  .file-upload-icon:hover {
    color: #666; /* ホバー時のアイコンの色を変更 */
  }

/*Loading  */
  .loading {
    display: none;
    font-size: 14px;
    color: #666;
}

.loading::before {
    content: "□ ";
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


#loading-indicator {
  display: none; 
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1050; /* モーダルのz-indexよりも高く設定 */
}

.spinner {
  border: 16px solid #f3f3f3;
  border-top: 16px solid #3498db;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#overlay {
  position: fixed; /* ウィンドウに対して固定 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5); /* 黒色の半透明 */
  z-index: 1000; /* 他の要素よりも前に表示 */
}

.element-divider {
  border: 0;
  border-top: 1px solid #ccc;
  margin: 20px 0;
}

@media (max-width: 768px) {
.element-divider {
/*    margin: 0.5rem 0;*/
    border: 0;
    border-top: 1px solid #ccc;
    margin: 20px 0;    
  }
}

.required-label {
  color: red;
  font-weight: bold;
  margin-left: 5px;
}

        /* Toggle switch */
        .toggle-container {
          display: flex;
          align-items: center;
      }

      .toggle-container input[type="checkbox"] {
          position: relative;
          width: 40px;
          height: 20px;
          -webkit-appearance: none;
          background-color: #c6c6c6;
          outline: none;
          border-radius: 20px;
          transition: background-color 0.3s;
          cursor: pointer;
          margin-left: 10px;
      }

      .toggle-container input[type="checkbox"]:checked {
          background-color: #007bff;
      }

      .toggle-container input[type="checkbox"]::before {
          content: '';
          position: absolute;
          width: 18px;
          height: 18px;
          border-radius: 50%;
          top: 1px;
          left: 1px;
          background-color: white;
          transition: transform 0.3s;
      }

      .toggle-container input[type="checkbox"]:checked::before {
          transform: translateX(20px);
      }