@charset "UTF-8";
/**
 * SP のトピックス一覧の開閉バー（topic-list-bar.js。見積19-2・19-3）
 * シェブロンのボタンの代わりに、一覧の上端のバーで開閉する。PC では出さない。
 */

.topic-list-bar {
  display: none;
}

@media (max-width: 991.98px) {
  /* バーは一覧の白い面の最上部（プロジェクトタイトル・検索欄の直上）に置く（v3 モックと同じ）。
     角丸はバーが受け持ち、直下のプロジェクトタイトルの面は角を落として白い面をつなげる */
  .topic-list-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* 拡大率が半端な表示（開発者ツールの Fit to window など）では、境目が小数の位置になり、
       直下の白い面との間に背景の地図が細く透けることがある（実機確認の指摘）。
       白い面を下へ伸ばして直下の面と重ね、同じだけ margin で詰めてヘッダの高さは変えない。
       縮小表示（0.33 倍程度）でも 1 デバイスピクセル以上重なるよう 3px とする */
    --topic-list-bar-overlap: 3px;
    height: calc(22px + var(--topic-list-bar-overlap));
    margin: 0 0 calc(var(--topic-list-bar-overlap) * -1);
    padding: 0 0 var(--topic-list-bar-overlap);
    border: 0;
    border-radius: 2rem 2rem 0 0;
    background: #fff;
    touch-action: none;
    cursor: grab;
    /* ヘッダは透明な部分で地図を触れるよう pointer-events: none なので、バーだけ受け付ける */
    pointer-events: auto;
  }

  .topic-list-content-header:has(.topic-list-bar)
    [data-sp-placement-of="card-project-main-content-footer"]
    .card-project-main-content-footer.px-3.pt-2.pb-2 {
    border-radius: 0;
  }

  .topic-list-bar-handle {
    display: block;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background-color: #c9c8c3;
  }

  /* 開閉できない状態（一覧に何も無い・検索結果が 0 件）では、開閉できると誤解されないよう
     つまみを隠して操作も受けない。白い面はそのまま残す（ヘッダの高さを変えないため） */
  .topic-list-content.not-have-topic-list-content .topic-list-bar,
  .topic-list-content.not-have-all-search-target .topic-list-bar {
    pointer-events: none;
    cursor: default;
  }

  .topic-list-content.not-have-topic-list-content .topic-list-bar-handle,
  .topic-list-content.not-have-all-search-target .topic-list-bar-handle {
    visibility: hidden;
  }

  /* シェブロンのボタンは見えなくする。操作行の中央寄せの計算（map-tilt.css）を崩さないよう、場所は残す */
  .topic-list-content-toggle-module {
    visibility: hidden;
  }

  /* 指に追従させている間は、一覧の移動のアニメーションを止める */
  .topic-list-content.is-bar-dragging {
    transition: none !important;
  }

  /* 一覧が動いている間（バーで動かしている間・開閉のアニメーション中。body.is-topic-list-moving）は、
     一覧と一緒に動く地図のボタン（+/-・3D/2D・上へ積んだ切り替えボタン・現在地・初期表示に戻す）を
     いったん消し、開いた／閉じた位置に収まってから表示し直す（実機確認後のユーザー判断。Google の帰属表示と同じ扱い） */
  .topic-list-content-header-controller,
  [data-sp-placement-of="gmap-viewmode-controls"] {
    transition: opacity 0.2s ease-out;
  }

  body.is-topic-list-moving .topic-list-content-header-controller,
  body.is-topic-list-moving [data-sp-placement-of="gmap-viewmode-controls"] {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease-out;
  }

  /* 一覧が動いている間は、Google のロゴと帰属表示（白いカードの上端に付けてある。gmaps.css）を
     いったん消し、開いた／閉じた位置に収まってから表示し直す。動かしている間に追従させると、
     毎フレーム位置を計算し直すことになるため */
  body:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom.leaflet-left
    > div:not(.leaflet-control),
  body:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom.leaflet-right
    > div:not(.leaflet-control),
  body:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom
    .leaflet-control-attribution {
    transition: transform 0.3s ease-out, opacity 0.2s ease-out;
  }

  body.is-topic-list-moving:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom.leaflet-left
    > div:not(.leaflet-control),
  body.is-topic-list-moving:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom.leaflet-right
    > div:not(.leaflet-control),
  body.is-topic-list-moving:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom
    .leaflet-control-attribution {
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.1s ease-out;
  }

  /* 下のカードを一度だけ少しのぞかせる（topic-list-peek.js）。一覧の位置は変えず translate で上げて戻す。
     一覧の上端に合わせてある Google のロゴと帰属表示も同じだけ動かす（帰属が一覧に隠れないように） */
  body.is-topic-list-peek-animating .main-fill-top-contents.topic-list-content,
  body.is-topic-list-peek-animating:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom.leaflet-left
    > div:not(.leaflet-control),
  body.is-topic-list-peek-animating:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom.leaflet-right
    > div:not(.leaflet-control),
  body.is-topic-list-peek-animating:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom
    .leaflet-control-attribution {
    /* 一覧には開閉のアニメーションが style 属性で付いているため、動かす間だけ上書きする */
    transition: translate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }

  body.is-topic-list-peek-up .main-fill-top-contents.topic-list-content,
  body.is-topic-list-peek-up:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom.leaflet-left
    > div:not(.leaflet-control),
  body.is-topic-list-peek-up:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom.leaflet-right
    > div:not(.leaflet-control),
  body.is-topic-list-peek-up:not(.is-view-expand)
    .leaflet-container.gmap-mode:not(.gmap-picker-map)
    .leaflet-bottom
    .leaflet-control-attribution {
    translate: 0 calc(-1 * var(--topic-list-peek-lift, 46px));
  }
}
