.blog-tools {
  margin: 1.35rem 0 1.5rem;
}

.blog-tools [hidden] {
  display: none;
}

.blog-search-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-search {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #999;
  border-radius: 0;
  padding: 0.35rem 0.45rem;
  background: var(--background-color);
  color: var(--text-color);
  font: inherit;
}

.blog-search:focus {
  outline: 1px solid var(--link-color);
  outline-offset: 1px;
}

.blog-tag-suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  max-height: min(20rem, 55vh);
  overflow-y: auto;
  border: 1px solid #999;
  background: var(--background-color);
  box-shadow: 0 0.3rem 0.8rem rgb(0 0 0 / 12%);
}

.blog-tag-suggestion-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}

.blog-tag-suggestion-list li {
  margin: 0;
}

.blog-tag-suggestion-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.32rem 0.55rem;
  text-decoration: none;
}

.blog-tag-suggestion-list a:hover,
.blog-tag-suggestion-list a.is-active {
  background: rgb(127 127 127 / 12%);
  text-decoration: none;
}

.blog-tag-suggestion-count {
  flex: 0 0 auto;
  color: var(--text-color);
  opacity: 0.6;
}

.blog-tag-suggestion-empty {
  margin: 0;
  padding: 0.55rem;
  color: var(--text-color);
  opacity: 0.7;
}

.blog-random-refresh,
.blog-tag-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--link-color);
  font: inherit;
  white-space: nowrap;
}

.blog-random-refresh:hover,
.blog-tag-link:hover {
  text-decoration: underline;
}

.blog-featured-tags {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.65rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.blog-featured-tags::-webkit-scrollbar {
  display: none;
}

.blog-tag-link {
  flex: 0 0 auto;
}

.blog-random-refresh {
  display: inline-block;
  margin: 0.75rem 0 0;
}

.blog-search-results {
  margin-top: 1.35rem;
}

.blog-random-list,
.blog-search-list,
.blog-year-list,
.blog-taxonomy-list,
.home-post-list {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
}

.blog-random-list li,
.blog-search-list li,
.blog-year-list li,
.blog-taxonomy-list li,
.home-post-list li {
  display: flex;
  gap: 0.45rem;
  margin: 0.18rem 0;
}

.blog-taxonomy-list li {
  justify-content: space-between;
}

.blog-year {
  margin: 1.35rem 0 0.1rem;
  font-size: 1.05em;
}

.blog-archive a {
  text-decoration: none;
}

.blog-archive a:hover {
  text-decoration: underline;
}

.blog-post-date {
  flex: 0 0 4.8rem;
  color: var(--text-color);
}

.blog-random-list .blog-post-date,
.blog-search-list .blog-post-date {
  flex-basis: 6.9rem;
}

.blog-year-list a,
.blog-search-list a,
.blog-random-list a,
.blog-taxonomy-list a,
.home-post-list a {
  min-width: 0;
}

.blog-year-list a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-random-list a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-taxonomy-list span,
.blog-taxonomy-back {
  color: var(--text-color);
}

.home-post-list .blog-post-date {
  flex-basis: 6.9rem;
}

@media (max-width: 420px) {
  .blog-tag-suggestions {
    max-height: 45vh;
  }

  .blog-random-list li,
  .blog-search-list li,
  .blog-year-list li,
  .blog-taxonomy-list li,
  .home-post-list li {
    gap: 0.35rem;
  }

  .blog-post-date {
    flex-basis: 4.35rem;
  }

  .blog-random-list .blog-post-date {
    flex-basis: 6.35rem;
  }

  .blog-search-list .blog-post-date {
    flex-basis: 6.35rem;
  }

  .home-post-list .blog-post-date {
    flex-basis: 6.35rem;
  }

  .home-post-list a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
