/* ===== Tool Navigation Bar — DRONESHOT.TW ===== */

.tool-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 52px;
    background: rgba(20, 28, 40, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: content-box;
}

.tool-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: rgba(255,255,255, 0.65);
    font-size: 10px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 500;
    padding: 6px 0;
    min-width: 44px;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.tool-nav-item i { font-size: 20px; }
.tool-nav-item.active { color: #FEEEA5; }
.tool-nav-item:not(.active):hover { color: rgba(255,255,255, 0.7); }

/* ===== 統一返回鈕（返回上一層；一律置於 logo 右側）===== */
.app-header { gap: 12px; }            /* 統一 header 元素間距（含 back-btn） */
.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: none;
    font-size: 22px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}
.back-btn:hover { background: rgba(255, 255, 255, 0.18); }

/* ===== 全頁地圖工具：把地圖底部推上來 ===== */
#map { bottom: 52px !important; }
#map-container #map { bottom: auto !important; }
.map-footer { bottom: 52px !important; }
.info-panel { bottom: 68px !important; }
.map-legend { bottom: 68px !important; }

/* ===== 可捲動頁面：footer 留空間 ===== */
.app-footer { padding-bottom: 60px !important; }

/* ===== Mobile ===== */
@media (max-width: 480px) {
    .info-panel ~ .map-legend { bottom: 160px !important; }
}

/* ===== SW 更新提示 toast（nav.js 注入）===== */
.sw-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2);
    background: var(--surface);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    color: var(--text-white);
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 14px;
    white-space: nowrap;
}
.sw-toast-btn {
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.sw-toast-close {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    padding: 2px;
    cursor: pointer;
}
