@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");

html {
  box-sizing: border-box;
  font-size: 62.5%;
}

* {
  margin: 0;
  padding: 0;
}

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

*:focus {
  outline: 4px dotted #f9fafb;
  outline-offset: 4px;
}

*:focus:not(:focus-visible) {
  outline: 0;
  box-shadow: none;
}

*::selection {
  background-color: #0b6b0e;
  color: #f9fafb;
}

*::-webkit-scrollbar {
  width: 4px;
}

*::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 24px;
}

*::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 24px;
}

body::-webkit-scrollbar-thumb {
  background: #0b6b0e;
  border-radius: 24px;
}

body {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 1.6rem;
  color: #f9fafb;
  background-image: url(../images/hero-img.jpg);
  background-size: cover;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6.4rem;
  padding: 3.2rem 0;
}

.logo {
  width: 32rem;
}

.container {
  display: flex;
  gap: 3.2rem;
  width: 80%;
}

.text-box {
  background-color: rgba(249, 250, 251, 0.3);
  -webkit-backdrop-filter: blur(3.2rem);
  backdrop-filter: blur(3.2rem);
  width: 50%;
  padding: 2.4rem;
  border: 1px solid rgba(249, 250, 251, 0.3);
  border-radius: 3.2rem;
}

.nav-pills {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  list-style: none;
  position: relative;
  padding-bottom: 1.2rem;
}

.nav-pills::after {
  content: "";
  width: 100%;
  height: 1px;
  background-color: rgba(249, 250, 251, 0.3);
  position: absolute;
  bottom: 0;
}

.nav-item {
  padding: 0.8rem 1.6rem;
  border-radius: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-item:hover {
  background-color: rgba(249, 250, 251, 0.15);
}

.nav-item.nav-item--active {
  background-color: rgba(249, 250, 251, 0.3);
}

.dropdown {
  border-radius: 100rem;
  height: 3.6rem;
  width: 3.6rem;
  display: flex;
  justify-content: center;
}

.dropdown__icon {
  transition: all 0.2s;
}

.rotate {
  transform: rotate(-180deg);
}

.dropdown__menu {
  list-style: none;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  background-color: rgba(249, 250, 251, 0.15);
  padding: 1.6rem;
  border: 1px solid rgba(249, 250, 251, 0.15);
  border-radius: 0 0 2.4rem 2.4rem;
  z-index: 1;
  position: absolute;
  left: 0;
  width: 100%;
  height: 22.5rem;
  display: grid;
  grid-template-columns: repeat(4, 23.5%);
  column-gap: 2%;
  grid-auto-rows: min-content;
  row-gap: 1.2rem;
  transform: translateY(4rem);
  transition: all 0.2s;
  /* overflow-y: scroll; */
}

.show {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.dropdown__item {
  padding: 1rem 2rem;
  border-radius: 1rem;
  transition: all 0.2s;
}

.dropdown__item:hover {
  background-color: rgba(249, 250, 251, 0.15);
}

.dropdown__content {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.4rem;
  white-space: nowrap;
}

.nav-icon {
  margin-left: auto;
}

.text-area-container {
  position: relative;
  margin: 2.4rem 0 1.2rem;
}

.text-area {
  resize: none;
  border: none;
  overflow: auto;
  outline: none;
  width: 90%;
  height: 20rem;
  font: inherit;
  color: inherit;
  margin-bottom: 2.4rem;
  padding: 0 1.6rem;
  background-color: transparent;
  transition: all 0.2s;
}

.color-transparent {
  color: transparent;
}

.letters-limit {
  font-size: 1.2rem;
  position: absolute;
  bottom: 0;
  right: 0;
}

.action-box {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.icon {
  width: 1.6rem;
}

.icon-box {
  background-color: rgba(249, 250, 251, 0.15);
  border-radius: 1.2rem;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s;
}

.icon-box:hover {
  background-color: rgba(249, 250, 251, 0.3);
}

.icon-mt {
  margin-top: 0.883rem;
}

.icon-box--text-area {
  position: absolute;
  top: 0;
  right: 0;
  transition: all 0.2s;
}

.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.btn {
  border: none;
  border-radius: 1.2rem;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
  padding: 1.2rem 2.4rem;
  background-color: #1c8520;
  color: inherit;
  font: inherit;
  transition: all 0.2s;
}

.btn:hover {
  background-color: #0b6b0e;
}

@media only screen and (min-width: 120em) {
  body {
    font-size: 2.4rem;
  }

  .logo {
    width: 38rem;
  }

  .icon {
    width: 2.2rem;
  }

  .icon-box {
    border-radius: 1.6rem;
    padding: 1.2rem;
  }

  .icon-mt {
    margin-top: 0.968rem;
  }

  .dropdown__menu {
    transform: translateY(4.6rem);
    overflow-y: scroll;
  }

  .dropdown__content {
    font-size: 1.8rem;
  }

  .letters-limit {
    font-size: 1.6rem;
  }
}

@media only screen and (min-width: 48em) and (max-width: 90em) {
  body {
    font-size: 1.8rem;
  }

  .logo {
    width: 30rem;
  }

  .container {
    flex-direction: column;
  }

  .icon {
    width: 1.8rem;
  }

  .icon-box {
    border-radius: 1.4rem;
  }

  .icon-mt {
    margin-top: 0.933rem;
  }

  .text-box {
    width: 100%;
  }

  .dropdown__menu {
    transform: translateY(4.1rem);
    overflow-y: scroll;
  }

  .dropdown__content {
    font-size: 1.6rem;
  }

  .letters-limit {
    font-size: 1.4rem;
  }
}

@media only screen and (max-width: 48em) {
  .logo {
    width: 28rem;
  }

  .container {
    flex-direction: column;
    width: 90%;
  }

  .text-box {
    width: 100%;
  }
}

@media only screen and (max-width: 33.5em) {
  body {
    font-size: 1.4rem;
  }

  .logo {
    width: 26rem;
  }

  .icon-box--text-area {
    bottom: -5.44rem;
    left: 5.2rem;
    top: unset;
    right: unset;
  }

  .text-box {
    padding: 1.6rem;
    border-radius: 2.4rem;
  }

  .nav-pills {
    gap: 1.2rem;
  }

  .nav-icon {
    position: absolute;
    bottom: -31rem;
    left: 5.2rem;
  }

  .text-area {
    width: 100%;
    padding: 0 0.8rem;
  }

  .dropdown__menu {
    padding: 1.2rem;
    border-radius: 0 0 2rem 2rem;
    grid-template-columns: repeat(2, 48%);
    column-gap: 4%;
    overflow-y: scroll;
  }
}

@media only screen and (max-width: 24.25em) {
  .nav-pills {
    flex-direction: column;
  }
}
