.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  padding: 0 20px;
  z-index: 1;
}

.header__left {
  display: none;
}

.header__logo {
  svg {
    width: 117px;
    height: 28px;
  }
}

.header__right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  column-gap: 10px;
}

.header__stats {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
  color: var(--gray-2);
  text-align: right;
}

.stats-title {
  font-weight: 600;
  margin-bottom: 0px;
  color: var(--text-main);
  text-align: center;
  font-size: 14px;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  margin-bottom: 0;
  margin-top: 0;
  padding: 0 0px;
}

.stats-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  margin-bottom: 0;
  margin-top: 0;
  padding: 0 0px;
}

.stats-label {
  font-size: 12px;
  color: var(--gray-2);
  margin-bottom: 0;
  margin-top: 0;
  padding: 0 0px;
}

.stats-value {
  color: var(--highlight);
  font-weight: 600;
  font-size: 12px;
  margin-top: 0;
}

.stats-item {
  white-space: nowrap;
}

.stats-item span {
  color: var(--highlight);
  font-weight: 600;
  margin-left: 5px;
}

@media (max-width: 599px) {
  .header {
    background-color: var(--base-main);
    box-shadow: none;
    padding-bottom: 0;
  }
  
  .header__right {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }
  
  .header__theme-switch {
    margin-bottom: 0;
  }
  
  .header__stats {
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    margin-right: 0px;
    margin-top: 0px;
    padding: 10px 20px;
    background-color: var(--base-main);
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
  
  .header__stats .stats-title {
    margin-bottom: 0px;
    text-align: center;
    width: 100%;
  }
  
  .header__stats .stats-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    width: 100%;
  }
  
  /* Add padding to main element to account for the stats bar */
  main {
    padding-top: 60px;
  }
}

.theme-switch {
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  background-color: var(--base-quaternary);
  border: 1px solid var(--border);
  border-radius: 28px;

  svg {
    path[stroke] {
      stroke: var(--gray-2);
    }
  }
}

.theme-switch:hover {
  border-color: var(--hover-text);

  svg {
    path[stroke] {
      stroke: var(--hover-text);
    }
  }
}

.theme-switch__icon-dark {
  display: none;
}

.header__link {
  display: flex;
  align-items: center;
  column-gap: 8px;
  color: var(--gray-2);

  svg {
    path[stroke] {
      stroke: var(--gray-2);
    }

    path[fill] {
      fill: var(--gray-2);
    }
  }

  span:nth-of-type(2) {
    color: var(--highlight);
  }
}

.header__link:hover {
  color: var(--hover-text);

  svg {
    path[stroke] {
      stroke: var(--hover-text);
    }

    path[fill] {
      fill: var(--hover-text);
    }
  }

  span {
    color: var(--hover-text);
  }

  span:nth-of-type(1) {
    text-decoration: underline;
  }
}

.header__theme-switch,
.header__profile {
  display: flex;
}

.header__wishlist {
  span:nth-of-type(1) {
    display: none;
  }
}

/*dark theme*/
body.dark-theme {
  .theme-switch__icon-dark {
    display: block;
  }

  .theme-switch__icon-light {
    display: none;
  }
}

/*desktop*/
@media (min-width: 600px) {
  .header {
    display: grid;
    grid-template-columns: 1fr 142px 1fr;
    column-gap: 40px;
    width: calc(100% - 80px);
    max-width: 1600px;
    height: 80px;
    margin: 20px auto;
    padding: 0 40px;
    background-color: var(--base-main);
    border-radius: 8px;
  }

  .header--bottom-merges {
    margin: 20px auto 0;
  }

  .header__left {
    display: flex;
    column-gap: 40px;
  }

  .header__logo {
    svg {
      width: 142px;
      height: 34px;
    }
  }

  .header__right {
    column-gap: 15px;
    align-items: flex-start;
  }

  .header__stats {
    margin-top: 0;
    padding-top: 2px;
  }
  
  .stats-title {
    font-size: 14px;
    margin-bottom: 0px;
    font-weight: 600;
    color: var(--text-main);
  }
  
  .stats-row {
    gap: 2px;
  }
  
  .stats-column {
    min-width: 70px;
    gap: 2px;
    margin-bottom: 0;
    margin-top: 0;
  }
  
  .stats-label {
    font-size: 12px;
    margin-bottom: 0;
    margin-top: 0;
  }
  
  .stats-value {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 0;
    margin-top: 0;
  }

  .header__wishlist {
    span:nth-of-type(1) {
      display: block;
    }
  }
}
