/* Tag Filter Styles */

.tag-filter-container {
  margin-bottom: 1.5em;
}
.tag-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75em;
}
.tag-filter-tags {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375em;
  max-height: 1.875em;
  overflow: hidden;
}
.tag-filter-container.expanded .tag-filter-tags {
  max-height: 500px;
}
.tag-filter-tags .tag-btn {
  flex-shrink: 0;
}
.tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  padding: 0.35em 0.75em;
  font-size: 0.8125em;
  font-family: inherit;
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 1em;
  cursor: pointer;
  color: #828282;
  transition: all 0.15s ease;
}
.tag-btn:hover {
  border-color: #2a7ae2;
  color: #2a7ae2;
}
.tag-btn.active {
  background: #2a7ae2;
  border-color: #2a7ae2;
  color: white;
}
.tag-btn.filtered-out,
.tag-btn.collapsed-hidden {
  display: none;
}
.tag-clear-btn {
  padding-left: 0.5em;
  padding-right: 0.5em;
}
.tag-clear-btn:hover {
  color: #d14;
  border-color: #d14;
}
.tag-expand-btn {
  padding-left: 0.5em;
  padding-right: 0.5em;
}
.tag-expand-btn svg {
  transition: transform 0.2s ease;
}
.tag-filter-container.expanded .tag-expand-btn svg {
  transform: rotate(180deg);
}
.tag-count {
  font-size: 0.85em;
  opacity: 0.7;
}

/* Search input */
.tag-search-wrapper {
  position: relative;
  flex-shrink: 0;
}
.tag-search {
  width: 120px;
  padding: 0.35em 0.75em;
  padding-right: 1.75em;
  font-size: 0.8125em;
  font-family: inherit;
  border: 1px solid #e8e8e8;
  border-radius: 1em;
  outline: none;
  transition: border-color 0.15s ease;
}
.tag-search:focus {
  border-color: #2a7ae2;
}
.tag-search::placeholder {
  color: #aaa;
}
.tag-search-clear {
  position: absolute;
  right: 0.5em;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.125em;
  height: 1.125em;
  padding: 0;
  background: #e8e8e8;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #828282;
  transition: all 0.15s ease;
}
.tag-search-clear:hover {
  background: #d14;
  color: white;
}

/* RSS feed links */
.rss-tag-link {
  display: none;
}
.rss-tag-link.visible {
  display: inline;
}
.rss-tag-link.visible ~ .rss-tag-link.visible::before,
.rss-tag-link.visible ~ .rss-everything-link::before {
  content: "\00b7";
  color: #828282;
  text-decoration: none;
  display: inline-block;
  padding: 0 0.4em;
  pointer-events: none;
}

/* Post list filtering */
.post-list li.hidden {
  display: none;
}

/* Mobile responsive */
@media screen and (max-width: 600px) {
  .tag-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5em;
  }
  .tag-search-wrapper {
    width: 100%;
  }
  .tag-search,
  .tag-search:focus {
    width: 100%;
    box-sizing: border-box;
  }
}
