@charset "utf-8";

/* .map .wrapper (padding-top: 90px) 同層級樣式在 style.css 之後載入，
   故以 .map 前綴對齊 header 實際高度，避免地圖頂端空隙 */
.map .bag-map-wrapper {
    height: 100vh;
    min-height: 100vh;
    padding-top: 90px;
    overflow: hidden;
}

.map .bag-map-canvas {
    width: 100%;
    height: calc(100vh - 90px);
    min-height: 0 !important;
    background: #dedede;
}

.bag-map-actions {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1038;
}

.bag-map-searchpoint {
    position: fixed;
    left: 34px;
    bottom: 60px;
}

.bag-map-locatepoint {
    position: static;
    width: auto;
    min-height: 33px;
    padding: 8px 16px;
}

.bag-map-locatepoint i {
    margin-right: 4px;
}

.fallback-osm-tile {
    filter: grayscale(100%) contrast(110%) opacity(85%);
}

.bag-map-canvas .leaflet-control-zoom a,
.bag-map-canvas .leaflet-control-attribution {
    font-size: var(--size_13);
}

.bag-map-canvas .bag-map-store-toggle {
    min-width: 154px;
    padding: 8px 10px;
    border: 2px solid rgba(0, 0, 0, .2);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .35);
    color: #231814;
    font-size: var(--size_14);
    line-height: 1.4;
}

.bag-map-store-toggle label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    cursor: pointer;
}

.bag-map-store-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: #02846A;
}

.bag-map-store-toggle input:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.bag-map-store-toggle input:disabled + span {
    cursor: wait;
    opacity: .65;
}

.bag-map-canvas .bag-map-zoom-wrap {
    top: 50%;
    right: 10px;
    left: auto;
    transform: translateY(-50%);
}

.bag-map-canvas .bag-map-zoom-control {
    margin: 0;
}

.bag-map-canvas .bag-map-store-icon {
    background: transparent;
    border: 0;
}

.bag-map-canvas .bag-map-location-icon {
    width: 30px;
    height: 38px;
    background: transparent;
    border: 0;
    color: #D63900;
    font-size: 38px;
    line-height: 38px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.bag-map-canvas .bag-map-location-icon i {
    display: block;
}

.bag-map-canvas .leaflet-marker-icon:focus {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.bag-map-canvas .marker-cluster {
    color: #231814;
    cursor: pointer;
}

.bag-map-canvas .marker-cluster:focus {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.bag-modal-subtitle {
    margin-top: 24px;
}

.bag-search-history:empty::after {
    display: block;
    padding: 8px 0;
    color: #686868;
    content: '尚無查詢紀錄';
}

.bag-search-history .search-item {
    overflow: hidden;
    max-width: 100%;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bag-store-value {
    min-height: 1.5em;
    overflow-wrap: anywhere;
}

.bag-store-distance {
    margin-top: 18px;
    color: #686868;
}

@media (max-width: 768px) {
    .bag-map-actions {
        left: 16px;
        bottom: 16px;
    }

    .bag-map-searchpoint {
        left: 34px;
        bottom: 60px;
    }
}

/* 手機（≤540px）header 高度為 75px，與上方 padding 同步避免空隙 */
@media (max-width: 540px) {
    .map .bag-map-wrapper {
        padding-top: 75px;
    }

    .map .bag-map-canvas {
        height: calc(100vh - 75px);
    }

}
