@charset "UTF-8";
/* =====================
*
検索結果モーダル
*
=====================*/

/* SearchResultコンポーネントで、PCとモバイルで指定するclassNameを分岐させている
 * PC:desktop-search-result-panel
 * モバイル：search-result-panel
*/

/* PC：検索結果パネル */
.desktop-search-result-panel,
.desktop-search-result-single-panel {
  position: fixed;
  top: 100px;
  left: 20px;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(var(--glass-blur, 8px)) saturate(var(--glass-saturate, 120%));
  backdrop-filter: blur(var(--glass-blur, 8px)) saturate(var(--glass-saturate, 120%));
  color: rgb(51, 51, 51);
  border-radius: 20px;
  padding: 12px 16px 10px;
  height: auto;
  max-height: calc(90vh - 150px);
  min-height: 110px;
  overflow: auto;
  box-shadow: rgba(0, 0, 0, 0.12) 0px -8px 32px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  font-family: inherit;
  display: block;
  opacity: 1;
  transform: translateY(0px);
  transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* モバイル：検索結果パネル */
/* モバイル専用クラスなので下部のmediaで二重に制御せずここに記述 */
.search-result-panel,
.search-result-single-panel {
  position: fixed;
  /* 広告バナーの高さ分上に移動 */
  bottom: 50px;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  color: var(--text-color);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 8px 12px 4px 12px;
  height: auto;
  max-height: 30vh;
  min-height: 80px;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid var(--shadow-color);
  box-sizing: border-box;
  animation: slideInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(20px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
}

.search-result-panel.is-collapsed,
.search-result-single-panel.is-collapsed {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ヘッダー部分 */
.search-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  font-size: 16px;
  color: var(--text-color);
  font-weight: 600;
  padding: 2px 0;
}

.search-result-header h3 {
  margin: 0;
  padding: 0;
  color: var(--text-color);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  gap: 6px;
}

.result-header {
  margin-bottom: 12px;
}

.result-details {
  margin-bottom: 16px;
}

.action-btn {
  padding: 10px 16px;
  border: none;
  background: #5fa3f4;
  color: var(--bg-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 20px;
  min-width: fit-content;
  box-sizing: border-box;
  position: relative;
  margin: 2px 0;
}

.action-btn:hover {
  transform: translateY(-1px);
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn i {
  font-size: 14px;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVGアイコン用の優先スタイル */
.action-btn i.svg-icon-white {
  color: transparent;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.action-btn.save {
  margin-left: 0;
}

.action-btn.save:hover {
  transform: translateY(-1px);
}

.action-btn.route {
  margin-left: 0;
}

.action-btn.route:hover {
  transform: translateY(-1px);
}


.search-type-label {
  font-size: 12px;
  color: #666;
  font-weight: normal;
  margin: 0;
  padding: 0;
  line-height: 1.0;
  opacity: 0.8;
}

.close-search-result-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 1px 3px var(--shadow-color);
  transition: background-color 0.3s ease;
  flex-shrink: 0;
  transform: none;
}

.close-search-result-btn:hover {
  background: rgba(255, 255, 255, 1);
  color: var(--text-color);
  transform: none;
}

/* SVGアイコンのサイズ調整 */
.close-search-result-btn i {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.search-result-content {
  line-height: 1.1;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* スクロールバー */
.search-result-panel::-webkit-scrollbar {
  width: 3px;
}

.search-result-panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 2px;
}

.search-result-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.search-result-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ---------------------
モーダル用
---------------------*/
.result-card {
  padding: 0;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  border-bottom: none;
  cursor: default;
  transition: none;
  display: flex;
  flex-direction: column;
}

.result-card:hover {
  background: none;
  transform: none;
}

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

/* ヘッダー（名称）*/
.result-header {
  margin-bottom: 12px;
  order: 1;
}

.result-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-distance {
  font-size: 11px;
  color: #6b7280;
  background: rgba(107, 114, 128, 0.1);
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: 400;
}

.result-reading {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 300;
  opacity: 0.7;
}

/* 詳細情報 */
.result-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  order: 2;
}

.result-details>div {
  margin: 0;
  padding: 0;
  line-height: 1.1;
}

.detail-item {
  margin: 0;
  padding: 0;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-item.interactive {
  cursor: pointer;
  padding: 8px 12px;
  margin: 0 -12px;
  border-radius: 8px;
  transition: background-color 0.15s ease, transform 0.15s ease;
  position: relative;
}

.detail-item.interactive:hover {
  background: rgba(59, 130, 246, 0.05);
  transform: translateX(2px);
}

.detail-text {
  text-align: left;
  font-size: 14px;
  line-height: 1.2;
  padding-top: 5px;
}

.detail-text.address {
  color: #6b7280;
  line-height: 1.2em;
  /* テキストが複数行になることを許可する */
  white-space: normal;
  /* 長い単語でも強制的に折り返すようにする */
  word-wrap: break-word;
  overflow-wrap: break-word;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  /* 初期表示行数 */
  -webkit-line-clamp: 3;
  /* はみ出たテキストを隠し、クランプを有効にする */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ホバーで全文表示 */
@media (hover: hover) {
  .detail-text.address:hover {
    display: block;
    /* 行数制限を解除 */
    -webkit-line-clamp: unset;
  }
}

.detail-text.phone {
  color: #2563eb;
  font-weight: 500;
  margin-bottom: 16px;
}

.search-result-actions-compact {
  display: flex;
  gap: 8px;
  margin-top: 0;
  align-items: center;
  padding: 12px 0 0 0;
  flex-wrap: wrap;
  justify-content: center;
}

.result-card.clickable-result {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 0;
  cursor: pointer;
  text-align: left;
}

.result-card.clickable-result:hover {
  background: rgba(59, 130, 246, 0.03);
  transform: none;
}

.result-card.clickable-result:last-child {
  border-bottom: none;
}

.result-card.clickable-result .result-header {
  margin-bottom: 3px;
}

.result-card.clickable-result .result-title {
  font-size: 14px;
  line-height: 1.2;
  margin-bottom: 0;
}

.result-card.clickable-result .result-details {
  gap: 1px;
  margin-bottom: 0;
}

.result-card.clickable-result .detail-item {
  margin-bottom: 1px;
  line-height: 1.2;
}

.result-card.clickable-result .detail-item:last-child {
  margin-bottom: 0;
}

.result-card.clickable-result .detail-text {
  font-size: 14px;
  line-height: 1.2;
}

/* 検索結果：名称リンク＋電話帳アイコン */
.result-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.result-name {
  color: inherit;
  text-decoration: none;
  flex: 1;
}

.phonebook-link {
  display: inline-block;
}

.phonebook-link .svg-icon-blue {
  width: 20px;
  height: 20px;
  margin: 0;
  display: inline-block;
  vertical-align: middle;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* アクセシビリティ: リンクのキーボードフォーカスを明示 */
.result-name:focus-visible,
.phonebook-link:focus-visible {
  outline: 2px solid var(--focus-color, #3b82f6);
  outline-offset: 2px;
  border-radius: 4px;
}

/* アイコンサイズ調整 */
.result-card.clickable-result .svg-icon-blue {
  width: 14px;
  height: 14px;
}

/* === サイズ別の指定 === */

/* 768px以下のモバイルタブレット用 */
@media (max-width: 768px),
(hover: none) and (pointer: coarse) {

  /* モバイル・タブレットでは検索結果は閉じる代わりに折りたたみボタン */
  .collapse-search-result-btn {
    width: auto;
    height: 28px;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--secondary-color);
    cursor: pointer;
  }

  .collapse-search-result-btn i {
    width: 24px;
    height: 24px;
  }

  .search-result-content {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
  }

  .search-result-header {
    padding: 4px 0;
    margin-bottom: 8px;
  }

  .search-result-header h3 {
    font-size: 15px;
    line-height: 1.2;
  }

  .result-title {
    font-size: 15px;
    line-height: 1.1;
  }

  .result-details {
    gap: 1px;
    margin-bottom: 4px;
  }

  .detail-item {
    margin-bottom: 1px;
    padding: 0;
  }

  .detail-item:last-child {
    margin-bottom: 0;
  }

  .detail-item.interactive {
    padding: 8px 12px;
    margin: 0 -12px;
  }

  .interaction-hint {
    opacity: 1;
  }

  .search-type-label {
    font-size: 11px;
    margin: 1px 0 3px 0;
    opacity: 0.8;
  }

  /* スクロールバー */
  .search-result-panel::-webkit-scrollbar {
    width: 4px;
  }

  /* クリック可能カード */
  .result-card.clickable-result {
    padding: 6px 0;
  }

  .result-card.clickable-result .result-title {
    font-size: 13px;
  }

  .result-card.clickable-result .svg-icon-blue {
    width: 12px;
    height: 12px;
  }
}