/* 地图导航页面特定样式 */

/* 全局布局调整 */
#mapPage {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background-color: #f5f5f5;
}

/* 顶部导航栏覆盖样式 */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: none;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.header-title h1 {
    font-size: 18px;
    font-weight: 500;
}

/* 移除旧的导航栏元素 */
.page-nav-bar {
    display: none;
}

/* 地图容器 */
.map-container {
    position: absolute;
    top: 0; /* 移除 header 后从顶部开始 */
    left: 0;
    width: 100%;
    height: calc(100% - 56px - 60px);
    /* 减去头部和由于底部抽屉遮挡的部分，但实际上底图应该铺满 */
    height: 100%;
    /* 让地图铺满整个屏幕 */
    z-index: 1;
}

/* 底部抽屉 */
.bottom-sheet {
    position: absolute;
    bottom: 70px; /* 适配新的底部导航栏高度 */
    /* 底部导航栏上方 */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background-color: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    /* 最大高度 */
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 抽屉把手 */
.sheet-handle-bar {
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    cursor: grab;
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background-color: #E0E0E0;
    border-radius: 2px;
}

/* 搜索容器 */
.search-container {
    padding: 0 16px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.search-box {
    flex: 1;
    height: 44px;
    background-color: #F5F5F5;
    border-radius: 22px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: all 0.3s;
}

.search-box:focus-within {
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
    border: 1px solid rgba(22, 119, 255, 0.2);
}

.search-icon {
    margin-right: 8px;
    opacity: 0.6;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #333;
    outline: none;
    width: 100%;
}

.search-box input::placeholder {
    color: #999;
}

.clear-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    flex-shrink: 0;
}

/* 停车场列表 */
.parking-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
    /* 隐藏滚动条但保留功能 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.parking-list::-webkit-scrollbar {
    display: none;
}

.parking-item {
    background: #fff;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.parking-item:last-child {
    border-bottom: none;
}

.parking-info {
    flex: 1;
    margin-right: 16px;
}

.parking-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.parking-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    color: #666;
    gap: 6px;
}

.available-spots {
    color: #999;
}

.available-spots.available {
    color: #52C41A;
    /* 绿色显示有空位 */
    font-weight: 500;
}

.divider {
    color: #E0E0E0;
    font-size: 10px;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    padding: 0 16px;
    background-color: #E8F0FE;
    color: #1677FF;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-btn svg {
    margin-top: 1px;
}

.nav-btn:active {
    background-color: #D2E3FC;
    transform: scale(0.96);
}

/* 适配不同屏幕 */
@media (max-height: 600px) {
    .bottom-sheet {
        max-height: 65vh;
    }
}

/* 修复大屏显示 */
@media (min-width: 480px) {
    .bottom-sheet {
        left: 50%;
        transform: translateX(-50%);
        border-radius: 24px 24px 0 0;
    }
}