body {
    margin: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;
    background-color: #ddd;
}

.header {
    height: 50px;
    background: #333;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.map-container {
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 0;
}

.details-panel {
    position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 90vh;
  background: white;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out;
  transform: translateY(95%);
  display: flex;
  flex-direction: column;
}

.details-panel.expanded {
    transform: translateY(20%);
}
/* 内部スクロール用 */
.details-content {
  flex: 1; /* 残りの高さを全て使う */
  overflow-y: auto;
  padding: 1rem;
}
.toggle-button {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    font-size: 1.2rem;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 10px;
    width: 50px;
    height: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.search-box {
    width: 80%;
    padding: 10px;
    font-size: 1rem;
    margin-bottom: 10px;
}

.toggle-filters {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.filter-button {
    padding: 10px;
    background: #ccc;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.statusarea{
    display: flex;
}
.status {
    margin: auto;
    color: #333;
}

svg {
    width: 80vh;
}

.pin {
    fill: red;
    stroke: white;
    stroke-width: 2;
    cursor: pointer;
}

.user-pin {
    fill: blue;
    stroke: white;
    stroke-width: 2;
}

.listContainer {
    height: 70vh;
    overflow-y: auto;
}

.search-container {
    display: flex;
    margin-bottom: 20px;
}
.search-container input {
    flex: 1;
    padding: 5px;
}
.search-container button {
    padding: 5px 10px;
    margin-left: 5px;
}
.filter-buttons {
    margin-top: 10px;
}
.filter-buttons button {
    margin: 5px;
    padding: 5px 10px;
}
.result-box {
    border: 2px solid #2d56a0;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}
.loader {
    border: 15px solid #f3f3f3;
    border-top: 15px solid #e80d0d;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal {
    display: none;
    position: fixed;
    z-index: 99;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    text-align: center;
}

.close {
    position: absolute;
    left: 20px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}


@media (min-width: 768px) {
    .details-panel {
        width: 98%;
        height: 80vh;
        right: auto;
        left: 10px;
        transform: translateX(-0%);
        transform: translateY(90%);
        border-radius: 10px 10px 0 0;
    }

    .details-panel.expanded {
        transform: translateY(15%);
    }

    .toggle-button {
        display: flex;
    }
}

.svg-frame{
    width: 100%; height: 70vh; border: none;
}

/* --- 左上固定配置 --- */
/* --- 左上固定で縦配置 --- */
.map-controls.top-left {
  position: fixed;
  top: 10vh;
  left: 20px;
  display: flex;
  flex-direction: column; /* 縦並び */
  align-items: flex-start;
  gap: 12px;              /* ボタン間のスペース */
  z-index: 1000;
  /* background: rgba(0, 0, 0, 0.45); 背景色例: 透明黒 */
  border-radius: 12px;
  padding: 8px 12px;
  /* box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15); */
  /* backdrop-filter: blur(5px); */
}

/* --- 戻るボタン --- */
.map-btn {
  background: linear-gradient(135deg, #ff7a18, #ffb347);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.map-btn:hover {
  background: linear-gradient(135deg, #ff9247, #ffd480);
  transform: translateY(-1px);
}

/* --- 階選択ドロップダウン --- */
.floor-select {
  appearance: none;
  /* background: rgba(255, 255, 255, 0.1); 透明感のある背景 */
  border: 2px solid #ff9247;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  /* color: #fff; 文字色は白に */
  cursor: pointer;
  transition: 0.3s ease;
}

.floor-select:hover {
  border-color: #ffb347;
}

/* --- スマホ対応 --- */
@media (max-width: 600px) {
  .map-controls.top-left {
    top: 10vh;
    left: 10px;
    gap: 8px;
    padding: 6px 10px;
  }

  .map-btn,
  .floor-select {
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  .svg-frame{
    margin-top: 10vh;
    height: 60vh;
  }
}
