@import 'src/global';

.profile-page {
  width: 100%;
  max-width: 640px;
  margin: auto;
  padding-bottom: 80px;
}

.profile-section {
  display: flex;
  width: 100%;
  margin-bottom: 20px;

  .profile-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;

    h2 {
      font-size: 56px;
      margin: 10px 0 10px -2px;
    }

    a {
      color: white;
      font-style: italic;
      max-width: calc(100vw - 60px);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }

  .profile-img {
    position: relative;
    width: 150px;
    height: 150px;

    img {
      border-radius: 100px;
      width: 100%;
      position: absolute;
      bottom: 0;
    }

    .profile-lvl {
      border: solid 5px $grey-4;
      background-color: #0099ff;
      position: absolute;
      display: flex;
      justify-content: center;
      align-items: center;
      bottom: 0;
      right: 0;
      border-radius: 25px;
      width: 50px;
      height: 50px;
    }
  }

  .nav-link {
    font-family: 'Circular', 'sans-serif';
    padding: 5px 8px;
    font-size: 1.1em;
    color: #fff;
    margin: 0px 12px;

    &:hover {
      cursor: pointer;
      border-bottom: 4px solid #fff;
      margin-bottom: -4px;
    }
  }

  .nav-link-selected {
    border-bottom: 4px solid #fff;
    margin-bottom: -4px;
  }
}

.challenge-list {
  flex-direction: column;
}

.profile-badges {
  width: 100%;
  overflow: hidden;
  padding: 16px 24px 16px 24px;
  margin: 5px auto;
  text-align: left;
  background-color: $grey-5;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 150px auto;
  align-items: center;

  h3 {
    margin-top: 0;
  }

  .profile-badge-icon {
    width: 100%;
    padding-right: 30px;
  }
}

.profile-challenge-div {
  position: relative;
}

.profile-challenge {
  width: 100%;
  overflow: hidden;
  padding: 12px 24px 12px 24px;
  margin: 5px auto;
  text-align: left;
  background-color: $grey-5;
  border-radius: 10px;
  display: grid;
  grid-template-columns: minmax(0, auto) 72px;
  align-items: center;
  color: white;

  h3 {
    margin: 5px 0;
  }

  .profile-challenge-info {
    color: $wgrey;
    font-size: 14px;
    margin-bottom: 4px;
  }
}

a .profile-challenge:hover {
  transition: all 0.2s ease-in-out;
  background-color: rgb(75, 75, 75);
}

.stats-div {
  display: flex;
  align-items: center;
  margin: 20px 0;
  margin-left: -10px;
}

.lvl-div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 10px;

  p {
    margin: 0;
    text-transform: uppercase;
    font-size: 12px;
  }

  h3 {
    font-size: 30px;
    margin: 2px 0 5px;
  }
}

.icon-container {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  display: flex;
  padding: 0 14px;
  align-items: center;
}

.tooltip {
  font-size: x-small;
  padding: 4px 8px;
  background-color: $grey-3;
  color: white;
  position: absolute;
  opacity: 1;
  top: -30px;
  right: -50%;
  width: auto;
  white-space: nowrap;
  border-radius: 2px;
  display: none;
}

.edit-icon {
  width: 20px;
  height: 20px;
  margin: 0 10px;
  display: inline-block;
  position: relative;
  vertical-align: middle;

  img {
    filter: invert(1);
    opacity: 0.4;
  }
}

.edit-icon:hover {
  img {
    opacity: 1;
  }

  .tooltip {
    display: block;
  }
}

.popup-title {
  text-align: left;
}

.absoluteCenter {
  margin: auto;
  position: fixed;
  top: 8%;
  left: 0;
  right: 0;
}

.overlay {
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 30;
}

.answer-module {
  background-color: black;
}

@media (max-width: 768px) {
  .profile-badges {
    grid-template-columns: 100px auto;
    font-size: 14px;
  }

  .absoluteCenter {
    top: 10%;
  }

  .answer-module {
    box-sizing: border-box;
    width: 95%;
    padding: 10px 20px;
  }
}
