/* Hewitt Matthews Knowledge Base - Enhanced CSS */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background: #1a1a1a;
  min-height: 100vh;
}

/* Header and Navigation */
.help-scout-header {
  background: #1a1a1a;
  color: white;
  padding: 2rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.help-scout-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #FFFFFF;
}

.help-scout-header p {
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

#docsSearch {
background-color: #1a1a1a;  
border-bottom: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#docsSearch h1 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-family: 'Poppins', sans-serif;
  line-height: 1.3;
}

.search-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1BE8CD, #037c77, #1BE8CD);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.search-query {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  background: #ffffff;
  color: #374151;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

.search-query:hover {
  border-color: #1BE8CD;
  box-shadow: 0 0 0 3px rgba(27, 232, 205, 0.1);
}

.search-query::placeholder {
  color: #a0a3ac;
  font-weight: 400;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.search-query:focus::placeholder {
  opacity: 0.5;
  transform: translateX(5px);
}

.search-query:focus {
  border-color: #1BE8CD;
  outline: none;
}

.search-query:focus + .search-input-wrapper::before {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

/* Search Loading State */
.search-loading {
  position: relative;
  pointer-events: none;
}

.search-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid #1BE8CD;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

/* Main Heading */
#docsSearch h1 {
  color: #FFFFFF;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-family: 'Poppins', sans-serif;
  line-height: 1.3;
}

#searchBar button[type="submit"] {
  background: #1BE8CD;
  font-family: 'Poppins', sans-serif;
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
}

#searchBar button[type="submit"] i.icon-search {
  color: #ffffff;
  transition: color 0.3s ease;
}

#searchBar button[type="submit"]:hover i.icon-search {
  color: #1BE8CD;
}
/* Search Suggestions */
.search-suggestions {
  background: #2a2a2a;
  border: 1px solid #404040;
  border-radius: 12px;
  margin-top: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.search-suggestion-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #404040;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #ffffff;
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestion-item:hover {
  background: #404040;
  color: #1BE8CD;
}

.search-suggestion-item:focus {
  background: #404040;
  color: #1BE8CD;
  outline: 2px solid #1BE8CD;
  outline-offset: -2px;
}

/* Search Results Dropdown */
#serp-dd {
  background: #ffffff;
  border: 1px solid #1BE8CD;
  border-radius: 6px;
  margin-top: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(27, 232, 205, 0.2);
}

#serp-dd .result {
  list-style: none;
  padding: 0;
  margin: 0;
}

#serp-dd .result li {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  color: #1BE8CD;
  font-family: 'Poppins', sans-serif;
}

#serp-dd .result li a {
  color: #1BE8CD !important;
  text-decoration: none;
}

#serp-dd .result li a:hover {
  color: #1BE8CD !important;
  text-decoration: underline;
}

#serp-dd .result li:last-child {
  border-bottom: none;
}

#serp-dd .result li:hover {
  color: #1BE8CD;
  text-decoration: underline;
}

.search-result-item {
  padding: 1.5rem;
  margin: 1rem 0;
  background: #1a1a1a;
  border-radius: 12px;
  border-left: 4px solid #1BE8CD;
  transition: all 0.3s ease;
}

.search-result-item:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 25px rgba(27, 232, 205, 0.2);
}

.search-result-title {
  color: #1BE8CD;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.search-result-excerpt {
  color: #a0a3ac;
  font-size: 0.95rem;
  line-height: 1.5;
}

.search-input:focus {
  border-color: #1BE8CD;
  box-shadow: 0 0 0 3px rgba(27, 232, 205, 0.1);
}

.search-input::placeholder {
  color: #94a3b8;
}

/* No Results Styling */
.no-results {
  text-align: center;
  padding: 3rem 2rem;
  color: #64748b;
  font-size: 1.1rem;
}

.no-results::before {
  content: "🔍";
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

/* Popular Articles Section */
.popular-articles {
  background: white;
  margin: 2rem auto;
  max-width: 800px;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.popular-articles h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

.popular-articles h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #1BE8CD;
  border-radius: 2px;
}

.popular-articles ul {
  list-style: none;
  padding: 0;
}

.popular-articles li {
  padding: 1rem 1.5rem;
  margin: 0.75rem 0;
  background: #ffffff;
  border-radius: 12px;
  border-left: 4px solid #1BE8CD;
  transition: all 0.3s ease;
  cursor: pointer;
}

.popular-articles li:hover {
  background: #f8fafc;
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(27, 232, 205, 0.15);
  border-left-color: #037c77;
}

.popular-articles li::before {
  content: "📚";
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

/* Category Sections */
.category-section {
  background: white;
  margin: 2rem auto;
  max-width: 800px;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.category-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.3s ease;
  cursor: pointer;
}

.category-section h3:hover {
  color: #1BE8CD;
}

.category-section h3::before {
  content: "📁";
  font-size: 1.5rem;
}

.category-section .article-count {
  background: #037c77;
  color: #1BE8CD;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: auto;
}

/* Footer */
.help-scout-footer {
  background: #292732;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
  border-top: 1px solid #1BE8CD;
}

.help-scout-footer p {
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.help-scout-footer a {
  color: #1BE8CD;
  text-decoration: none;
  transition: color 0.3s ease;
}

.help-scout-footer a:hover {
  color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
  #docsSearch {
    margin: 1.5rem 1rem;
    padding: 1.5rem;
    max-width: 100%;
  }
  
  #docsSearch h1 {
    color: #FFFFFF;
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .search-query {
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
  }
  
  #searchBar button[type="submit"] {
    padding: 0.625rem 1.25rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  #docsSearch {
    margin: 1rem;
    padding: 1rem;
  }
  
  #docsSearch h1 {
    color: #FFFFFF;
    font-size: 1.125rem;
    margin-bottom: 0.875rem;
  }
  
  .search-query {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  #searchBar button[type="submit"] {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .help-scout-header {
    padding: 1.5rem 0;
  }
  
  .help-scout-header h1 {
    font-size: 1.75rem;
  }
  
  .search-container,
  .popular-articles,
  .category-section {
    margin: 0.75rem;
    padding: 1rem;
  }
}

/* Loading States */
.loading {
  text-align: center;
  padding: 2rem;
  color: #64748b;
}

.loading::before {
  content: "⏳";
  font-size: 2rem;
  display: block;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Enhanced Focus States for Accessibility */
.search-input:focus,
.popular-articles li:focus,
.category-section:focus {
  outline: 2px solid #1BE8CD;
  outline-offset: 2px;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #1BE8CD 0%, #037c77 100%);
  border-radius: 5px;
  border: 2px solid #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #037c77 0%, #1BE8CD 100%);
  box-shadow: 0 0 10px rgba(27, 232, 205, 0.5);
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #1BE8CD #1a1a1a;
}

footer p a {
  display: none;
}

footer span {
    display: none;
}

#sidebar form button {  
    right: 0;
}

#sidebar h3 {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
}

#sidebar ul li a {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
}
#sidebar .nav-list li {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
}

#sidebar .nav-list li a {
    font-family: 'Poppins', sans-serif;
    color: #1BE8CD !important;
}

#sidebar .nav-list li a:hover {
    color: #1BE8CD !important;
    text-decoration: underline !important;
}

.navbar .navbar-inner {
    background-color: #1a1a1a;
}

/* Category List H3 Styling - White text by default */
.category-list h3,
.category-list a,
.category-list span,
.category-list div,
.category-list li {
    color: #ffffff !important;
}

/* Article count should always be teal, not white */
.category-list .article-count,
.category-list .article-count span,
.category-list .article-count .notranslate {
    color: #1BE8CD !important;
}

/* Category container styling */
.category-list > * {
    background-color: transparent !important;
}

/* Hover state - white background with dark text */
.category-list > *:hover {
    background-color: #ffffff !important;
}

.category-list > *:hover h3,
.category-list > *:hover a,
.category-list > *:hover span,
.category-list > *:hover div {
    color: #1a1a1a !important;
}

/* Article count on hover - should be black */
.category-list > *:hover .article-count,
.category-list > *:hover .article-count span,
.category-list > *:hover .article-count .notranslate,
.category-section > *:hover .article-count,
.category-section > *:hover .article-count span,
.category-section > *:hover .article-count .notranslate,
.category-section:hover .article-count,
.category-section:hover .article-count span,
.category-section:hover .article-count .notranslate {
    color: #1a1a1a !important;
}

/* Active state - white background with dark text */
.category-list > *.active {
    background-color: #ffffff !important;
}

.category-list > *.active h3,
.category-list > *.active a,
.category-list > *.active span,
.category-list > *.active div {
    color: #1a1a1a !important;
}

/* Article count on active - should be black */
.category-list > *.active .article-count,
.category-list > *.active .article-count span,
.category-list > *.active .article-count .notranslate,
.category-section > *.active .article-count,
.category-section > *.active .article-count span,
.category-section > *.active .article-count .notranslate,
.category-section.active .article-count,
.category-section.active .article-count span,
.category-section.active .article-count .notranslate {
    color: #1a1a1a !important;
}

/* Active + hover state */
.category-list > *.active:hover {
    background-color: #f8fafc !important;
}

.category-list > *.active:hover h3,
.category-list > *.active:hover a,
.category-list > *.active:hover span,
.category-list > *.active:hover div {
    color: #1a1a1a !important;
}

/* Article count on active + hover - should be black */
.category-list > *.active:hover .article-count,
.category-list > *.active:hover .article-count span,
.category-list > *.active:hover .article-count .notranslate,
.category-section > *.active:hover .article-count,
.category-section > *.active:hover .article-count span,
.category-section > *.active:hover .article-count .notranslate,
.category-section.active:hover .article-count,
.category-section.active:hover .article-count span,
.category-section.active:hover .article-count .notranslate {
    color: #1a1a1a !important;
}