/**
 * Full Screen Search Overlay CSS - Matches provided design
 * Add this file to your css folder and enqueue it
 */

/* Full Screen Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-content {
  width: 100%;
  max-width: 800px;
  padding: 0 2rem;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 1.2rem;
  padding: 0.5rem 0;
  font-family: "Inter", sans-serif;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
}

.search-submit-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-submit-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.search-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-close:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

/* Search Suggestions */
.search-suggestions {
  max-height: 60vh;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.suggestions-content {
  padding: 1rem;
}

.suggestion-group {
  margin-bottom: 2rem;
}

.suggestion-group:last-child {
  margin-bottom: 0;
}

.suggestion-group-title {
  color: var(--primary-gold);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
}

.suggestion-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateX(5px);
}

.suggestion-icon {
  color: var(--primary-gold);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.suggestion-content {
  flex: 1;
  min-width: 0;
}

.suggestion-title {
  color: var(--white);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.suggestion-excerpt {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.suggestion-date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

.search-match {
  background: var(--primary-gold);
  color: var(--black);
  padding: 0.1em 0.2em;
  border-radius: 3px;
  font-weight: 600;
}

.loading {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  padding: 2rem;
  font-style: italic;
}

.no-suggestions {
  text-align: center;
  padding: 3rem 2rem;
  color: rgba(255, 255, 255, 0.7);
}

.no-suggestions p {
  margin-bottom: 0.5rem;
}

.suggestion-tip {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Prevent body scroll when search is active */
body.search-overlay-active {
  overflow: hidden;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .search-overlay {
    padding-top: 5vh;
  }

  .search-overlay-content {
    padding: 0 1rem;
  }

  .search-container {
    gap: 1rem;
  }

  .search-input {
    font-size: 1.1rem;
  }

  .search-input::placeholder {
    font-size: 1.1rem;
  }

  .search-suggestions {
    max-height: 70vh;
  }

  .suggestion-item {
    padding: 0.75rem;
  }

  .suggestion-title {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .search-overlay-content {
    padding: 0 0.5rem;
  }

  .search-container {
    gap: 0.75rem;
  }

  .search-input-wrapper {
    padding: 0.6rem 0.8rem;
  }

  .search-input {
    font-size: 1rem;
  }

  .search-input::placeholder {
    font-size: 1rem;
  }
}

/* Custom Scrollbar for Suggestions */
.search-suggestions::-webkit-scrollbar {
  width: 8px;
}

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

.search-suggestions::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border-radius: 4px;
}

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

/* Animation for suggestions */
.suggestion-item {
  animation: fadeInUp 0.3s ease-out;
}

.suggestion-item:nth-child(1) {
  animation-delay: 0.05s;
}
.suggestion-item:nth-child(2) {
  animation-delay: 0.1s;
}
.suggestion-item:nth-child(3) {
  animation-delay: 0.15s;
}
.suggestion-item:nth-child(4) {
  animation-delay: 0.2s;
}
.suggestion-item:nth-child(5) {
  animation-delay: 0.25s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
