﻿#tmp-visible-tags .search-wrapper {
    position: relative;
    width: min(100%, 500px);
    margin-bottom: 10px
}

#tmp-visible-tags .search-input {
    width: 100%;
    padding: 10px 36px 10px 36px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 14px;
    box-sizing: border-box;
}

#tmp-visible-tags .search-icon,
#tmp-visible-tags .clear-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #888;
    cursor: pointer;
}

#tmp-visible-tags .search-icon {
    left: 10px;
}

#tmp-visible-tags .clear-icon {
    right: 10px;
    display: none; /* hidden by default */
}

#tmp-visible-tags .search-input:not(:placeholder-shown) + .clear-icon {
    display: block;
}
	
#tmp-visible-tags {
  font-family: system-ui, sans-serif;
  font-size: 15px;
  margin: 2em 0;
  line-height: 1.4;
}

#tmp-visible-tags .tag-toc {
  margin-bottom: 1.5em;
  font-weight: bold;
  font-size: 0.95em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

#tmp-visible-tags .tag-toc a {
  display: inline-block;
  padding: 4px 8px;
  background: #eef2f7;
  border-radius: 4px;
  color: #0073aa;
  text-decoration: none;
  transition: background 0.2s ease;
}

#tmp-visible-tags .tag-toc a:hover {
  background: #d8e9fc;
  color: #005c99;
}

#tmp-visible-tags .tag-section {
  margin-bottom: 2.5em;
}
#tmp-visible-tags .tag-heading {
  font-size: 1.25em;
  font-weight: bold;
  margin-bottom: 0.6em;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.3em;
}

#tmp-visible-tags .tag-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

#tmp-visible-tags .tag-item {
  display: block;
  padding: 8px 12px;
  background-color: #f4f4f4;
  border-radius: 6px;
  text-decoration: none;
  color: #222;
  font-size: 14px;
  word-break: break-word;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

#tmp-visible-tags .tag-item:hover {
  background-color: #e8f0fe;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

#tmp-visible-tags.searching .tag-section, #tmp-visible-tags.searching .tag-item {
  display: none;
}

#tmp-visible-tags.searching .tag-item.matched {
  display: block;
}

#tmp-visible-tags.searching .tag-section:has(.tag-item.matched) {
  display: block;
}