/* nav.css */

/* [수정] 거리재기 버튼: 우측 하단으로 이동 */
#btn-measure {
    position: absolute !important; 
    bottom: 150px; /* 범례(Legend) 위에 위치하도록 조정 */
    right: 20px;
    top: auto; /* 상단 위치 해제 */
    z-index: 1000;
    
    width: auto !important;
    height: 40px !important; 
    min-width: 110px;
    
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    
    background: white;
    border: 1px solid #ccc;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

#btn-measure:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    background: #fdfdfd;
}

#btn-measure.active {
    background-color: #e74c3c !important;
    color: white !important;
    border-color: #c0392b !important;
}

/* 네비게이션 결과 패널 위치 조정 */
#nav-panel {
    position: absolute;
    bottom: 30px;
    left: 20px; /* 좌측 하단 유지 (우측엔 범례와 버튼이 있으므로) */
    z-index: 2100;
    background: white;
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: none;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: 'Noto Sans KR', sans-serif;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.nav-header {
    padding: 12px 16px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ebebeb;
}

.nav-title { font-weight: 800; font-size: 14px; color: #2c3e50; }
.nav-close { cursor: pointer; font-size: 18px; color: #aaa; transition: 0.2s; }
.nav-close:hover { color: #333; }

.nav-mode-group {
    display: flex;
    gap: 8px;
    padding: 12px 16px 0 16px;
}

.nav-mode-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.nav-mode-btn:hover { background: #f5f5f5; }

.nav-mode-btn[data-mode="walking"].active {
    background: #03c75a; 
    color: white;
    border-color: #03c75a;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(3, 199, 90, 0.3);
}

.nav-mode-btn[data-mode="driving"].active {
    background: #007aff;
    color: white;
    border-color: #007aff;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 122, 255, 0.3);
}

#nav-result {
    padding: 15px 16px 20px 16px;
    text-align: center;
}

.nav-time-big {
    font-size: 26px;
    font-weight: 900;
    color: #222;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.nav-info-detail {
    font-size: 13px;
    color: #666;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.traffic-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f1f3f5;
    color: #888;
    margin-top: 8px;
}

.btn-calc-route {
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
}
.btn-calc-route:hover { background: #0060cb; }

.dist-tooltip {
    background: white;
    border: 1px solid #333;
    color: #333;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.dist-tooltip::before { border-right-color: #333; }