/* 左侧悬浮工具栏样式 */
.float-toolbar {
    position: fixed;
    left: -100px; /* 初始位置在可视区域左侧外 */
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;  /* 初始设置为透明 */
    visibility: hidden;  /* 初始隐藏 */
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); /* 使用更平滑的过渡效果 */
}

/* 显示状态的样式 */
.float-toolbar.visible {
    left: 20px; /* 最终位置 */
    opacity: 1;
    visibility: visible;
}

/* 工具栏项目动画 */
.toolbar-item {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 10px rgba(43, 108, 176, 0.08);
    transition: all 0.3s ease;
    transform: translateX(-50px) scale(0.8);
    opacity: 0;
}

/* 依次延迟每个项目的动画 */
.float-toolbar.visible .toolbar-item:nth-child(1) { transition-delay: 0.1s; }
.float-toolbar.visible .toolbar-item:nth-child(2) { transition-delay: 0.2s; }
.float-toolbar.visible .toolbar-item:nth-child(3) { transition-delay: 0.3s; }
.float-toolbar.visible .toolbar-item:nth-child(4) { transition-delay: 0.4s; }
.float-toolbar.visible .toolbar-item:nth-child(5) { transition-delay: 0.5s; }
.float-toolbar.visible .toolbar-item:nth-child(6) { transition-delay: 0.6s; }

/* 显示时的项目样式 */
.float-toolbar.visible .toolbar-item {
    transform: translateX(0) scale(1);
    opacity: 1;
}

.toolbar-item i {
    color: #2b6cb0;  /* 使用网站主色调 */
    font-size: 20px;
    transition: all 0.3s ease;
}

/* 悬浮效果增强 */
.toolbar-item:hover {
    background: #2b6cb0;
    transform: translateX(5px) scale(1.05) !important;
    box-shadow: 0 4px 15px rgba(43, 108, 176, 0.25);
}

.toolbar-item:hover i {
    color: #fff;
}

/* 弹出框样式 */
.toolbar-popup {
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%) translateX(-20px);
    background: rgba(255, 255, 255, 0.98);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(43, 108, 176, 0.12);
    width: max-content;
    max-width: 300px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(43, 108, 176, 0.1);
}

/* 修复弹出框的显示效果 */
.toolbar-item:hover .toolbar-popup {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    visibility: visible;
    left: 65px;
}

.toolbar-popup h4 {
    color: #2b6cb0;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

.toolbar-popup p {
    color: #4a5568;
    font-size: 15px;
    margin: 5px 0;
    line-height: 1.5;
}

.toolbar-popup .sub-text {
    color: #718096;
    font-size: 13px;
}

/* 语言切换弹出框样式 */
.language-popup {
    padding: 15px;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.language-option {
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #4a5568;
}

.language-option:hover {
    background-color: rgba(43, 108, 176, 0.1);
    color: #2b6cb0;
}

.language-option.active {
    background-color: #2b6cb0;
    color: white;
}

/* 地图预览 */
.map-preview {
    margin-top: 12px;
    width: 240px;
    height: 140px;
    background: #f7fafc;
    border-radius: 6px;
    overflow: hidden;
}

.map-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .float-toolbar {
        left: -80px; /* 移动端初始位置 */
    }
    
    .float-toolbar.visible {
        left: 10px; /* 移动端最终位置 */
    }
    
    .toolbar-item {
        width: 42px;
        height: 42px;
    }

    .toolbar-item i {
        font-size: 18px;
    }
} 