/* ====== モーダル ====== */
.menu-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.6);
}

.menu-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  text-align: center;
  position: relative;
}

.menu-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

.menu-modal-image img {
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}

.menu-modal-image .no-image {
  width: 100%;
  height: 150px;
  border: 2px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 16px;
  margin-bottom: 10px;
}

.restaurant-menu-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1em;
  gap: 0.5em;
}
.menu-tab {
  padding: 0.5em 1em;
  border: 1px solid #ccc;
  background: #f9f9f9;
  cursor: pointer;
}
.menu-tab.active {
  background: #0073aa;
  color: white;
}

.restaurant-menu-contents .tab-content {
  display: none;
}
.restaurant-menu-contents .tab-content.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1em;
}

.menu-item {
  border: 1px solid #ddd;
  padding: 0.5em;
  text-align: center;
  background: white;
  border-radius: 8px;
}
.menu-item img {
  max-width: 100%;
  cursor: pointer;
  border-radius: 6px;
}
/* ==========================
   ポップアップ全体
   ========================== */
#multi-select-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: none; /* 初期は非表示 */
  justify-content: center;
  align-items: center;
  overflow-y: auto; /* 縦スクロール可能 */
}

#multi-select-list {
  background: #fff;
  width: 100%;       /* ビューポート幅いっぱい */
  height: 100vh;      /* 高さも画面いっぱい */
  max-width: 100%;   /* 最大幅も制限 */
  max-height: 100vh;  /* 最大高さも制限 */
  margin: 0;          /* 余白リセット */
  border-radius: 0;   /* 角丸なし */
  padding: 20px;      /* 必要なら調整 */
  box-sizing: border-box;
}

/* ==========================
   Tab ボタン部分（サイドバー無効）
   ========================== */
.popup-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
  overflow: visible; /* サイドバー無効 */
  width: auto;        /* 固定幅解除 */
}

/* Tab ボタンスタイル */
.popup-tab {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #f0f0f0;
  cursor: pointer;
  border-radius: 5px;
}
.popup-tab.active {
  background: #0073aa;
  color: #fff;
}

/* ==========================
   Tab 内コンテンツ部分（スクロール可）
   ========================== */
.popup-contents {
  max-height: 60vh;  /* Tab 内縦スクロール */
  overflow-y: auto;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

/* 各 Tab 内のコンテンツ */
.popup-content {
  display: none;
}
.popup-content.active {
  display: block;
}

/* タイプ名と配下チェックボックス */
.popup-content div {
  margin-bottom: 10px;
}

.popup-content label {
  display: block;
  margin-left: 20px;
  cursor: pointer;
}

/* タイプ名チェックボックス */
.popup-type-checkbox {
  margin-right: 5px;
}

/* 選択中有表示 */
.type-selected {
  color: red;
  font-weight: bold;
  margin-left: 5px;
}

/* 決定・キャンセルボタン */
#multi-select-ok,
#multi-select-cancel {
  padding: 8px 16px;
  margin-right: 10px;
  border: none;
  background: #0073aa;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
}
#multi-select-cancel {
  background: #aaa;
}
#multi-select-ok:hover,
#multi-select-cancel:hover {
  opacity: 0.9;
}