/* CoreTally.com Premium Search & Autocomplete Styles */

/* ---------------------------------------------------- */
/* 1. Live Autocomplete Suggestions Panel Styles         */
/* ---------------------------------------------------- */

.searchform {
  position: relative; /* Anchor the absolute suggestions panel */
}

.search-autocomplete-panel {
  position: absolute;
  top: 105%;
  left: 0;
  right: 0;
  background: rgba(13, 17, 23, 0.97); /* Rich dark carbon */
  backdrop-filter: blur(10px); /* Frosted glass aesthetic */
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 86, 179, 0.35); /* Subtle blue branding glow */
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  max-height: 380px;
  overflow-y: auto;
  z-index: 10000;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.25s;
}

.search-autocomplete-panel.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

/* Custom Scrollbar for Suggestions */
.search-autocomplete-panel::-webkit-scrollbar {
  width: 6px;
}
.search-autocomplete-panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}
.search-autocomplete-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 86, 179, 0.4);
  border-radius: 8px;
}
.search-autocomplete-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 86, 179, 0.7);
}

/* Individual Autocomplete Items */
.search-autocomplete-item {
  display: flex;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #ffffff;
  text-decoration: none;
  transition: background 0.2s ease, padding-left 0.2s ease;
  cursor: pointer;
}

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

.search-autocomplete-item:hover,
.search-autocomplete-item.active {
  background: rgba(0, 86, 179, 0.18); /* Premium blue highlight */
  padding-left: 20px; /* Micro-interaction sliding effect */
  text-decoration: none;
}

.search-autocomplete-item .item-icon {
  margin-top: 3px;
  margin-right: 12px;
  font-size: 14px;
  color: #0088ff;
  width: 20px;
  text-align: center;
}

.search-autocomplete-item .item-content {
  flex: 1;
  min-width: 0; /* Prevents overflow */
}

.search-autocomplete-item .item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.search-autocomplete-item .item-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dynamic Category Pills */
.category-pill {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  white-space: nowrap;
}

.category-pill.advisory {
  background: rgba(0, 136, 255, 0.15);
  color: #33a3ff;
  border: 1px solid rgba(0, 136, 255, 0.25);
}

.category-pill.saas {
  background: rgba(0, 245, 212, 0.12);
  color: #00f5d4;
  border: 1px solid rgba(0, 245, 212, 0.25);
}

.category-pill.blog {
  background: rgba(243, 156, 18, 0.12);
  color: #f39c12;
  border: 1px solid rgba(243, 156, 18, 0.25);
}

.category-pill.legal {
  background: rgba(189, 195, 199, 0.12);
  color: #bdc3c7;
  border: 1px solid rgba(189, 195, 199, 0.25);
}

.search-autocomplete-item .item-snippet {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Suggestions Info & Empty States */
.search-autocomplete-info {
  padding: 10px 16px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
}

.search-autocomplete-empty {
  padding: 20px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.search-autocomplete-empty i {
  display: block;
  font-size: 20px;
  color: #ff4757;
  margin-bottom: 8px;
}

/* ---------------------------------------------------- */
/* 2. Main Search Dashboard Styles (search.html)        */
/* ---------------------------------------------------- */

.search-highlight {
  background: rgba(241, 196, 15, 0.25) !important;
  color: #f1c40f !important;
  border-radius: 3px;
  padding: 0 4px;
  font-weight: 600;
  border-bottom: 1px solid rgba(241, 196, 15, 0.5);
}

/* Filter Controls */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.filter-item {
  margin-right: 10px;
  margin-bottom: -1px;
}

.filter-btn {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #666666;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.filter-btn:hover {
  color: #0056b3;
}

.filter-btn.active {
  color: #0056b3;
  border-bottom-color: #0056b3;
}

.filter-btn .filter-count {
  font-size: 11px;
  background: rgba(0, 86, 179, 0.1);
  color: #0056b3;
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 6px;
  font-weight: 700;
}

.filter-btn.active .filter-count {
  background: #0056b3;
  color: #ffffff;
}

/* Results Grid & Cards */
#search-results-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.search-result-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1),
              box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1),
              border-color 0.3s ease;
}

.search-result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 86, 179, 0.2);
}

.search-result-card .result-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: rgba(0, 86, 179, 0.07);
  border-radius: 50%;
  color: #0056b3;
  font-size: 20px;
  margin-right: 20px;
  flex-shrink: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

.search-result-card:hover .result-icon-container {
  background: #0056b3;
  color: #ffffff;
}

.search-result-card .result-body {
  flex: 1;
  min-width: 0;
}

.search-result-card .result-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.search-result-card .result-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin: 0;
  line-height: 1.3;
}

.search-result-card .result-title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.search-result-card .result-title a:hover {
  color: #0056b3;
}

.search-result-card .result-snippet {
  font-size: 14px;
  color: #666666;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.search-result-card .result-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: #999999;
}

.search-result-card .result-link {
  color: #0056b3;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-result-card .result-link:hover {
  text-decoration: underline;
}

/* High-End No Results / CTA Card */
.search-empty-state {
  text-align: center;
  padding: 50px 30px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
  margin-top: 10px;
}

.search-empty-state .empty-icon {
  font-size: 54px;
  color: #ff4757;
  margin-bottom: 20px;
}

.search-empty-state h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.search-empty-state p {
  font-size: 15px;
  color: #666666;
  max-width: 500px;
  margin: 0 auto 24px auto;
  line-height: 1.6;
}

.search-empty-state .suggestions-box {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  max-width: 450px;
  margin: 0 auto 30px auto;
  text-align: left;
}

.search-empty-state .suggestions-box h5 {
  font-size: 13px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.search-empty-state .suggestions-box ul {
  padding-left: 20px;
  margin: 0;
  font-size: 13px;
  color: #555555;
}

.search-empty-state .suggestions-box li {
  margin-bottom: 4px;
}

/* Consultation Form in Search Empty State */
.empty-cta-box {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 30px;
  max-width: 600px;
  margin: 0 auto;
}

.empty-cta-box h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #0056b3;
  margin-bottom: 6px;
}

.empty-cta-box p {
  font-size: 13px;
  margin-bottom: 20px;
}

.empty-cta-box .btn-cta-consult {
  background: #0056b3;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 86, 179, 0.3);
}

.empty-cta-box .btn-cta-consult:hover {
  background: #004085;
  transform: translateY(-2px);
  color: #ffffff;
  text-decoration: none;
}
