/* =========================================
   Google Maps attribution ラベル + ⓘボタン
   （配置は使用箇所のCSSで決める。ここではコンポーネント自体の見た目のみ）
========================================= */
.google-attribution {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.google-attribution__logo {
  height: 12px;
  width: auto;
  display: block;
}

.google-attribution__info-btn {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: #70757a;
  cursor: pointer;
}

.google-attribution__info-btn:focus-visible {
  outline: 2px solid #4285f4;
  outline-offset: 2px;
}

/* Tasty共通Glass UI（ぷるぷるのタップ演出だけ）。このファイルはレイアウトから
   全画面で読み込まれるため、直接付与するだけでHome/Search/Note/Profile等の
   Google attribution ⓘ ボタンすべてに共通で適用される。keyframeは application.css の
   tastyGlassPulse を参照する（アプリ全体で常に読み込まれているため利用できる）。

   半透明白の板は敷かない。この ⓘ は素の見た目が background: none・角丸なしの
   文字ボタンなので、板を敷くと ⓘ を囲う四角い枠として見える
   （→ application.css の【Glass 化の対象にしない要素】）。 */
.google-attribution__info-btn:active {
  animation: tastyGlassPulse 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-reduced-motion: reduce) {
  .google-attribution__info-btn:active {
    animation: none;
  }
}

/* =========================================
   「情報の提供元について」説明ボトムシート
   （app/views/shared/_google_attribution_modal.html.erb）
========================================= */
/* ネイティブ <dialog>。showModal() で top layer に乗るので z-index は不要
   （他のダイアログの内側から開いても手前に出る）。UA 既定の中央寄せ・枠・余白を
   打ち消して画面全体を覆い、シートを下端に寄せる。 */
.ga-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;  /* 暗幕は ::backdrop に任せる */
  overflow: hidden;
}

/* <dialog> 自体を display:flex にすると UA の `dialog:not([open]){display:none}` を
   打ち消して閉じているシートが見えてしまうので、open のときだけ flex にする。 */
.ga-modal[open] {
  display: flex;
  align-items: flex-end;
}

.ga-modal::backdrop {
  background: rgba(0, 0, 0, 0.40);
}

.ga-sheet {
  width: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 20px 16px;
  margin-bottom: calc(44px + 10px + env(safe-area-inset-bottom, 0px));
  max-height: 80dvh;
  overflow-y: auto;
  box-sizing: border-box;
}

.ga-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ga-sheet__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.ga-sheet__close {
  appearance: none;
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  padding: 4px;
}

.ga-sheet__body {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.7;
  color: #444;
}

.ga-sheet__ok-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  background: #f1f3f4;
  color: #202124;
  font-size: 15px;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .ga-sheet__title { font-size: 16px; }
}
