/* 答案検索用のスタイル */
.answer-search-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 答案検索用のハイライト */
.answer-area .answer-highlight {
  background-color: yellow;
}

/* 現在選択中のハイライト */
.answer-area .answer-current {
  background-color: orange !important;
}

/* 答案検索カウンター */
.answer-count {
  font-size: 14px;
  color: #666;
}

/* 答案検索ボタンのスタイル（法令検索ボタンと同じ配色） */
#answerSearchBtn,
#answerReplaceBtn,
#answerPrevBtn,
#answerNextBtn {
  padding: 6px 12px;
  font-size: 13px;
  background: #1554d0;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* ホバー時の効果 */
#answerSearchBtn:hover,
#answerReplaceBtn:hover,
#answerPrevBtn:not(:disabled):hover,
#answerNextBtn:not(:disabled):hover {
  background: #0d3fa0;
}

/* 無効状態のボタン */
#answerPrevBtn:disabled,
#answerNextBtn:disabled {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
}

.answer-search-modal {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

/* ★ 変更: search-modal-inner を横一行のレイアウトに */
#answerSearchModalBox .search-modal-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* ★ 追加: 2行目に境界線を追加 */
#answerSearchModalBox .search-modal-inner:nth-child(2) {
  border-top: 1px solid #eee;
  padding-top: 8px;
  margin-top: 4px;
}

/* ★ 変更: 閉じるボタンの位置調整（最初の行の最後に配置） */
#closeAnswerSearchModal {
  order: 999;
  margin-left: auto;
}

.search-section,
.replace-section,
.navigation-section {
  display: flex;
  gap: 8px;
  align-items: center;
}

.replace-section {
  border-top: 1px solid #eee;
  padding-top: 8px;
}

#answerSearchInput,
#answerReplaceInput {
  flex: 1;
  min-width: 200px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.answer-replace-buttons {
  display: flex;
  align-items: center;
  /* justify-content: space-between; */
  gap: 8px;
}

#answerReplaceSingleBtn:disabled,
#answerReplaceAllBtn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.d-flex {
  display: flex;
}