/* Basic styles for KB plugin elements */

/* --- Search Form --- */
.ukb-search-form input[type="text"] {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 20px;
}

/* --- Category Container --- */
.ukb-category {
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* --- Category Heading --- */
.ukb-category h2 {
  color: #000000;
  border-bottom: 3px solid #B10202;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

/* --- Article List --- */
.ukb-article-list {
  list-style: none;
  padding-left: 0;
}

.ukb-article-list li {
  padding: 8px 12px;
  margin-bottom: 5px;
  border-left: 4px solid #B10202;
  background: #f9f9f9;
  transition: background 0.3s;
}

.ukb-article-list li:hover {
  background: #f0f0f0;
}

.ukb-article-list a {
  text-decoration: none;
  color: #B10202;
  font-weight: 500;
}

.ukb-article-list a:hover {
  color: #000000;
}

/* --- Child Categories --- */
.ukb-child-categories {
  list-style: none;
  padding-left: 20px;
  margin-top: 10px;
  border-left: 4px solid #B10202;
}

/* This rule targets only articles inside a sub-category and removes their individual border,
   preventing the "double line" effect. Articles in top-level categories are not affected. */
.ukb-child-categories .ukb-article-list li {
  border-left: none;
  padding-left: 16px;
}

.ukb-child-categories > li {
  margin-bottom: 15px;
}

/* Collapsible containers */
.ukb-collapsible {
  transition: max-height 0.3s ease;
  overflow: hidden;
}
.ukb-collapsible.collapsed {
  max-height: 0;
}

/* Top-level categories open by default */
.ukb-top-category {
  max-height: 1000px;
}

/* Subcategories */
.ukb-sub-category {
  background: #f8f8f8;
  margin-left: 20px;
  padding: 10px;
  border-left: 3px solid #B10202;
}

/* Toggle button styling */
.ukb-toggle-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  font-weight: bold;
  margin-bottom: 8px;
}
.ukb-toggle-icon {
  margin-right: 6px;
  color: #B10202;
}

/* Article list */
.ukb-article-list { /* your existing styles… */ }

/* --- Live Search Results --- */
.ukb-search-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #f5f5f5; /* Greyish background */
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ukb-result-item {
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.ukb-result-item:last-child {
  border-bottom: none;
}

.ukb-result-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: #b10202; /* Primary red color */
  text-decoration: none;
  margin-bottom: 5px;
}

.ukb-result-title:hover {
  color: #000000;
}

.ukb-result-meta {
  font-size: 0.85rem; /* Smaller font for metadata */
  color: #666;
}

.ukb-meta-divider {
  margin: 0 8px;
  color: #ccc;
}

.ukb-loading,
.ukb-no-results {
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  font-size: 1.1rem;
  color: #333;
}