@charset "UTF-8";

/*
 * 現在地の利用を促すダイアログと、許可されていないときの案内（js/stamp-rally/stamp-rally-location-permission.js）
 *
 * ダイアログはアプリの確認ダイアログ（modal-sm）の部品をそのまま使い、中身の並びだけを整える。
 * 案内は地図の上端の中央に出す。影と丸みは地図ボタン（map-buttons.css）にそろえる。
 */

/* --------------------------------------------------
 * ダイアログ
 * -------------------------------------------------- */

.location-permission-icon {
  display: inline-block;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #f0f2f5 url("../img/map-buttons/locate.svg") center / 24px 24px no-repeat;
}

.location-permission-title {
  margin-bottom: 8px;
  font-weight: 700;
  color: #111;
  /* 見出しは <wbr> の位置（意味の切れ目）でだけ折り返す。1 文字だけ次の行に落ちるのを防ぐ。
     <wbr> の間が収まらない狭い幅では、どこでも折り返してはみ出さないようにする */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.location-permission-text {
  margin-bottom: 4px;
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* 閉じる・再読み込みを横に並べる（modal-sm の幅に 2 つなら収まる） */
.location-permission-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.location-permission-actions .btn {
  flex: 1 1 0;
  margin: 0;
}

/* --------------------------------------------------
 * 地図の上の案内
 * -------------------------------------------------- */

/* leaflet-control の float・clear を打ち消し、地図の上端の中央へ置く */
.leaflet-container .leaflet-control.location-permission-notice {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 1000;
  float: none;
  clear: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 28px);
  margin: 0;
  padding: 8px 8px 8px 12px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  color: #111;
  font-size: 0.8125rem;
  line-height: 1.4;
}

/* SP は地図の上端に右上のおばけくん（ヘッダーアイコン）が重なるので、その下へずらす */
@media (max-width: 991px) {
  .leaflet-container .leaflet-control.location-permission-notice {
    top: 56px;
  }
}

.location-permission-notice-icon {
  flex: none;
  width: 18px;
  height: 18px;
  background: url("../img/map-buttons/locate.svg") center / contain no-repeat;
  opacity: 0.5;
}

.location-permission-notice-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.location-permission-notice-help {
  flex: none;
  padding: 4px 10px;
  border: 0;
  border-radius: 14px;
  background: #111;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
}

.location-permission-notice-close {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

/* × は線 2 本で描く（地図ボタンと同じ線の太さ・色） */
.location-permission-notice-close::before,
.location-permission-notice-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.8px;
  background: #111;
}

.location-permission-notice-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.location-permission-notice-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
