/* Search Suggestions Styles - Sakura Theme */
.search-suggestions {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  background: linear-gradient(135deg, #fff5f8 0%, #ffffff 100%);
  border: 2px solid #ffc0d3;
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 24px rgba(255, 182, 210, 0.25), 0 4px 12px rgba(255, 105, 180, 0.15);
  overflow: hidden;
  z-index: 99999 !important;
  margin-top: 0 !important;
  backdrop-filter: blur(10px);
  min-width: 300px;
}

.search-suggestion-item {
  display: block;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid rgba(255, 192, 211, 0.3);
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  word-wrap: break-word;
}

.search-suggestion-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 182, 210, 0.15), transparent);
  transition: left 0.5s ease;
}

.search-suggestion-item:hover::before {
  left: 100%;
}

.search-suggestion-item:hover {
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
  transform: translateX(4px);
  border-left: 3px solid #ff69b4;
  padding-left: calc(1rem - 3px);
}

.search-suggestion-item:last-of-type {
  border-bottom: none;
}

.search-suggestion-title {
  font-weight: 600;
  color: #d63384;
  margin-bottom: 0.15rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.search-suggestion-title::before {
  content: '🌸';
  margin-right: 0.4rem;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.search-suggestion-title mark {
  background: linear-gradient(135deg, #ffd3e5 0%, #ffb3d1 100%);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  color: #d63384;
  box-shadow: 0 2px 4px rgba(255, 105, 180, 0.2);
  white-space: normal;
  word-break: break-word;
}

.search-suggestion-excerpt {
  font-size: 0.8rem;
  color: #6c757d;
  line-height: 1.3;
  padding-left: 1.25rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  max-width: 100%;
  word-break: break-word;
}

.search-suggestion-view-all {
  display: block;
  padding: 0.5rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, #ffe4ec 0%, #ffd3e5 100%);
  color: #d63384;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0 0 10px 10px;
  transition: all 0.3s ease;
  border-top: 1px solid rgba(255, 192, 211, 0.4);
}

.search-suggestion-view-all:hover {
  background: linear-gradient(135deg, #ffd3e5 0%, #ffb3d1 100%);
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
}

.search-suggestion-view-all::after {
  content: ' →';
  display: inline-block;
  transition: transform 0.3s ease;
}

.search-suggestion-view-all:hover::after {
  transform: translateX(4px);
}

.search-suggestion-loading,
.search-suggestion-empty,
.search-suggestion-error {
  padding: 1rem;
  text-align: center;
  color: #ff69b4;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #fff5f8 0%, #ffffff 100%);
}

.search-suggestion-loading::before {
  content: "🌸 ";
  animation: spin 2s linear infinite;
  display: inline-block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.search-suggestion-error {
  color: #dc3545;
}

.search-suggestion-error::before {
  content: "🥀 ";
}

/* Adjust search form positioning */
#search,
#menu-search-form {
  position: relative;
  z-index: 999;
}

/* Prevent search form from blocking menu button when not visible */
#header #search {
  overflow: visible !important;
  pointer-events: none;
}

#header #search.visible {
  overflow: visible !important;
  pointer-events: auto;
}

#search input,
#menu-search-form input {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

/* Ensure menu button stays clickable above search form */
#header nav.main .menu {
  position: relative;
  z-index: 1001;
  pointer-events: auto;
}

/* Mobile responsive */
@media (max-width: 736px) {
  .search-suggestions {
    font-size: 0.9rem;
    border-radius: 0 0 10px 10px;
  }
  
  .search-suggestion-item {
    padding: 0.7rem 1rem;
  }
  
  .search-suggestion-title::before {
    font-size: 0.8rem;
  }
}
