/* ===== 加油站地圖 /fuel/ — DRONESHOT.TW =====
 * 版面同電塔查詢（header＋共用搜尋列＋全頁地圖＋左下資訊面板），多一列篩選鈕。
 * 色值全走 tokens.css；地圖標記與 popup 樣式在共用 /assets/css/fuel.css。 */

:root {
    --header-h: 54px;
    --search-h: 50px;
    --chips-h: 48px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans TC', sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    height: 100vh; overflow: hidden;
}

/* ===== Header ===== */
.app-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--bar-glass-bg);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--hairline);
    display: flex; align-items: center;
    padding: 0 var(--space-2); z-index: 1000; gap: 12px;
}
.header-logo img { height: 30px; display: block; }
.header-title { font-size: 15px; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-btn {
    background: var(--field-bg); border: none; color: var(--text-white);
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 20px; flex-shrink: 0;
}
.header-btn:hover { background: var(--hairline); }

/* ===== 篩選列（可左右滑）===== */
.fuel-filters {
    position: fixed;
    top: calc(var(--header-h) + var(--search-h));
    left: 0; right: 0;
    height: var(--chips-h);
    display: flex; align-items: center; gap: var(--space-1);
    padding: 0 var(--space-1);
    overflow-x: auto; scrollbar-width: none;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--hairline);
    z-index: 999;
}
.fuel-filters::-webkit-scrollbar { display: none; }
.fuel-chip {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 4px;
    height: 32px; padding: 0 12px;
    border-radius: 16px;
    border: 1px solid var(--hairline);
    background: var(--field-bg);
    color: var(--text-white);
    font-family: inherit; font-size: 13px; font-weight: 500;
    cursor: pointer; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.fuel-chip[aria-pressed="true"],
.fuel-chip-brand.is-active {
    background: var(--primary); color: var(--on-accent); border-color: var(--primary); font-weight: 700;
}
.fuel-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ===== 品牌面板 ===== */
.brand-panel {
    position: fixed;
    top: calc(var(--header-h) + var(--search-h) + var(--chips-h));
    right: var(--space-1);
    width: min(92vw, 320px);
    max-height: 60vh; overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    box-shadow: var(--glass-shadow);
    padding: var(--space-1) var(--space-2) var(--space-2);
    z-index: 1100;
}
.brand-panel-head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: var(--text-secondary);
    padding-bottom: var(--space-1);
    border-bottom: 1px solid var(--hairline);
}
.brand-clear {
    background: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
    color: var(--text-white); font-family: inherit; font-size: 12px; padding: 4px 8px; cursor: pointer;
}
.brand-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px var(--space-2); padding-top: var(--space-1); }
.brand-list label { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 0; cursor: pointer; }
.brand-list input { accent-color: var(--primary); width: 16px; height: 16px; }
.brand-list .n { color: var(--text-secondary); font-size: 12px; }

/* ===== Map ===== */
#map {
    position: fixed;
    top: calc(var(--header-h) + var(--search-h) + var(--chips-h));
    left: 0; right: 0; bottom: 0;
    z-index: 1;
}

/* ===== 資訊面板（左下；底部位移由 nav.css 的 .info-panel 規則讓開導覽列）===== */
.info-panel {
    position: fixed;
    left: 12px; bottom: 16px;
    max-width: 360px;
    background: var(--bar-glass-bg);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 10px 14px;
    z-index: 1000;
    font-size: 13px;
}
.info-main { font-weight: 700; }
.info-main.is-error { color: var(--status-danger); }
.info-near { margin-top: 4px; }
.info-near button {
    background: none; border: none; padding: 0; cursor: pointer;
    color: var(--primary); font-family: inherit; font-size: 13px; text-decoration: underline;
}
.info-hint {
    margin-top: 6px; padding-top: 6px;
    border-top: 1px solid var(--hairline);
    font-size: 11px; color: var(--text-secondary);
}
.info-hint:empty { display: none; }

/* 目前位置 */
.leaflet-marker-icon.fuel-me {
    background: var(--primary);
    border: 3px solid var(--bg-dark);
    border-radius: 50%;
}

@media (max-width: 480px) {
    .info-panel { left: 8px; right: 8px; max-width: none; }
}
