/**
 * Search Component Styles
 * 
 * Minimal, clean design matching header style
 * No icons, just text and subtle highlighting
 * Cross-browser compatible (Chrome, Firefox, Safari, Edge)
 */

/* Search results indicator */
.search-results-indicator {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  padding: 4px 8px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 11px;
  font-family: 'Raleway', sans-serif;
  color: #666;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Search results panel */
.search-results-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 400px;
  max-width: 500px;
  max-height: 400px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-family: 'Raleway', sans-serif;
}

.search-results-panel__header {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #eee;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-results-panel__list {
  padding: 8px 0;
}

.search-results-panel__item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid #f5f5f5;
}

.search-results-panel__item:last-child {
  border-bottom: none;
}

.search-results-panel__item:hover {
  background: #f9f9f9;
}

.search-results-panel__item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.search-results-panel__icon {
  font-size: 14px;
  font-weight: bold;
  min-width: 16px;
}

.search-results-panel__icon--activatable {
  color: #28a745;
}

.search-results-panel__icon--visible {
  color: #333;
}

.search-results-panel__item-location {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-results-panel__item-snippet {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-results-panel__item-snippet strong {
  font-weight: 600;
  color: #000;
}

.search-results-panel__empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: #999;
}

.search-results-panel__more {
  padding: 12px 16px;
  text-align: center;
  font-size: 12px;
  color: #666;
  background: #f9f9f9;
  border-top: 1px solid #eee;
}

/* Search highlight in content */
mark.search-highlight {
  background-color: #fff3cd;
  color: #000;
  padding: 2px 0;
  border-radius: 2px;
  font-weight: inherit;
  font-style: inherit;
}

/* Active/current search highlight */
mark.search-highlight--active {
  background-color: #ffc107;
  font-weight: 500;
}

/* Search input focus state */
.header__nav__item--search input:focus {
  outline: none;
  border-bottom-color: #000;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .search-results-indicator {
    display: none !important;
  }
  
  .search-results-panel {
    min-width: 300px;
    max-width: 90vw;
    right: -20px;
  }
}

@media (max-width: 768px) {
  .search-results-panel {
    position: fixed;
    top: 80px;
    left: 10px;
    right: 10px;
    max-width: none;
  }
}

/* Safari-specific fixes */
@supports (-webkit-appearance: none) {
  .search-results-panel {
    -webkit-overflow-scrolling: touch;
  }
}
