/* ========================================
   Showroom Map - 店舗を探す地図コンポーネント
   ======================================== */

/* コンテナ */
.showroom-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 42px;
  padding-block: 60px;
  padding-inline: 16px;
  max-width: 1024px;
  margin-inline: auto;
}

/* タイトル */
.showroom-map__title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #c8102e;
  letter-spacing: 1.8px;
  line-height: 30px;
  text-align: center;
  margin: 0;
}

/* 地図コンテナ */
.showroom-map__container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 608px;
}

/* 各地域のマップ */
.showroom-map__region {
  position: absolute;
  cursor: pointer;
  transition: opacity 0.2s;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}

.showroom-map__region:hover {
  opacity: 0.8;
}

.showroom-map__region:focus {
  outline: 2px solid #c8102e;
  outline-offset: 2px;
}

.showroom-map__region img {
  display: block;
  width: 100%;
  height: 100%;
}

/* 地域の位置 */
.showroom-map__region--hokkaido {
  top: 0.24%;
  right: 0.23%;
  width: 26.55%;
  height: 21.93%;
}

.showroom-map__region--tohoku {
  top: 23.74%;
  right: 11.22%;
  width: 15.48%;
  height: 29.03%;
}

.showroom-map__region--kanto {
  top: 52.77%;
  right: 11.57%;
  width: 17.6%;
  height: 17.32%;
}

.showroom-map__region--chubu {
  top: 43.87%;
  left: 48.08%;
  width: 28.15%;
  height: 28.74%;
}

.showroom-map__region--kinki {
  top: 58.2%;
  left: 39.12%;
  width: 18.61%;
  height: 20.38%;
}

/* 中国・四国（統合ボタン） */
.showroom-map__region--chugoku-shikoku {
  top: 60.23%;
  left: 21.98%;
  width: 20%;
  height: 22.5%;
}

.showroom-map__region--chugoku-shikoku .showroom-map__region-img {
  position: absolute;
}

.showroom-map__region--chugoku-shikoku .showroom-map__region-img--chugoku {
  top: 0;
  left: 0;
  width: 86%;
  height: 43%;
}

.showroom-map__region--chugoku-shikoku .showroom-map__region-img--shikoku {
  top: 55%;
  left: 7%;
  width: 92%;
  height: 45%;
}

.showroom-map__region--kyushu-okinawa {
  top: 66.89%;
  left: 2.88%;
  width: 18.21%;
  height: 32.82%;
}

/* 地域ラベル */
.showroom-map__label {
  position: absolute;
  background-color: #fff;
  padding: 6px 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #191a19;
  white-space: nowrap;
  pointer-events: none;
}

.showroom-map__label--hokkaido {
  top: 68px;
  left: 406px;
}

.showroom-map__label--tohoku {
  top: 210px;
  left: 387px;
}

.showroom-map__label--kanto {
  top: 348.6px;
  left: 383.22px;
}

.showroom-map__label--chubu {
  top: 363.5px;
  left: 302.71px;
}

.showroom-map__label--kinki {
  top: 390.85px;
  left: 230.74px;
}

.showroom-map__label--chugoku-shikoku {
  top: 418px;
  left: 115px;
}

.showroom-map__label--kyushu-okinawa {
  top: 442px;
  left: 17px;
}

/* 県一覧ポップアップ */
.showroom-map__popup {
  position: absolute;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0px 1px 14px 0px rgba(0, 0, 0, 0.3);
  width: 205px;
  padding-bottom: 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  overflow: visible;
}

.showroom-map__popup.is-active {
  opacity: 1;
  visibility: visible;
}

.showroom-map__popup-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px 11px;
}

/* ポップアップタイトル */
.showroom-map__popup-title {
  border-bottom: 2px solid #e796a3;
  padding: 6px 24px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.showroom-map__popup-title-text {
  display: block;
  padding: 0 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #303030;
  text-align: center;
  line-height: 1.4;
}

/* 県リンクリスト */
.showroom-map__prefecture-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.showroom-map__prefecture-item {
  width: 50%;
}

.showroom-map__prefecture-link {
  display: flex;
  align-items: center;
  padding: 6px 13px;
  text-decoration: none;
  transition: opacity 0.1s;
}

.showroom-map__prefecture-link:hover {
  opacity: 0.7;
}

.showroom-map__prefecture-link--disabled {
  pointer-events: none;
}

/* 矢印アイコン */
.showroom-map__prefecture-arrow {
  width: 8px;
  height: 8px;
  margin-right: 8px;
  flex-shrink: 0;
}

.showroom-map__prefecture-arrow svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* 県名 */
.showroom-map__prefecture-name {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.48px;
  line-height: 1.4;
  color: #191a19;
}

.showroom-map__prefecture-link--disabled .showroom-map__prefecture-name {
  color: #ccc;
}

/* ポップアップ位置 - 全エリア共通で左上に表示 */
.showroom-map__popup--kyushu-okinawa,
.showroom-map__popup--kinki,
.showroom-map__popup--chugoku-shikoku,
.showroom-map__popup--chubu,
.showroom-map__popup--kanto,
.showroom-map__popup--tohoku,
.showroom-map__popup--hokkaido {
  top: 5%;
  left: 11%;
}

/* ========================================
   アイコン説明セクション
   ======================================== */
.showroom-icon-legend {
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: 100%;
  max-width: 1000px;
  margin-block-start: 120px;
  margin-inline: auto;
  padding-inline: 16px;
}

.showroom-icon-legend__title {
  padding-inline: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #191a19;
  margin: 0;
}

.showroom-icon-legend__list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-inline: 0;
  list-style: none;
  margin: 0;
}

.showroom-icon-legend__item {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 227px;
}

.showroom-icon-legend__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: #f7f7f7;
  flex-shrink: 0;
}

.showroom-icon-legend__icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.showroom-icon-legend__text {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #191a19;
}

/* ========================================
   レスポンシブ対応
   ======================================== */
@media screen and (max-width: 767px) {
  .showroom-map {
    gap: 24px;
    padding-block: 40px;
  }

  .showroom-map__title {
    font-size: 18px;
    letter-spacing: 1.2px;
  }

  .showroom-map__container {
    max-width: 100%;
    height: auto;
    aspect-ratio: 500 / 608;
  }

  /* ラベル位置をパーセントに変換 */
  .showroom-map__label {
    font-size: 12px;
    padding: 4px 2px;
  }

  .showroom-map__label--hokkaido {
    top: 11.18%;
    left: 81.2%;
  }

  .showroom-map__label--tohoku {
    top: 34.54%;
    left: 77.4%;
  }

  .showroom-map__label--kanto {
    top: 57.33%;
    left: 76.64%;
  }

  .showroom-map__label--chubu {
    top: 59.78%;
    left: 60.54%;
  }

  .showroom-map__label--kinki {
    top: 64.29%;
    left: 46.15%;
  }

  .showroom-map__label--chugoku-shikoku {
    top: 68.75%;
    left: 23%;
  }

  .showroom-map__label--kyushu-okinawa {
    top: 72.7%;
    left: 3.4%;
  }

  /* ポップアップはモーダル表示 */
  .showroom-map__popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 300px;
  }

  .showroom-map__overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 99;
  }

  .showroom-map__overlay.is-active {
    opacity: 1;
    visibility: visible;
  }

  /* アイコン説明レスポンシブ */
  .showroom-icon-legend {
    margin-block-start: 60px;
  }

  .showroom-icon-legend__title {
    padding-inline: 0;
  }

  .showroom-icon-legend__list {
    padding-inline: 0;
    gap: 10px;
  }

  .showroom-icon-legend__item {
    width: calc(50% - 5px);
  }
}
