/* 侧边栏样式 - 核心修复：添加固定定位 */
.sidebar {
    position: fixed; /* 关键：固定在左侧，不随滚动移动 */
    top: 0;
    left: 0;
    height: 100vh; /* 关键：占满屏幕高度 */
    width: 300px;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 80;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-content {
    padding: 16px;
}

/* 侧边栏切换按钮 - 修复定位 */
.sidebar-toggle {
    position: fixed; /* 关键：改为固定定位，避免随页面滚动 */
    top: 20px;
    left: 300px;
    background: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 0 5px 5px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease;
}

/* 当侧边栏收起时的样式 - 修复地图偏移 */
.sidebar-collapsed {
    transform: translateX(-300px); /* 侧边栏移出左侧屏幕 */
}

/* 修复：将相邻兄弟选择器改为通用兄弟选择器，适配HTML结构 */
.sidebar-collapsed ~ #all_map {
    margin-left: 0; /* 侧边栏收起后，地图占满宽度 */
}


.sidebar-toggle-collapsed {
    left: 10px; /* 按钮随侧边栏收起左移 */
}
/* POI列表项样式 */
.poi-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.poi-item:hover {
    background-color: #f9f9f9;
}

.poi-title {
    font-weight: bold;
    margin-bottom: 4px;
}

.poi-address {
    font-size: 12px;
    color: #666;
}
.edit-name-input {
    width: 180px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
}
.edit-actions {
    display: inline-flex;
    gap: 5px;
    margin-left: 5px;
}
.confirm-btn {
    background-color: #2ecc71; color: white;
}
.cancel-btn {
    background-color: #ecf0f1; color: #333;
}
.address-input-group{
    padding: 0 0;
    display: flex;
    gap: 8px;
    width: 100%;
}
#parseAddressBtn{
    padding: 0 16px ; /* 固定按钮水平内边距 */
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
}
#addressInput{
    flex: 1; /* 输入框自适应占满剩余宽度 */
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    margin: 0;
}
/* 时间输入框适配侧边栏宽度 */
.edit-time-input {
    width: 140px !important; /* 适配侧边栏宽度，避免溢出 */
    padding: 3px 5px !important;
    font-size: 13px !important;
}
/* 编辑按钮组统一样式 */
.edit-actions {
    display: inline-flex !important;
    gap: 4px !important;
    margin-left: 6px !important;
}
/* 标记列表时间栏样式优化 */
.poi-time {
    margin-top: 3px !important;
    color: #777 !important;
    font-size: 11px !important;
}
/* 确保编辑状态下不换行 */
.poi-title {
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    align-items: center !important;
}
/* 时间编辑按钮图标对齐 */
.fa-clock-o {
    font-size: 12px !important;
}