/* Store Map Search - CSS */

.store-map-container {
    display: flex;
    gap: 20px;
    max-width: 100%;
    margin: 20px 0;
}

/* サイドバー（検索フィルター） */
.store-map-sidebar {
    flex: 0 0 300px;
    background: #fff;
    border: 2px solid #08A8B1;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.store-map-search-box h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.search-description {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 検索セクション */
.search-section {
    margin-bottom: 25px;
}

.search-section h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: #08A8B1;
    border-bottom: 2px solid #08A8B1;
    padding-bottom: 5px;
}

.search-section input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* チェックボックスグループ */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-group label:hover {
    background: #f5f5f5;
    border-radius: 4px;
}

/* リセットボタン */
.reset-button {
    width: 100%;
    padding: 10px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.reset-button:hover {
    background: #e0e0e0;
}

/* メインマップエリア */
.store-map-main {
    flex: 1;
    min-width: 0;
}

#store-map {
    width: 100%;
    border-radius: 8px;
    border: 2px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Leafletポップアップのカスタマイズ */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 5px;
    max-width: 300px;
}

.leaflet-popup-content {
    margin: 10px;
    max-width: 280px;
    word-wrap: break-word;
}

.store-popup h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
    word-wrap: break-word;
}

.store-popup p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    word-wrap: break-word;
    max-height: 100px;
    overflow-y: auto;
}

.store-popup a {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: #08A8B1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
}

.store-popup a:hover {
    background: #069aa3;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .store-map-container {
        flex-direction: column;
    }
    
    .store-map-sidebar {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .checkbox-group {
        max-height: 150px;
    }
    
    #store-map {
        height: 400px !important;
    }
    
    /* スマホ時のポップアップ調整 */
    .leaflet-popup-content-wrapper {
        max-width: 250px;
    }
    
    .leaflet-popup-content {
        max-width: 230px;
        font-size: 12px;
    }
    
    .store-popup h4 {
        font-size: 14px;
    }
    
    .store-popup p {
        font-size: 12px;
        max-height: 80px;
    }
}

/* スクロールバーのカスタマイズ（視認性向上） */
.checkbox-group {
    /* スクロール可能であることを示すボーダー */
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
}

.checkbox-group::-webkit-scrollbar {
    width: 8px;
}

.checkbox-group::-webkit-scrollbar-track {
    background: #e8e8e8;
    border-radius: 4px;
    margin: 2px;
}

.checkbox-group::-webkit-scrollbar-thumb {
    background: #08A8B1;
    border-radius: 4px;
    border: 2px solid #e8e8e8;
}

.checkbox-group::-webkit-scrollbar-thumb:hover {
    background: #069aa3;
}

/* Firefox用スクロールバー */
.checkbox-group {
    scrollbar-width: thin;
    scrollbar-color: #08A8B1 #e8e8e8;
}

/* スクロール可能であることを示すグラデーション */
.checkbox-group::after {
    content: "";
    position: sticky;
    bottom: 0;
    display: block;
    height: 20px;
    background: linear-gradient(to bottom, transparent, #fafafa);
    pointer-events: none;
}

/* ローディング表示 */
.store-map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

.store-map-loading::after {
    content: "読み込み中...";
    font-size: 14px;
    color: #666;
}
