/* --- 全体・基本スタイル --- */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

h1 {
    text-align: center;
    margin: 10px 0;
}

/* --- 検索ボックス --- */
.search-container {
    text-align: center;
    padding: 10px;
}

#searchInput {
    padding: 8px;
    width: 200px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px; 
}

#searchButton {
    padding: 8px 12px;
    border: none;
    background-color: #0055a4;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}


/* --- メインコンテンツ（地図＋リスト） --- */
.main-container {
    display: flex;
    height: 75vh; /* 画面の高さの75%を占めるように高さを固定 */
    margin: 0 10px;
}

#map {
    width: 100%;
    height: 100%;
    transition: width 0.3s ease-in-out;
}

.results-container {
    width: 0;
    height: 100%;
    overflow-y: auto;
    border-left: 1px solid #ccc;
    padding: 0 0;
    box-sizing: border-box;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

/* リストが表示される時のためのスタイル */
.main-container.list-visible #map {
    width: 70%;
}

.main-container.list-visible .results-container {
    width: 30%;
    padding: 10px;
    visibility: visible;
}

/* --- 検索結果リストのアイテム --- */
.result-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.result-item:hover {
    background-color: #f0f0f0;
}

.result-item h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #0055a4;
}

.result-item p {
    margin: 0;
    font-size: 12px;
    color: #555;
}

/* --- floormap.html用のスタイル --- */
.floormap-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    text-align: center;
}

.floor-buttons-container {
    margin: 20px 0;
}

.floor-button {
    padding: 10px 15px;
    margin: 5px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
    border-radius: 4px;
}

.floor-button.active {
    background-color: #0055a4;
    color: white;
    border-color: #0055a4;
}

.image-container img {
    max-width: 100%;
    border: 1px solid #eee;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #0055a4;
    text-decoration: none;
}

/* --- フッター --- */
footer {
    background-color: #f8f9fa;
    padding: 20px 15px 40px 15px;
    text-align: center;
    border-top: 1px solid #e7e7e7;
    font-size: 12px;
    color: #555;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.beta-notice {
    font-weight: bold;
    margin: 0 0 10px 0;
}

.feedback-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 14px;
}

.feedback-link:hover {
    background-color: #218838;
}

.copyright {
    margin: 0;
}


/* --- スマートフォン向けのスタイル --- */
/* 画面幅が768px以下の時に適用される */
@media (max-width: 768px) {
    #searchInput {
        font-size: 16px; /* ズーム防止 */
    }

   .main-container {
        flex-direction: column;
        height: auto;
    }

    .results-container {
        display: none; /* ← この一行を追加するだけ！ */
    }
    
    #map {
        height: 85vh; /* ← 地図の高さを広げる */
        width: 100%;
    }

    .results-container {
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid #ccc;
        display: flex;
        overflow-x: auto;
        padding: 10px 0;
    }
    
    .result-item {
        flex: 0 0 70%; /* アイテムの幅を画面の70%に */
        max-width: 250px; /* アイテムの最大幅 */
        margin: 0 5px;
        border: 1px solid #eee;
        border-radius: 5px;
        border-bottom: none; /* 下線をなくす */
    }

    /* リストが表示される時のためのスタイル（スマホ版） */
    .main-container.list-visible #map {
        width: 100%; /* 幅は変更しない */
    }

    .main-container.list-visible .results-container {
        padding: 10px;
    }
}
/* --- floormap.htmlの準備中メッセージ用のスタイル --- */
.preparation-message {
    padding: 40px 20px;
    font-size: 18px;
    color: #555;
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 8px;
    margin-top: 20px;
}
/* 登録ボタン（右下に固定） */
.register-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 30px;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1000; /* 地図より上に */
}

/* モーダルの背景（暗くする） */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* 隠すためのクラス */
.hidden {
    display: none;
}

/* モーダルの中身 */
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal-content input, .modal-content select {
    width: 100%;
    padding: 10px;
    margin: 10px 0 20px 0;
    box-sizing: border-box;
}
/* リストを表示するエリア（登録数が増えたらスクロールするようにする） */
.class-list {
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* リストの各行 */
.class-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.class-item:last-child {
    border-bottom: none;
}

/* 削除ボタン */
.delete-btn {
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 10px;
}

.delete-btn:hover {
    background-color: #cc0000;
}
