@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,500;0,700;1,300;1,500;1,700&display=swap');

:root {
  --green: #b5c7c4;
  --dark-green: #123c35;
  --grey: #555;
  --tab-color: #dadef3;
  --link: #4162f6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: var(--link);
  transition: all .3s ease-in-out;
}

a:hover {
  text-shadow: 0 0 5px var(--link);
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background-color: var(--green);
  font-family: 'Roboto', sans-serif;
  color: var(--grey);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--green);
}

/*Header*/
.header {
  flex-shrink: 0;
  position: relative;
  width: 100%;
  min-height: 10vh;
  padding: 10px;
  background: url('../img/bg.jpg');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border-radius: 15px 15px 0 0;
  color: #fff;
  text-align: center;
}

.header__title {
  text-shadow: 0 0 5px var(--dark-green);
}

.copyright {
  position: absolute;
  top: 10px;
  left: 15px;
  color: #ccc;
}
.copyright__link {
  color: #eee;
}

.refresh {
  position: absolute;
  top: 15px;
  right: 20px;
  cursor: pointer;
  transition: all .3s ease-in-out;
}
.refresh img {
  width: 30px;
  height: 30px;
}
.refresh:hover {
  transform: rotate(45deg);
}

.current-date {
  position: absolute;
  bottom: 13px;
  left: 15px;
  font-size: .8rem;
}

/*Main*/
.main {
  flex-grow: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #fff;
  padding: 15px;
  overflow-y: auto;
}

.tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 10px 0;
  border-bottom: 1px solid var(--grey);
}
.tab {
  width: 33.33%;
  text-align: center;
  color: var(--tab-color);
  cursor: pointer;
  transition: .3s ease-in-out;
}
.current-tab,
.tab:hover {
  color: var(--link);
}

.todos {
  list-style: none;
}

.todo {
  padding: 7px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc
}
.todo--done {
  color: #ccc;
  text-decoration: line-through;
}
.todo--deleted {
  color: #ccc;
  cursor: not-allowed;
}

.todo--mark {
  background-color: #ecf2ff;
  border-radius: 5px;
}

.todo__icon {
  width: 1.3rem;
  height: 1.3rem;
  text-align: center;
  opacity: .6;
  cursor: pointer;
  transition: opacity .2s ease-in-out;
}
.todo__icon:hover {
  opacity: 1;
}

.icon-edit,
.icon-trash {
  font-size: 1.3rem;
  font-weight: bold;
}

.todo__text {
  flex-grow: 1;
  padding-left: 5px;
  cursor: pointer;
}
.todo__text.habit--checked {
  color: #999;
  font-style: italic;
  font-weight: 300;
  text-decoration: line-through;
  opacity(0);
  transition: all .3s ease-in-out;
}
.todo__check {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  color: var(--dark-green);
}
.todo__edit {
  margin: 0 5px;
}

.todo--deleted .todo__check,
.todo--deleted .todo__edit,
.todo--deleted .todo__remove {
  display: none;
}
.todo--deleted .todo__text {
  cursor: not-allowed;
}

.add-btn {
  position: absolute;
  top: 15px;
  right: 70px;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  font-size: 1.2rem;
  color: var(--dark-green);
  border: 1px solid var(--dark-green);
  border-radius: 50%;
  box-shadow: 0 0 5px #999;
  cursor: pointer;
  transition: box-shadow .3s ease-in-out,
              background-color .3s ease-in-out,
              color .3s ease-in-out;
}
.add-btn:hover {
  box-shadow: 0 0 5px var(--dark-green);
  background-color: var(--dark-green);
  color: #fff;
}

/*Стили для блока, в котором написано, что задач на сегодня нет*/
.empty-text {
  margin: 200px auto;
  text-align: center;
  color: #999;
  font-style: italic;
  font-weight: 300;
}

/*Modal window*/
.modal {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  transition: opacity .5s ease-in-out;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}
.modal.open .modal__content {
  opacity: 1;
  transform: translateY(0) scaleY(1);
  transition: all .5s ease-in-out;
}

.modal__overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal__content {
  display: flex;
  flex-direction: column;
  min-width: 500px;
  max-width: 650px;
  padding: 20px;
  border-radius: 5px;
  background-color: #fff;
  opacity: 0;
  transform: translateY(-200%) scaleY(0);
  transition: all .5s ease-in-out;
  z-index: 1;
}

.modal__text {
  min-height: 30px;
  margin-bottom: 10px;
  padding: 10px;
  font-size: 1rem;
}

.modal__add {
  padding: 10px;
  font-size: .9rem;
  background-color: var(--dark-green);
  border: none;
  border-radius: 3px;
  color: #fff;
  cursor: pointer;
}
.modal__add:hover {
  box-shadow: 0 0 5px var(--dark-green);
}



.key {
  display: inline-block;
  min-width: 25px;
  height: 25px;
  padding: 3px;
  border: 1px solid #999;
  border-radius: 3px;
  line-height: 15px;
  text-align: center;
  font-weight: bold;
  color: #999;
}


/*Responsive*/
@media (max-width: 768px) {
  .header {
    border-radius: 0;
  }

  .copyright {
    display: none;
  }

  .current-date {
    position: static;
    font-size: 1rem;
  }

  .refresh {
    left: 15px;
    width: 25px;
  }
  .refresh img {
    width: 25px;
    height: 25px;
  }

  .todo__check {
    margin-right: 5px;
  }
  .todo__edit {
    margin: 0 10px;
  }

  .add-btn {
    right: 15px;
    font-size: 1.1rem;
  }

  .modal__content {
    min-width: 300px;
    max-width: 600px;
  }
}


@media (max-width: 460px) {
 .todo--mark {
    background-color: transparent;
    border-radius: 0;
  }
}
