/**
 * 侧边工具栏样式表  Designed by Fleix 45186482@qq.com 2025年于云南
 * 
 * 这个文件定义了网站右侧固定工具栏的所有样式
 * 包括：基础布局、按钮样式、动画效果、响应式设计等
 * 主要功能：询价、WhatsApp联系、微信联系
 */

/* ==========================================================================
   1. 全局变量
   ========================================================================== */
:root {
    /* 颜色变量 */
    --toolbar-gradient-start: #0099FF;
    --toolbar-gradient-end: #0066FF;
    --toolbar-hover-color: #0055dd;
    --tooltip-bg: rgba(0, 0, 0, 0.8);
    
    /* 尺寸变量 */
    --toolbar-btn-size: 68px;
    --toolbar-btn-size-mobile: 55px;
    --toolbar-border-radius: 12px;
    --toolbar-border-radius-mobile: 10px;
    
    /* 动画变量 */
    --transition-base: all 0.3s ease;
    --float-animation-duration: 4s;
}

/* ==========================================================================
   2. 工具栏容器基础样式
   ========================================================================== */
.side-toolbar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ==========================================================================
   3. 工具栏按钮基础样式
   ========================================================================== */
.toolbar-btn {
    width: var(--toolbar-btn-size);
    height: var(--toolbar-btn-size);
    border-radius: var(--toolbar-border-radius);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--toolbar-gradient-start) 0%, var(--toolbar-gradient-end) 100%);
    box-shadow: 0 4px 15px rgba(0, 136, 255, 0.3);
    color: #fff !important;
    text-decoration: none;
    transition: var(--transition-base);
    position: relative;
    padding: 0;
}

/* 按钮渐变光效果 */
.toolbar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* ==========================================================================
   4. 图标样式
   ========================================================================== */
.toolbar-btn i {
    font-size: 32px;
    color: #fff !important;
    transition: var(--transition-base);
}

/* 确保所有图标保持白色 */
.toolbar-btn i::before,
.wechat-button i.bi-wechat {
    color: #fff !important;
    font-size: 32px !important;
}

/* ==========================================================================
   5. 工具提示样式
   ========================================================================== */
.toolbar-btn .tooltip-text {
    position: absolute;
    right: 85px;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    background-color: var(--tooltip-bg);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 10000;
}

/* 工具提示三角形 */
.toolbar-btn .tooltip-text:after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent var(--tooltip-bg);
}

/* ==========================================================================
   6. 交互效果
   ========================================================================== */
/* 按钮悬停效果 */
.toolbar-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 136, 255, 0.4);
    color: #fff !important;
}

.toolbar-btn:hover::before {
    opacity: 1;
}

.toolbar-btn:hover i {
    transform: scale(1.1);
    color: #fff !important;
}

/* 工具提示显示效果 */
.toolbar-btn:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* 按钮点击效果 */
.toolbar-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 136, 255, 0.4);
    transition: all 0.1s ease;
}

/* ==========================================================================
   7. 特定按钮样式
   ========================================================================== */
/* 统一按钮样式 */
.inquiry-btn,
.whatsapp-btn,
.wechat-btn {
    background: linear-gradient(180deg, var(--toolbar-gradient-start) 0%, var(--toolbar-gradient-end) 100%);
    color: #fff !important;
}

/* WhatsApp按钮特殊样式 */
.whatsapp-btn:hover,
.whatsapp-btn:hover i {
    color: #fff !important;
    text-decoration: none;
}

/* ==========================================================================
   8. 动画效果
   ========================================================================== */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

/* 按钮浮动动画 */
.side-toolbar .toolbar-btn:nth-child(1) {
    animation: float var(--float-animation-duration) ease-in-out infinite;
}

.side-toolbar .toolbar-btn:nth-child(2) {
    animation: float var(--float-animation-duration) ease-in-out infinite;
    animation-delay: 0.5s;
}

.side-toolbar .toolbar-btn:nth-child(3) {
    animation: float var(--float-animation-duration) ease-in-out infinite;
    animation-delay: 1s;
}

/* ==========================================================================
   9. 响应式设计
   ========================================================================== */
@media (max-width: 768px) {
    .side-toolbar {
        right: 10px;
    }
    
    .toolbar-btn {
        width: var(--toolbar-btn-size-mobile);
        height: var(--toolbar-btn-size-mobile);
        border-radius: var(--toolbar-border-radius-mobile);
    }
    
    .toolbar-btn i {
        font-size: 24px;
    }
    
    .toolbar-btn .tooltip-text {
        right: 65px;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ==========================================================================
   10. 微信二维码模态框样式
   ========================================================================== */
.wechat-qr-popup {
    display: none;
}

.wechat-button:hover .wechat-qr-popup {
    display: none;
}

#wechatModal .modal-dialog {
    max-width: 320px;
}

#wechatModal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

#wechatModal .modal-body {
    padding: 1rem;
}