/* map_style.css */
/* body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
} */

#map {
    height: 100vh;
    width: 100%;
    background: #f0f2f5;
}

.custom-div-icon {
    background: none !important;
    border: none !important;
}

/* 空港ピン */
.airport-pin {
    position: relative;
    width: 40px;
    height: 40px;
}

.airport-pin-svg {
    fill: #e74c3c;
    stroke: #fff;
    stroke-width: 2;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.airport-icon-inner {
    position: absolute;
    top: 8px;
    left: 0;
    width: 40px;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    pointer-events: none;
}

/* 観光協会ピン */
.assoc-pin {
    position: relative;
    width: 28px;
    height: 38px;
}

.pin-svg-blue {
    fill: #3498db;
    stroke: #fff;
    stroke-width: 2;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.pin-svg-gray {
    fill: #95a5a6;
    stroke: #fff;
    stroke-width: 2;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.pin-number {
    position: absolute;
    top: 6px;
    left: 0;
    width: 28px;
    text-align: center;
    color: white;
    font-weight: 800;
    font-size: 10px;
    pointer-events: none;
}

/* 個別スポットピン */
.spot-pin-wrap {
    position: relative;
    width: 24px;
    height: 32px;
}

.spot-pin-svg {
    fill: #2ecc71;
    stroke: #fff;
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.spot-icon-inner {
    position: absolute;
    top: 5px;
    left: 0;
    width: 24px;
    text-align: center;
    font-size: 10px;
    pointer-events: none;
}

.custom-tooltip {
    background: rgba(44, 62, 80, 0.95) !important;
    color: #fff !important;
    border: 1px solid #fff !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-weight: bold !important;
    font-size: 13px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    white-space: nowrap;
}

.popup-card {
    width: 250px;
}

.popup-title {
    font-size: 16px;
    font-weight: bold;
    padding-bottom: 5px;
    margin-bottom: 10px;
    display: block;
    text-decoration: underline;
}

.popup-title-assoc {
    color: #0056b3;
    border-bottom: 2px solid #3498db;
}

.popup-title-spot {
    color: #219150;
    border-bottom: 2px solid #2ecc71;
}

.popup-title-airport {
    color: #c0392b;
    border-bottom: 2px solid #e74c3c;
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    text-decoration: none;
}

.info-icon {
    margin-right: 8px;
    font-size: 16px;
}

.map-card-btn {
    display: block;
    width: 100%;
    padding: 10px 0;
    margin-top: 8px;
    border-radius: 8px;
    text-align: center;
    color: white;
    font-weight: bold;
    text-decoration: none;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.map-btn-red {
    background-color: #f28d85;
}

.map-btn-blue {
    background-color: #85c1e9;
}

.map-btn-orange {
    background-color: #f8c471;
    color: #784212;
}

.search-label {
    margin-top: 12px;
    font-size: 11px;
    font-weight: bold;
    color: #666;
}

.search-group {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-top: 5px;
}

.map-btn-sm {
    flex: 1;
    padding: 7px 0;
    font-size: 11px;
    margin-top: 0;
}

/* スマホ最適化 */
@media screen and (max-width: 600px) {
    .leaflet-popup {
        max-width: 95vw !important;
    }

    .leaflet-popup-content-wrapper {
        padding: 5px;
    }

    .popup-card {
        width: 100% !important;
        box-sizing: border-box;
    }

    .popup-title {
        font-size: 18px !important;
    }

    .info-row {
        font-size: 16px !important;
        padding: 4px 0;
    }

    .map-btn {
        font-size: 16px !important;
        padding: 12px 0;
    }
}


/* --- 追加：スマホ・タブレット専用の修正 --- */
@media screen and (max-width: 1024px) {
    #map {
        /* vh指定をやめて、高さを固定します */
        height: 500px !important; 
        min-height: 500px !important;
    }
}


/* --- フィルターUI用のスタイル --- */
.filter-bar-container {
    position: absolute;
    top: 0px;        /* ズームボタンと同じ高さ */
    left: 55px;       /* ズームボタンの右に配置 */
    z-index: 1000;    /* 地図より上に表示 */
    display: flex;
    flex-direction: column; /* テキストとボタンを縦に並べる */
    gap: 5px;
    background: rgba(255, 255, 255, 0.9); /* 少し背景を透かす */
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    pointer-events: auto;
}

.filter-label {
    font-size: 11px;
    font-weight: bold;
    color: #555;
    margin-bottom: 2px;
}

.filter-buttons-row {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
}

.filter-btn {
    padding: 4px 6px;
    border: 1px solid #2ecc71; /* 緑系の枠線 */
    background: #ffffff;
    cursor: pointer;
    border-radius: 20px;
    font-size: 11px;
    color: #2ecc71; /* 文字色も緑 */
    transition: all 0.2s;
    font-weight: 600;
}

.filter-btn:hover {
    background: #e8f8f0;
}

.filter-btn.active {
    background: #2ecc71; /* アクティブ時は塗りつぶし */
    color: white;
    border-color: #27ae60;
}

/* ズームアウト時に非表示にするためのクラス */
.hidden-ui {
    display: none !important;
}

.filter-btn.active:hover {
    background: #2980b9;
}