/* 検索トグルボタン（右上固定位置のスタイル - 使用しない） */
.search-toggle-button:not(.footer-button) {
  display: none;
}

/* フッターの検索ボタンは他のフッターボタンと同じスタイルを継承 */
.footer-button.search-toggle-button {
  /* footer-buttonのスタイルを優先させるため、特別な上書きは不要 */
  position: static !important; /* 固定位置を無効化 */
  top: auto !important;
  right: auto !important;
  background: linear-gradient(135deg, #3498db, #2980b9) !important; /* フッターボタンと同じ */
}

/* フッター検索ボタンのホバー効果は footer-button のものを使用 */
.footer-button.search-toggle-button:hover {
  background: linear-gradient(135deg, #2980b9, #1f639a) !important; /* フッターボタンと同じホバー */
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4) !important;
}

/* 検索パネル */
.search-panel {
  position: fixed;
  top: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 800px;
  max-height: calc(100vh - 6rem);
  background: rgba(0, 0, 0, 0.95);
  color: white;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: var(--z-overlay);
  display: none;
  overflow-y: auto;
}

/* 検索パネルヘッダー */
.search-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.search-panel-title {
  font-size: 16px;
  font-weight: bold;
  color: white;
}

.search-close-button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.search-close-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* 検索ボックス */
.search-box-container {
  padding: 16px;
}

.manual-search-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  box-sizing: border-box;
}

.manual-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.manual-search-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
}

/* 検索結果パネル */
.search-result-panel {
  max-height: 300px;
  overflow-y: auto;
  padding: 0 16px 16px 16px;
  display: none;
}

/* 検索結果アイテム */
.search-result-item {
  margin-bottom: 6px;
  padding: 6px 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.search-result-item:last-child {
  margin-bottom: 0;
}

/* 検索結果なしの表示 */
.search-no-result {
  background: rgba(231, 76, 60, 0.2);
  color: rgba(255, 255, 255, 0.9);
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  border: 1px solid rgba(231, 76, 60, 0.3);
  margin: 10px 0;
}

/* モバイル対応 */
@media (max-width: 768px) {
  .search-toggle-button {
    top: 1rem;
    right: 1rem;
    padding: 6px 12px;
    font-size: 0.9rem;
  }
  
  .search-panel {
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    transform: none;
    top: 3.5rem;
    max-height: calc(100vh - 6rem);
  }
  
  .search-panel-header {
    padding: 10px 12px;
  }
  
  .search-panel-title {
    font-size: 14px;
  }
  
  .search-box-container {
    padding: 12px;
  }
  
  .search-result-panel {
    padding: 0 12px 12px 12px;
  }
}

