/**
 * Search Sidebar CSS - Non-destructive search panel
 * Add this file to your css folder and enqueue it
 */

/* Desktop Search Sidebar */
.search-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  z-index: 9999;
  transition: right 0.3s ease;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.search-sidebar.active {
  right: 0;
}

.search-sidebar-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.search-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-sidebar-header h3 {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.search-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0.5rem;
  border-radius: 50%;
}

.search-close:hover {
  color: var(--primary-gold);
  background: rgba(255, 255, 255, 0.1);
}

.search-sidebar-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 0.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-sidebar-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: transparent;
  color: var(--white);
}

.search-sidebar-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-sidebar-form button {
  background: var(--primary-gold);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--black);
}

.search-sidebar-form button:hover {
  background: var(--dark-gold);
  transform: scale(1.05);
}

.search-results-container {
  flex: 1;
  overflow-y: auto;
}

.search-results {
  color: var(--white);
}

.results-header {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.results-header p {
  color: var(--primary-gold);
  font-size: 0.9rem;
  margin: 0;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-gold);
  transform: translateX(-5px);
}

.result-context {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--white);
}

.no-results {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Search Highlights - Only in results, not on page */
.search-highlight {
  background: var(--primary-gold);
  color: var(--black);
  padding: 0.1em 0.2em;
  border-radius: 3px;
  font-weight: 600;
}

/* Target highlight when jumping to content */
.search-target-highlight {
  background: rgba(212, 175, 55, 0.2) !important;
  border: 2px solid var(--primary-gold) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  padding: 0.5rem !important;
  margin: 0.25rem 0 !important;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .search-sidebar {
    width: 100vw;
    right: -100vw;
  }

  .search-sidebar-content {
    padding: 1rem;
  }

  .search-sidebar-header h3 {
    font-size: 1.3rem;
  }
}

/* Custom Scrollbar for Results */
.search-results-container::-webkit-scrollbar {
  width: 6px;
}

.search-results-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.search-results-container::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border-radius: 3px;
}

.search-results-container::-webkit-scrollbar-thumb:hover {
  background: var(--dark-gold);
}

/* Ensure search doesn't interfere with page content */
.search-sidebar * {
  pointer-events: auto;
}

body.search-active {
  overflow: hidden;
}
