/* ================================
   Header Search Button
   ================================ */
.header-search-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-light, #e2e8f0);
  background: transparent;
  color: var(--primary-blue, #0a2f8a);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.header-search-btn:hover {
  background: var(--primary-blue, #0a2f8a);
  color: #fff;
  border-color: var(--primary-blue, #0a2f8a);
}

/* Show on desktop only */
@media (min-width: 1024px) {
  .header-search-btn {
    display: flex;
  }
}

/* ================================
   Search Overlay
   ================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Backdrop */
.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 18, 53, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Close button */
.search-overlay-close {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.search-overlay-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Inner content */
.search-overlay-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  padding: 0 24px;
}

/* Search form */
.search-overlay-form {
  margin-bottom: 32px;
}

.search-overlay-input-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-overlay-input-wrap:focus-within {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.search-overlay-icon {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.4);
}

.search-overlay-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-weight: 400;
  color: #fff;
  font-family: inherit;
}

.search-overlay-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* Popular searches */
.search-overlay-popular {
  padding: 0 4px;
}

.search-popular-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 16px;
}

.search-popular-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-popular-link {
  display: block;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.search-popular-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ================================
   Search Results (for future use)
   ================================ */
.search-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-results-header {
  padding: 0 4px 10px;
}

.search-results-count {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: #fff;
  transition: all 0.2s ease;
  cursor: pointer;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* No results state */
.search-no-results {
  text-align: center;
  padding: 40px 20px;
}

.search-no-results p {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 6px;
}

.search-no-results span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ================================
   Animation — overlay entrance
   ================================ */
.search-overlay-inner {
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.search-overlay.is-open .search-overlay-inner {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.05s;
}

/* ================================
   Hide overlay on mobile
   ================================ */
@media (max-width: 1023px) {
  .search-overlay {
    display: none !important;
  }
}
