/* ==========================================
   現在地マップ＆店舗リスト固有のスタイル
========================================== */
#current-location-map-container {
    padding-top: 40px;
    margin-bottom: 60px;
}

.current-map-wrapper {
    height: 650px;
    border: 3px solid var(--color-accent);
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: solid 1px #ddd;
    background: #e5e3df;
    transition: all 0.3s ease;
}

#current-gmap {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* ==========================================
   左側（SPでは下側）のオーバーレイパネル
========================================== */
.nearby-shops-panel {
    margin: 15px;
    width: 340px;
    height: 560px;
    max-height: calc(100vh - 40px);
    background: #fff;
    border: 2px solid #E60012 !important;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.nearby-panel-header {
    position: relative;
    background: #fff;
    flex-shrink: 0;
    z-index: 2;
}

.nearby-title {
    font-size: 20px;
    font-weight: bold;
    padding: 20px 20px 10px;
    margin: 0;
    color: var(--color-text);
}

.nearby-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 15px;
    -webkit-overflow-scrolling: touch;
}

.nearby-list::-webkit-scrollbar {
    width: 6px;
}

.nearby-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.nearby-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.nearby-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
    cursor: pointer;
}

.nearby-item:hover {
    background-color: #fcfcfc;
}

.nearby-item-info {
    flex: 1;
    padding-right: 10px;
}

.nearby-item-title {
    color: #E60012 !important;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.nearby-item-dist {
    font-size: 12px;
    color: #333;
    margin-bottom: 3px;
}

.nearby-item-time {
    font-size: 11px;
    color: #333;
    display: flex;
    align-items: center;
}

.nearby-item-time::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #00b06b;
    border-radius: 50%;
    margin-right: 5px;
    flex-shrink: 0;
}

.nearby-item-time.is-closed::before {
    background: var(--color-main, #E60012);
}

.nearby-item-arrow {
    width: 24px;
    height: 24px;
    background: #E60012 !important;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
    position: relative;
}

.nearby-item-arrow::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -2px;
    right: 0;
    margin: auto;
    width: 10px;
    height: 10px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(45deg);
    transition: border-color 0.2s;
}

/* ★ 自作の全画面ボタン（PC）*/
.custom-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: #fff;
    border: none;
    border-radius: 2px;
    width: 40px;
    height: 40px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: #666;
    outline: none;
}

.custom-fullscreen-btn:hover {
    color: #333;
}

.current-map-wrapper {
    height: 60vh;
}

/* ★ 全画面モード時の強制スタイル */
.current-map-wrapper.is-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh !important;
    height: 100dvh;
    z-index: 99999;
    border: none;
    border-radius: 0;
    margin: 0;
}

/* ==========================================
   SP用 ボトムシート（スライドパネル）スタイル
========================================== */
@media (max-width: 768px) {
    .nearby-shops-panel {
        position: absolute !important;
        z-index: 5 !important;
        width: 100% !important;
        left: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        margin: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        border: none !important;
        border-top: 1px solid #ddd !important;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15) !important;
        transition: height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .nearby-shops-panel.state-min {
        height: 65px;
    }

    .nearby-shops-panel.state-mid {
        height: 50%;
    }

    .nearby-shops-panel.state-max {
        height: 90%;
    }

    .current-map-wrapper.is-fullscreen .nearby-shops-panel.state-min {
        height: 180px;
    }

    .nearby-shops-panel.state-min .nearby-list {
        overflow: hidden;
    }

    .nearby-panel-header {
        padding-top: 22px;
        cursor: grab;
        text-align: center;
        touch-action: none;
    }

    .nearby-panel-header:active {
        cursor: grabbing;
    }

    .nearby-title {
        padding: 0 20px 10px;
        font-size: 18px;
    }

    .nearby-panel-header::before {
        content: "";
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 45px;
        height: 5px;
        background: #d1d1d1;
        border-radius: 4px;
    }

    .custom-fullscreen-btn svg {
        width: 60%;
        height: 60%;
        fill: none;
        stroke: var(--color-main, #E60012);
        stroke-width: 2.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .custom-fullscreen-btn i {
        display: none !important;
    }
}

/* ==========================================
   マップの吹き出し（InfoWindow）スタイル
========================================== */
.custom-info-window {
    padding: 2px 5px 5px;
    font-family: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", Meiryo, sans-serif;
    color: #333;
    line-height: 1.4;
    width: 180px;
    --f-base: 14;
}

.gm-style-iw-chr{
    height: 32px !important;
}

.custom-info-window .info-title {
    font-weight: bold;
    color: #E60012;
    --f-base: 15;
    margin-bottom: 5px;
}

.custom-info-window .info-address {
    --f-base: 12;
    color: #555;
    margin-bottom: 2px;
}

.custom-info-window .info-tel {
    --f-base: 13;
    font-weight: bold;
    color: #E60012;
    display: inline-block;
    text-decoration: none;
    margin-bottom: 8px;
}

.custom-info-window .info-btns {
    display: flex;
    gap: 8px;
}

.custom-info-window .info-btn-route {
    flex: 1;
    background: #eaf3f8;
    color: #0078b3;
    border: 1px solid #0078b3;
    border-radius: 20px;
    text-align: center;
    padding: 6px 0;
    --f-base: 11;
    font-weight: bold;
    text-decoration: none;
}

.custom-info-window .info-btn-detail {
    flex: 1;
    background: #f58220;
    color: #fff;
    border: 1px solid #f58220;
    border-radius: 20px;
    text-align: center;
    padding: 6px 0;
    --f-base: 11;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
}

.custom-info-window .info-btn-detail:hover {
    background: #e06c00;
    border-color: #e06c00;
}

/* ★ PC版でのみ吹き出しの文字サイズを一回り小さくする */
@media (min-width: 769px) {
    .custom-info-window {
        --f-base: 12;
    }

    .custom-info-window .info-title {
        --f-base: 13;
    }

    .custom-info-window .info-address {
        --f-base: 11;
    }

    .custom-info-window .info-tel {
        --f-base: 12;
    }

    .custom-info-window .info-btn-route,
    .custom-info-window .info-btn-detail {
        --f-base: 10;
    }
}