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

/* Typography */
html {
  font-size: 62.5%;
  background-image: url("../images/pattern-triforce-2x.png"),
    linear-gradient(to bottom, #033d2e 0%, #08494d 50%, #0e243a 100%);
  background-position: center center;
  background-repeat: repeat;
  background-size: 2.5rem, cover;
  height: auto;
  min-height: 100%;
}

body {
  font-size: 1.6rem;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  color: #f4efe5;
}

h1,
h2,
h3,
h4 {
  font-family: "Varela Round", sans-serif;
}

/* Header */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-image: linear-gradient(#0e5135, #0d9263);
  color: #fff;
}

.header--title {
  margin-left: 2rem;
  cursor: pointer;
  text-shadow: 0 0 3px #053335, 0 0 5px #0a1928;
  transition: all 0.15s;
  margin: 10px;
  transform: translate(0, -5px);
}

.header--image {
  display: inline;
  transform: translate(-3px, 8px);
}

.header--title:hover {
  text-shadow: 1px 1px 2px #ccc, 0 0 1em #ccc, 0 0 0.2em #ccc;
}

.btn {
  background-color: #4aba91;
  border-radius: 2px;
  border: 1px solid transparent;
  outline: none;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn--log,
.btn--logOut {
  margin-right: 4rem;
}
.btn--add {
  padding: 1rem 1.5rem;
  align-self: center;
  margin-right: 4rem;
}
.btn--log:hover,
.btn:hover {
  box-shadow: 0 0 5px 1px black;
}

@media screen and (max-width: 900px) {
  .header--title,
  .btn--log {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Hero Section */
.hero {
  margin-top: 6rem;

  display: flex;
  justify-content: center;
  /* align-items: center; */
}

.hero--content,
.hero--register {
  width: 40%;
}

.hero--header {
  font-size: 2.5rem;
}
.hero--content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero--text {
  max-width: 65ch;
  font-size: 2rem;
  line-height: 1.5;
  text-align: center;
}
.pixel--container {
  display: flex;
  justify-content: center;
}

/* Forms */
::placeholder {
  /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: #4aba91;
  opacity: 1; /* Firefox */
}

:-ms-input-placeholder {
  /* Internet Explorer 10-11 */
  color: #ccc;
}

::-ms-input-placeholder {
  /* Microsoft Edge */
  color: #ccc;
}

form {
  display: flex;
  flex-direction: column;
}

form input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
select {
  border-radius: 2px;
  padding: 1rem;
  background-color: #0e5135;
  border: none;
  color: #fff;
  width: 100%;
  margin-bottom: 1.5rem;
  outline: none;
  transition: all 0.15s, visibility 0s;
}
option {
  width: 10%;
}

/* autofill */
input:-webkit-autofill {
  background-color: #0e5135;
  color: #fff;
  transition: all 5000s ease-in-out 0s;
}

form input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover {
  background-color: #00381c;
}

form input:focus {
  border: 2px solid #4aba91;
}

form input[type="submit"] {
  cursor: pointer;
  padding: 1.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 1.8rem;
  color: black;
  background-color: #d4ce46;
  box-shadow: 0 1px 3px 0 rgb(26 24 29 / 12%), 0 1px 2px 0 rgb(26 24 29 / 24%);
  transition: all 0.15s, visibility 0s;
}

form input[type="submit"]:hover {
  box-shadow: 0 3px 6px 0 rgb(26 24 29 / 16%), 0 3px 6px 0 rgb(26 24 29 / 24%);
  background-color: #eee860;
}

.errorText {
  color: tomato;
  margin: 0;
  margin-bottom: 2rem;
}

.register--title {
  font-size: 2.5rem;
}

@media screen and (max-width: 1500px) {
  .hero {
    justify-content: space-around;
  }
}
@media screen and (max-width: 950px) {
  .hero {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .hero--content {
    width: 100%;
  }
  .hero--register {
    width: 80%;
  }
}
@media screen and (max-width: 750px) {
  .hero--register {
    width: 100%;
    padding: 2rem;
  }
}

/* Modal */

.modal-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.5s;
  flex-direction: column;
  z-index: 999;
}

.modal-submit {
  margin-top: 10px;
}

.bg-active {
  visibility: visible;
  opacity: 1;
}

.modal {
  /* background-color: #00381c; */
  background-image: linear-gradient(#0e5135, #0d9263);
  width: 50%;
  height: 65%;
  border-radius: 10px;
  overflow: hidden;
  padding: 1rem;
  position: relative;
  transition: all 0.1s;
}

.modal h3 {
  text-align: center;
  font-size: 3rem;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  font-weight: bold;
}

/* .modal--header {
  display: flex;
  justify-content: space-between;
} */
.modal--main {
  width: 50%;
  padding: 4rem;
  overflow-y: scroll;
}
@media screen and (max-width: 1200px) {
  .modal--main {
    width: 50%;
    height: 55%;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}
@media screen and (max-width: 950px) {
  .modal {
    height: 55%;
    width: 60%;
  }
}
@media screen and (max-width: 750px) {
  .modal {
    height: 70%;
    width: 70%;
  }
}
@media screen and (max-width: 650px) {
  .modal {
    height: 70%;
    width: 80%;
  }
}
@media screen and (max-width: 450px) {
  .modal {
    height: 70%;
    width: 90%;
  }
}
@media screen and (min-height: 900px) {
  .modal {
    height: 50%;
    width: 40%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.modal--content img {
  /*width: 30%;*/
  height: 150px;
  margin-right: 1rem;
}
/* Footer */

footer {
  background-color: #00381c;
  padding: 1rem;
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: end;
}

footer p {
  margin: 0;
}

/* Main page */

.header--main {
  padding: 0rem;
}

/* Profile Section */

.top--container {
  display: flex;
  background-color: #00381c;
  width: 100%;
  padding: 0.5rem;
  height: 10%;
  justify-content: space-between;
}
.profile {
  width: 40%;
}
.profile--card {
  display: flex;
  border: 2px solid black;
  width: 100%;
  overflow: hidden;
  background-color: #0e5135;
}
.image--container {
  flex: 2.5;
  background-color: #0d9263;
  display: flex;
  justify-content: center;
  padding: 1rem;
  cursor: pointer;
}
.profile--content {
  flex: 4;
  padding: 1rem;
}

/* Progress Bar */
.progress {
  background-color: #08494d;
  border-radius: 5px;
  height: 30px;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}
.progress--done {
  height: 100%;
  background: linear-gradient(to left, #0d9263, #08494d);
  border-radius: 5px;
  width: 0;
  opacity: 0;
  box-shadow: 0 3px 3px -5px #0d9263, 0 2px 5px #0d9263;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.15s;
  position: absolute;
  top: 0;
  left: 0;
}
.progress--indicator {
  position: absolute;
  top: 5px;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  z-index: 5;
}

/* Habit Cards */
.habitCards {
  width: 40%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.habits--container {
  background: rgba(79, 91, 102, 0.8);
  border-radius: 10px;
  height: 200vh;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: center;
}
.habits--container:has(+ div) {
  padding: 2rem;
  padding-bottom: 1rem;
}

.habit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgb(135, 135, 135);
  margin-bottom: 1.5rem;
  width: 80%;
  overflow: hidden;
  color: black;
  border-radius: 10px;
}
.habit h2,
h3 {
  font-family: "Roboto", sans-serif !important;
}

.habit--increment {
  background-color: red;
  height: 100%;
  margin-right: 1rem;
}

.habit--increment button {
  height: 100%;
}

.habit--options {
  background-color: dodgerblue;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 1rem;
}

.options--red {
  background-color: tomato;
}
.habit--options button {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  padding: 1rem;
  cursor: pointer;
  color: white;
  background-color: rgba(27, 55, 31, 0.35);
  font-weight: 500;
  font-size: 2rem;
  transition: all 0.15s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.habit--options button:hover {
  background: rgba(7, 59, 111, 0.5);
}

#red--option:hover {
  background: rgba(123, 23, 5, 0.5);
}

#red--option svg {
  fill: rgb(218, 218, 218);
  stroke-width: 0.1;
}

.habit--content {
  padding: 1rem;
  width: 100%;
}

.image--selected {
  border: 3px solid lime;
}

/* layout for main */

.main--top {
  display: flex;
  justify-content: space-around;
  padding-bottom: 4rem;
  /* height: 100vh; */
}
.habits--title {
  text-align: center;
  font-size: 2.8rem;
}

@media screen and (max-width: 1550px) {
  .habit {
    width: 98%;
  }
}
@media screen and (max-width: 1200px) {
  .main--top {
    flex-direction: column;
    /* align-items: center; */
  }
  .profile {
    width: 50%;
  }
  .habitCards {
    width: 100%;
  }
  .habits--container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    height: 20%;
  }
  .habit {
    width: 48%;
  }
}

@media screen and (max-width: 1000px) {
  .habit {
    width: 90%;
  }
  .habits--container {
    width: 80%;
  }
}

@media screen and (max-width: 750px) {
  .habit {
    width: 100%;
  }
  .habits--container {
    width: 100%;
  }
  .profile {
    width: 65%;
  }
}
@media screen and (max-width: 650px) {
  .habit {
    width: 100%;
  }
  .profile {
    width: 75%;
  }
  .habits--container {
    padding: 1rem;
  }
}

.form--habit {
  width: 100%;
  /* background-color: ; */
}

@keyframes append-animate {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes append-out {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0);
    opacity: 0;
  }
}

.appended {
  animation: append-animate 0.3s;
  /* transition: all 0.3s; */
}

.deleted {
  animation: append-out 0.3s;
}

.filter {
  height: 20%;
  align-self: center;
  width: 50%;
}

@media screen and (max-width: 750px) {
  .filter {
    width: 80%;
  }
}
@media screen and (max-width: 650px) {
  .filter {
    width: 100%;
  }
}

.hide {
  display: none;
}

.options {
  display: flex;
  justify-content: space-around;
  flex: 1;
}

@media screen and (max-width: 1000px) {
  .options {
    flex-direction: column-reverse;
  }
  .btn--add {
    margin-right: 0;
  }
}

/* Toast */
.toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: auto;
  max-width: 400px;
  background-color: #0d9263;
  color: #333;
  text-align: center;
  border: 1px solid #00381c;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, top 0.2s, visibility 0.2s;
  padding: 2rem;
}

.toast--visible {
  opacity: 1;
  top: 20px;
  visibility: visible;
}
