.pageAccount {
  height: 100%;

  .accountVerificatinNotice {
    background: var(--bg-color);
    border-radius: var(--roundness);
    box-shadow: 0 0 0 0.2rem var(--sub-alt-color);
    // background: color-mix(in srgb, var(--sub-alt-color) 50%, transparent);
    // background: var(--sub-alt-color);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    .icon {
      font-size: 2rem;
      margin-left: 1rem;
      margin-right: 1rem;
      color: var(--sub-color);
    }
    button {
      padding: 1rem;
    }
  }

  .content {
    gap: 2rem;
  }

  .sendVerificationEmail {
    cursor: pointer;
  }

  .triplegroup {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;

    .text {
      align-self: center;
      color: var(--sub-color);
    }
  }

  .group {
    &.estimatedWordsTyped {
      display: flex;
      align-items: center;
      justify-content: center;
      .title {
        margin-right: 1rem;
      }
    }

    &.resultBatches {
      display: grid;
      grid-template-areas: "bar button" "text text";
      grid-template-columns: 2fr 1fr;
      column-gap: 1rem;
      .title {
        grid-area: title;
        margin-bottom: 0;
      }
      & > .text {
        grid-area: text;
        text-align: center;
      }
      button {
        grid-area: button;
      }
      .leftText,
      button,
      .rightText {
        align-self: center;
      }
      .bars {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 0.25rem 1rem;
      }
      .rightText {
        color: var(--sub-color);
        font-size: 0.8em;
        line-height: 1.25em;
      }
      .bar {
        height: 0.5rem;
        border-radius: var(--roundness);
        background: var(--sub-alt-color);
        position: relative;
        align-self: center;
        .fill {
          transition: width 0.125s;
          height: 100%;
          width: 0%;
          background: var(--main-color);
          border-radius: var(--roundness);
        }

        //not used for now
        .indicator {
          position: absolute;
          width: max-content;
          bottom: 0;
          .line {
            width: 0.1em;
            height: 1.5em;
            background: var(--sub-color);
            border-radius: var(--roundness);
            right: 0;
            position: absolute;
            top: 0;
          }
          .text {
            font-size: 0.5em;
            color: var(--sub-color);
            margin-right: 1em;
          }
        }
      }
    }

    &.noDataError {
      margin: 20rem 0;
      text-align: center;
    }

    &.aboveHistory {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      .exportCSV {
        grid-column: 3/4;
      }
    }

    &.createdDate {
      text-align: center;
      color: var(--sub-color);
    }

    &.personalBestTables {
      .tables {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
      }
    }

    .chart canvas {
      width: 100% !important;
    }

    &.history {
      table td {
        -webkit-appearance: unset;
      }

      table tr {
        border-radius: var(--roundness);
      }

      .active {
        animation: accountRowHighlight 5s linear 0s 1;
      }

      .loadMoreButton {
        background: var(--sub-alt-color);
        color: var(--text-color);
        text-align: center;
        padding: 0.5rem;
        border-radius: var(--roundness);
        cursor: pointer;
        -webkit-transition: 0.25s;
        transition: 0.25s;
        -webkit-user-select: none;
        display: -ms-grid;
        display: grid;
        -ms-flex-line-pack: center;
        align-content: center;
        margin-top: 1rem;

        &:hover,
        &:focus {
          color: var(--bg-color);
          background: var(--text-color);
        }
      }
    }

    .title {
      color: var(--sub-color);
      // margin-bottom: 0.25em;
    }

    .avgres {
      font-size: 0.75em;
    }

    .val {
      font-size: 3rem;
      line-height: 1.1;
    }

    .chartjs-render-monitor {
      width: 100% !important;
    }

    &.chart {
      position: relative;

      .above {
        display: flex;
        justify-content: center;
        margin-bottom: 1rem;
        color: var(--sub-color);
        flex-wrap: wrap;
        row-gap: 0.5em;

        .group {
          display: flex;
          align-items: center;
        }

        .fas,
        .punc {
          margin-right: 0.25rem;
        }

        .spacer {
          width: 1rem;
        }
      }

      .below {
        text-align: center;
        color: var(--sub-color);
        margin-top: 1rem;
        display: grid;
        grid-template-columns: auto 500px;
        gap: 1rem;
        align-items: center;
        .text {
          height: min-content;
        }
        .buttons {
          font-size: 0.75rem;
          display: grid;
          gap: 0.5rem;
          grid-template-columns: 1fr 1fr 1fr 1fr;
        }
      }
      .chart {
        height: 400px;
      }
      .chartPreloader {
        position: absolute;
        width: 100%;
        background: rgba(0, 0, 0, 0.5);
        height: 100%;
        display: grid;
        align-items: center;
        justify-content: center;
        font-size: 5rem;
        text-shadow: 0 0 3rem black;
      }
    }
  }

  table {
    border-spacing: 0;
    border-collapse: collapse;
    color: var(--text-color);

    td {
      padding: 0.5rem 0.5rem;
    }

    thead {
      color: var(--sub-color);
      font-size: 0.75rem;
    }

    tbody tr:nth-child(odd) {
      background: var(--sub-alt-color);
    }

    tbody td:nth-child(1) {
      border-radius: var(--roundness) 0 0 var(--roundness);
    }
    tbody td:last-child {
      border-radius: 0 var(--roundness) var(--roundness) 0;
    }

    td.infoIcons span {
      margin: 0 0.1rem;
    }
    .miniResultChartButton {
      transition: 0.25s;
      cursor: pointer;
      color: var(--text-color);
      &:hover {
        opacity: 1;
      }
      &.loading {
        pointer-events: none;
      }
      &.disabled .fas {
        opacity: 0.5;
        color: var(--sub-color);
      }
    }
  }

  td:has(.resultEditTagsButton) {
    padding: 0;
  }

  .resultEditTagsButton {
    opacity: 0.5;
    &.active {
      color: var(--text-color);
    }
    &:hover,
    &:focus-visible,
    &.active {
      opacity: 1;
    }
  }
  //remove flashHighlight from .group.History .active
  .group.history .resultEditTagsButton {
    animation: none;
  }

  .group {
    .buttonsAndTitle {
      height: fit-content;
      display: grid;
      gap: 0.5rem;
      color: var(--sub-color);

      .title {
        display: flex;
        align-items: baseline;
        .fab,
        .fas,
        .far {
          margin-right: 0.5em;
        }
      }
    }

    &.presetFilterButtons {
      .buttons {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
        gap: 1rem;
        .filterPresets {
          display: grid;
          grid-template-columns: 1fr auto;
          gap: 0.5rem;
        }
      }
    }

    &.topFilters {
      .buttons {
        display: flex;
        justify-content: space-evenly;
        gap: 1rem;
        button {
          width: 100%;
        }
      }
    }

    //advanced filters
    &.filterButtons {
      gap: 1rem;
      display: grid;
      grid-template-columns: 1fr 1fr;

      .buttons {
        display: grid;
        grid-auto-flow: column;
        gap: 0.5rem;
      }

      .tripleSelectsColumn {
        grid-column: 1/-1;
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
        .buttonsAndTitle {
          flex-grow: 1;
          min-width: 20rem;
        }
      }

      &.testDate .buttons,
      &.languages .buttons,
      &.layouts .buttons,
      &.funbox .buttons,
      &.tags .buttons {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-flow: unset;
      }
    }
  }
}
.testActivity {
  // width: max-content;
  // justify-self: center;
  background: var(--sub-alt-color);
  border-radius: var(--roundness);
  padding: 1rem;
  display: flex;
  justify-content: center;

  --gap-size: 0.25em;
  --font-size: 1em;

  .wrapper {
    width: 100%;
    max-width: 80em;
    display: grid;
    grid-template-columns: min-content 1fr;
    grid-template-rows: min-content 1fr min-content;
    gap: 1em 1em;
    grid-template-areas:
      "top top"
      "day chart"
      "empty month";
    // grid-template-areas:
    //   "empty month"
    //   "day chart"
    //   "top top";
    // font-size: 0.75rem;
  }

  .note {
    grid-column: span 2;
    text-align: center;
    font-size: 0.6em;
    color: var(--sub-color);
  }

  .top {
    grid-area: top;
    display: grid;
    grid-template-columns: 15rem 1fr max-content;
    grid-template-areas: "title title legend";
    gap: 1rem;
    &:has(.year) {
      grid-template-areas: "year title legend";
    }
  }

  .ss-main {
    border: 0.2em solid var(--bg-color);
  }

  .yearSelect,
  .months div,
  .days div,
  .daysFull div,
  .legend {
    color: var(--sub-color);
  }

  .year {
    grid-area: year;
    font-size: var(--font-size);
  }

  .title {
    grid-area: title;
    text-align: left;
    font-size: var(--font-size);
    color: var(--sub-color);
    align-self: center;
  }

  .months {
    grid-area: month;
    display: grid;
    grid-template-columns: repeat(53, 1fr);

    div {
      width: 100%;
      text-align: center;
    }
    font-size: var(--font-size);
  }

  .daysFull {
    margin-right: 2rem;
  }

  .days,
  .daysFull {
    grid-area: day;
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    align-items: center;
    // div {
    // display: grid;
    // overflow: hidden;
    // align-items: center;
    // }
    .text {
      display: flex;
      height: 0;
      align-items: center;
      font-size: var(--font-size);
    }
  }

  .days {
    display: none;
  }

  .nodata {
    grid-area: chart;
  }

  .activity {
    grid-area: chart;
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 1fr);
    grid-template-columns: repeat(53, 1fr);
    gap: var(--gap-size);
    // width: max-content;
    // max-width: 100%;

    div {
      &:hover {
        border: 2px solid var(--text-color);
      }
      &[data-level="filler"]:hover {
        border: none;
      }
    }
  }
  .legend {
    grid-area: legend;
    display: flex;
    gap: var(--gap-size);
    justify-content: flex-end;
    align-self: center;
    align-items: center;

    span {
      font-size: var(--font-size);
      &:first-child {
        margin-right: var(--gap-size);
      }
      &:last-child {
        margin-left: var(--gap-size);
      }
    }
  }
  .activity div,
  .legend div {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--gap-size);
    place-self: center;

    &[data-level="filler"] {
      background: none;
    }
    &[data-level="0"] {
      background-color: color-mix(
        in srgb,
        var(--bg-color) 50%,
        var(--sub-alt-color)
      );
      background-color: var(--bg-color);
    }
    &[data-level="1"] {
      background-color: color-mix(
        in srgb,
        var(--main-color) 20%,
        var(--sub-alt-color)
      );
    }

    &[data-level="2"] {
      background-color: color-mix(
        in srgb,
        var(--main-color) 50%,
        var(--sub-alt-color)
      );
    }

    &[data-level="3"] {
      background-color: color-mix(
        in srgb,
        var(--main-color) 75%,
        var(--sub-alt-color)
      );
    }

    &[data-level="4"] {
      background-color: var(--main-color);
    }
  }

  .legend div {
    width: 1em;
    height: 1em;
  }
}
