/* Search Page Styles */

/* ===== Main Layout ===== */
.content {
  /* Inherits from analyses layout - no additional styles needed */
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}

.breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--primary-dark);
}

.breadcrumbs span {
  margin: 0 8px;
  color: #999;
}

/* ===== Search Form ===== */
.search-form-container {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font: 400 16px/1.4 'Roboto';
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.1);
}

.search-input::placeholder {
  color: #999;
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font: 500 16px/1.4 'Roboto';
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--primary-dark);
}

.search-btn svg {
  flex-shrink: 0;
}

/* ===== Search Results Header ===== */
.search-results-header {
  margin-bottom: 24px;
}

.results-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0;
}

.query-highlight {
  color: var(--accent);
  font-weight: 700;
}

.results-count {
  font-weight: 400;
  color: #666;
  font-size: 18px;
}

/* ===== Empty States ===== */
.empty-state,
.search-placeholder {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-top: 32px;
}

.empty-icon,
.placeholder-icon {
  margin-bottom: 24px;
}

.empty-icon svg,
.placeholder-icon svg {
  color: #ccc;
  margin: 0 auto;
  display: block;
}

.empty-title,
.placeholder-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}

.empty-description,
.placeholder-description {
  font-size: 16px;
  color: #666;
  margin: 0 0 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-suggestions {
  margin-bottom: 32px;
}

.suggestions-title {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  margin: 0 0 12px;
}

.suggestions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: #777;
}

.suggestions-list li {
  margin-bottom: 6px;
}

.suggestions-list li:before {
  content: "• ";
  color: var(--primary);
  font-weight: bold;
  margin-right: 8px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font: 500 16px/1.4 'Roboto';
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

/* ===== Mobile Responsiveness ===== */
@media (max-width: 768px) {
  .search-input-wrapper {
    flex-direction: column;
    gap: 16px;
  }

  .search-input {
    width: 100%;
  }

  .search-btn {
    width: 100%;
    justify-content: center;
  }

  .results-title {
    font-size: 18px;
  }

  .empty-state,
  .search-placeholder {
    padding: 40px 16px;
  }

  .empty-title,
  .placeholder-title {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .search-form-container {
    padding: 16px;
  }

  .search-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* ===== Search Autocomplete ===== */
.search-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 80px; /* Leave space for search button */
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font: 400 14px/1.4 'Roboto';
  color: var(--text);
  transition: background-color 0.2s ease;
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: #f8f9fa;
  color: var(--primary-dark);
}

.autocomplete-item.selected {
  background: var(--primary);
  color: #fff;
}

/* Mobile autocomplete adjustments */
@media (max-width: 768px) {
  .search-autocomplete {
    right: 0; /* Full width on mobile */
  }
}
