/* =====================================================
   Search Modal (収蔵目録照会モーダル)
   ===================================================== */

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-modal.hidden {
  display: none;
}

/* 背景オーバーレイ */
.search-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* モーダルウィンドウ本体 */
.search-modal__content {
  position: relative;
  width: min(92vw, 680px);
  padding: 2.25rem;
  background: #141922;
  color: #e2e8f0;
  border-radius: 10px;
  border: 1px solid rgba(184, 145, 80, 0.4);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: search-modal-appear 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes search-modal-appear {
  0% { transform: translateY(12px) scale(0.98); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* 見出し */
.search-modal__content h2 {
  margin: 0 0 1.5rem 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f6f1e3;
  border-bottom: 1px solid rgba(184, 145, 80, 0.25);
  padding-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-modal__content h2::before {
  content: "📖";
  font-size: 1.1rem;
}

/* 検索結果リスト */
.search-modal__body {
  font-size: 0.95rem;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px 6px;
  /* カスタムスクロールバー */
  scrollbar-width: thin;
  scrollbar-color: rgba(184, 145, 80, 0.4) transparent;
}

.search-modal__body::-webkit-scrollbar {
  width: 6px;
}

.search-modal__body::-webkit-scrollbar-thumb {
  background: rgba(184, 145, 80, 0.35);
  border-radius: 3px;
}

.search-result-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-result-list li {
  margin: 0;
}

.search-result-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(184, 145, 80, 0.28);
  border-left: 4px solid rgba(184, 145, 80, 0.6);
  color: #f8fafc;
  text-decoration: none;
  font-family: var(--font-serif);
  line-height: 1.6;
  letter-spacing: 0.03em;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* 右端のリンクインジケーター */
.search-result-list a::after {
  content: "照会 →";
  font-size: 0.82rem;
  font-weight: 600;
  color: #b89150;
  flex-shrink: 0;
  letter-spacing: 0.05em;
  transition: transform 0.25s ease, color 0.25s ease;
}

/* ホバー時: 外側にはみ出さず親枠で絶対に切れないリッチなインナーグロー＆グラデーション */
.search-result-list a:hover {
  background: linear-gradient(90deg, rgba(184, 145, 80, 0.18) 0%, rgba(184, 145, 80, 0.05) 100%);
  border-color: rgba(212, 175, 55, 0.65);
  border-left-color: #e2b46c;
  color: #fffdf5;
  box-shadow: inset 0 0 14px rgba(212, 175, 55, 0.12), 0 2px 10px rgba(0, 0, 0, 0.35);
}

.search-result-list a:hover::after {
  color: #e2b46c;
  transform: translateX(3px);
}

/* ヒントメッセージ */
.search-hint {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 1.25rem;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid #b89150;
  border-radius: 4px;
}

/* アクションボタン */
.search-modal__actions {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
}

.search-modal__actions button {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 24px;
  border-radius: 5px;
  border: 1.5px solid #64748b;
  background: #1e293b;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.search-modal__actions button:hover {
  background: #334155;
  color: #fef08a;
  border-color: #b89150;
  box-shadow: 0 0 10px rgba(184, 145, 80, 0.3);
}

@media (max-width: 480px) {
  .search-modal__content {
    padding: 1.5rem 1.25rem;
    width: 95vw;
  }
  .search-result-list a {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
  }
}
