
/* 基本的なスタイリング */
body {
  font-family: Arial, sans-serif;
  background-color: #fff;
  margin: 0;
  padding: 0;
  color: #444440;
}

select {
  color: #444440;
  box-shadow: none;
  background-size: 16px 16px;
  cursor: pointer;
}

.todo-container {
  width: 100%;
  max-width: 680px;
  margin: 50px auto;
  padding: 20px;
  /* border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1); */
}
header {
  border-bottom: 1px solid #DDDDDD;
  position: sticky;
  top: 0;
  height: 80px;
  display: flex;
  align-items: center;
  z-index: 500;
  background-color: #FFFFFF;
}
h1 {
  position: absolute;
  padding-left: 2.6%;
}

h1 img {
  width: 20%;
  object-fit: fill;
  height: auto;
  display: flex;
}

.hamburger-menu {
  display: none;
}
header ul {
  display: flex;
  margin: 0 auto;
}
.menu-content {
  margin: 0 auto;
  padding-left: 72%;
}
header ul {
  justify-content: space-between;
  display: flex;
  column-gap: 3em;
}
a {
  color: #444440;
}
.menu-content a:hover {
  color: #14AE5C;
}
#menu-btn-check {
  display: none;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

h3{
  margin-bottom: 10px;
}

.todo-form {
  display: flex;
  justify-content: space-between; 
  margin-bottom: 20px;
}

#search-bar{
  margin-bottom: 14px;
}

#todo-input, 
#search-bar, 
#due-date, 
#category-select, 
#priority-select {
  flex: 1;
  margin-right: 10px; /* Space between elements */
}

#todo-input, 
#search-bar, 
#due-date {
  padding: 10px;
  border: 1px solid #ccc;
  /* border-radius: 5px; */
}

#add-todo-btn {
  padding: 10px 15px;
  background-color: #28a745;
  color: white;
  border: none;
  /* border-radius: 5px; */
  cursor: pointer;
}

#add-todo-btn:hover {
  background-color: #218838;
}

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

.todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center; /* 項目を垂直方向に中央揃えにする */
  padding: 10px;
  border: 1px solid #ccc;
  /* border-radius: 5px; */
  margin-bottom: 10px;
  background-color: #f9f9f9;
  position: relative; /* 絶対子要素の相対位置 */
}

.completed {
  text-decoration: line-through;
  color: gray;
}

/* 追加: 完了済みのカテゴリー、期限、優先度にも適用 */
.completed-category, .completed-due-date, .completed-priority {
  text-decoration: line-through;
  color: gray;
}

.todo-item.completed {
  background-color: #d4edda; /* 完了したタスクの薄緑色の背景 */
  text-decoration: line-through; /* 完了したタスクの取り消し線テキスト */
}

.todo-item span {
  flex-grow: 1; /* テキストが利用可能なスペースを占有できるようにする */
}

.todo-item select {
  margin-right: 50px;
}

.todo-item button {
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 5px;
  cursor: pointer;
  margin-right: 10px;
}

.todo-item button:hover {
  background-color: #60686f;
}

/* 期日のスタイル */
.todo-item span.due-date {
  margin-left: 10px;
  font-style: italic;
  color: #6c757d;
}

/* 優先レベルのスタイル */
.todo-item.低 {  
  /* border-left: 5px solid #28a745;  */
}

.todo-item.中 {
  /* border-left: 5px solid #ffc107;  */
}

.todo-item.高 {
  /* border-left: 5px solid #dc3545;  */
}

@media screen and (max-width: 959px) {
  /* 959px以下に適用されるCSS（タブレット） */
  header{
    height: 60px;
  }
  .hamburger-menu {
    display: block;
  }
  .menu-btn {
    position: fixed;
    top: 0px;
    right: 0px;
    display: flex;
    height: 60px;
    width: 60px;
    justify-content: center;
    align-items: center;
    z-index: 90;
    background-color: #FFFFFF;
    border-left: #DDDDDD 1px solid;
    border-bottom: #DDDDDD 1px solid;
  }
  .menu-btn span,
  .menu-btn span:before,
  .menu-btn span:after {
    content: '';
    display: block;
    height: 1px;
    width: 25px;
    border-radius: 1px;
    background-color: #111111;
    position: absolute;
    transition: all 0.3s;
  }
  .menu-btn span:before {
    bottom: 8px;
  }
  .menu-btn span:after {
    top: 8px;
  }
  #menu-btn-check:checked ~ .menu-btn span {
    background-color: rgba(255, 255, 255, 0);/*メニューオープン時は真ん中の線を透明にする*/
  }
  #menu-btn-check:checked ~ .menu-btn {
    background-color: #14AE5C;
    border-bottom: none;
  }
  #menu-btn-check:checked ~ .menu-btn span:before,
  #menu-btn-check:checked ~ .menu-btn span:after {
    background-color: #FFFFFF;
  }
  #menu-btn-check:checked ~ .menu-btn span::before {
    bottom: 0;
    transform: rotate(45deg);
  }
  #menu-btn-check:checked ~ .menu-btn span::after {
    top: 0;
    transform: rotate(-45deg);
  }
  .menu-content {
    width: 100%;
    height: 100%;
    position: fixed;
    top: -100%;
    left: 0;/*leftの値を変更してメニューを画面外へ*/
    z-index: 80;
    background-color: #14AE5C;
    transition: all 0.5s;/*アニメーション設定*/
    padding-left: 0;
  }
  .menu-content ul {
    padding: 39px 20px 50px;
    display: block;
    width: 100%;
    text-align: center;
  }
  .menu-content ul li {
    border-bottom: solid 1px #ffffff;
    list-style: none;
    padding: 14px 0;
    position: relative;
  }
  .menu-content ul .news {
    position: absolute;
    top: 359px;
    left: 50%;
    border-bottom: none;
  }
  .menu-content ul .recruit_sp {
    border-bottom: none;
  }
  .menu-content a:hover {
    color: #ffffff;
  }
  .menu-content ul li a {
    display: block;
    width: 100%;
    font-size: 16px;
    box-sizing: border-box;
    color:#ffffff;
    text-decoration: none;
    padding: 9px 15px 10px 0;
    position: relative;
  }
  #menu-btn-check:checked ~ .menu-content {
    top: 60px;
  }


  .todo-form {
    flex-direction: column;
  }

  #todo-input, 
  #add-todo-btn, 
  #category-select,
  #due-date,
  #priority-select {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
  }

  #add-todo-btn {
    margin-left: 0; /* 全幅の左マージンを削除 */
  }

  ul#todo-list {
    padding: 0;
  }

}

@media screen and (max-width: 480px) {
  /* 480px以下に適用されるCSS（スマートフォン） */
  h1 {
    padding-left: 5.6%;
  }
  .menu-btn span, .menu-btn span:before, .menu-btn span:after {
    width: 22px;
  }


  h2 {
    font-size: 1.5em;
        }

  .todo-container {
    padding: 15px;
      }

  #todo-input, 
  #add-todo-btn, 
  #category-select,
  #due-date,
  #priority-select {
  padding: 12px;
      }

  .todo-item {
  flex-direction: column;
  align-items: flex-start;
      }
  
  .todo-item span{
    padding: 2px;
  }

  .todo-item input{
    padding: 2px;
  }

  .todo-item button {
  width: 100%;
  margin-top: 10px;
  }      
}
