@import 'variables.css';
@import 'reset.css';

/*****************************
animations
*****************************/
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes wavingHand {
  0% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(20deg);
  }
  20% {
    transform: rotate(-8deg);
  }
  30% {
    transform: rotate(14deg);
  }
  40% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(10deg);
  }
  60% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/*****************************
container
*****************************/
.container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  animation: fadeIn 0.5s linear;
  color: var(--white-color);
}

.container:before {
  content: '';
  background-color: rgba(0, 0, 0, 0.2);
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

@media only screen and (max-width: 767px) {
  .container {
    padding: 15px;
  }
}

/*****************************
weather
*****************************/
.weather {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  padding: 20px;
  animation: fadeIn 0.5s linear;
}

.weather__area,
.weather__sky {
  font-weight: 200;
}

.weather__temp {
  font-size: 26px;
  font-weight: 600;
}

@media only screen and (max-width: 767px) {
  .weather {
    padding: 15px;
  }
}

/*****************************
clock
*****************************/
.clock {
  display: none;
  position: relative;
  animation: fadeIn 0.5s linear;
}

.clock__output {
  font-size: 115px;
}

@media only screen and (max-width: 767px) {
  .clock__output {
    font-size: 59px;
  }
}

/*****************************
greetings
*****************************/
.greetings {
  margin-bottom: 30px;
  position: relative;
  animation: fadeIn 0.5s linear;
}

.greetings__form,
.greetings__text,
.greetings__intro-text,
.greetings__form {
  display: none;
}

.greetings__intro-text {
  margin-bottom: 30px;
  font-size: 50px;
  text-align: center;
}

.greetings__input {
  width: 100%;
  height: 80px;
  padding: 20px;
  font-size: 30px;
  text-align: center;
  border-radius: 40px;
  color: #333;
  box-shadow: var(--box-shadow);
}

.greetings__output-text {
  font-size: 35px;
}

.waving-hand {
  margin-left: 5px;
  display: inline-block;
  animation: wavingHand 2.5s infinite;
}

@media only screen and (max-width: 767px) {
  .greetings__intro-text {
    font-size: 34px;
    margin-bottom: 20px;
  }

  .greetings__output-text {
    font-size: 27px;
  }

  .greetings__input {
    height: 60px;
    font-size: 22px;
  }
}

/*****************************
todo
*****************************/
.todo {
  display: none;
  position: relative;
  max-width: 470px;
  width: 100%;
  animation: fadeIn 0.5s linear;
}

.todo__list {
  max-height: 330px;
  height: 100%;
  overflow-y: scroll;
  position: relative;
  padding-bottom: 80px;
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.todo__form {
  margin-bottom: 30px;
}

.todo__input {
  width: 100%;
  height: 55px;
  padding: 20px 25px;
  font-size: 20px;
  border-radius: 40px;
  color: #333;
  box-shadow: var(--box-shadow);
}

.todo__checkbox {
  position: relative;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px 60px;
  transition: 0.2s;
  cursor: pointer;
  animation: fadeIn 0.5s linear;
}

.todo__checkbox:hover {
  background: rgba(0, 0, 0, 0.7);
}

.todo__checkbox input[type='checkbox'] {
  position: absolute;
  left: 0;
}

.todo__checkbox label {
  position: relative;
  display: inline-block;
  width: 100%;
  font-weight: 300;
  cursor: pointer;
}

.todo__checkbox label:before {
  position: absolute;
  display: block;
  content: '';
  width: 20px;
  height: 20px;
  top: 50%;
  left: -38px;
  margin-top: -8px;
  background: var(--white-color);
  border-radius: 50%;
}

.todo__checkbox label:after {
  position: absolute;
  display: block;
  content: '';
  width: 6px;
  height: 10px;
  top: 50%;
  left: -50px;
  margin-top: -16px;
  border-right: 2px solid var(--white-color);
  border-bottom: 2px solid var(--white-color);
  opacity: 0;
  transform: rotate(45deg) translate3d(0, 2px, 0) scale3d(0.7, 0.7, 1)
    translate(20px, -50%);
  transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

input[type='checkbox']:checked + label:before {
  background: var(--green-color);
}
input[type='checkbox']:checked + label:after {
  opacity: 1;
  transform: rotate(45deg) scale3d(1, 1, 1) translate(20px, -50%);
}

.todo__checkbox + .todo__checkbox {
  margin-top: 10px;
}

.todo__del-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 25px;
  cursor: pointer;
  transition: 0.2s;
}

.todo__checkbox:hover .todo__del-btn:hover {
  color: var(--red-color);
}

.todo__checkbox:hover .todo__del-btn:active {
  color: var(--red-color);
}

.todo__checkbox__done label {
  text-decoration: line-through;
}

@media only screen and (max-width: 767px) {
  .todo__form {
    margin-bottom: 15px;
  }

  .todo__input {
    height: 47px;
    padding: 10px 25px;
    font-size: 18px;
  }

  .todo__checkbox {
    padding: 15px 60px;
  }
}

@media only screen and (max-width: 330px) {
  .todo__list {
    max-height: 215px;
  }
}

/*****************************
footer
*****************************/
.github-logo {
  position: fixed;
  left: 20px;
  bottom: 20px;
}

.github-logo i {
  font-size: 32px;
  color: var(--white-color);
  transition: 0.3s;
}

.github-logo:hover i {
  opacity: 0.5;
}

.github-logo:active {
  transform: scale(0.7);
}

.reset-btn {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
}

.reset-btn i {
  font-size: 25px;
  color: var(--white-color);
  transition: 0.3s;
}

.reset-btn:hover i {
  opacity: 0.5;
}

[data-tooltip]:before,
[data-tooltip]:after {
  position: absolute;
  left: 50%;
  margin: 0 auto;
  transform: translate(-50%);
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  visibility: hidden;
  z-index: 9;
  transition: 0.6s ease-in-out;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

[data-tooltip]:before {
  content: '';
  height: 0;
  width: 0;
  top: calc(100% + -19px);
  left: -13px;
  border-style: solid;
  border-width: 8px;
  border-color: transparent transparent transparent var(--dark-sky-color);
}

[data-tooltip]:after {
  box-sizing: border-box;
  content: attr(data-tooltip);
  padding: 5px 12px;
  top: calc(100% - 27px);
  left: -135px;
  background: var(--dark-sky-color);
  color: var(--white-color);
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 9;
}

[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
  opacity: 1;
  visibility: visible;
  transition: 0.4s ease-in-out;
}

@media only screen and (max-width: 767px) {
  [data-tooltip]:before,
  [data-tooltip]:after {
    display: none;
  }
}

/*****************************
flag
*****************************/
.showing {
  display: block;
}

.hidden {
  display: none;
}
