#book-search-container {
  margin: 20px;
  position: relative;
}

.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

#book-search {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

#book-search:focus {
  outline: none;
  border-color: #333;
}

#book-search:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  max-height: 400px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.search-result-item {
  padding: 6px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
  background-color: #f5f5f5;
}

.search-result-item.selected {
  background-color: #e8e8e8;
}

.result-title {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-right: 8px;
}

.result-title mark {
  background-color: #fffacd;
  padding: 2px 0;
  font-weight: bold;
}

.result-publisher {
  font-size: 13px;
  color: #666;
}

.no-results {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

@media (max-width: 768px) {
  #book-search-container {
    margin: 15px 10px;
  }
  
  #book-search {
    font-size: 16px; /* iOSのズーム防止 */
    padding: 8px 10px;
  }
  
  .search-results {
    max-height: 300px;
  }
  
  .search-result-item {
    padding: 5px 12px;
  }
  
  .result-title {
    font-size: 14px;
  }
  
  .result-publisher {
    font-size: 12px;
  }
}
