/* 浮动侧边栏 - 蓝色系配色方案 */
:root {
    /* 蓝色系配色变量 */
    --blue-primary: #0066cc;
    --blue-secondary: #0077ee;
    --blue-light: #3399ff;
    --blue-hover: #0055aa;
    --blue-medium: #0088ff;
    --blue-soft: #4da6ff;
    --blue-pale: #66b3ff;
    --blue-lighter: #99ccff;
    --blue-lightest: #cce6ff;
}

/* 主容器 */
.app-icons-container {
    position: fixed;
    right: 25px;
    bottom: 225px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 按钮通用样式 */
.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #0066cc;
    outline: none;
    color: #0066cc;
    text-decoration: none;
    overflow: hidden;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8),
                0 4px 15px rgba(0, 0, 0, 0.15);
}

.app-icon:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: #0052a3;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9),
                0 6px 20px rgba(0, 0, 0, 0.2);
}

.app-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: all 0.3s ease;
}

/* 返回顶部按钮 - 浅蓝色（辅助操作） */
.top-btn {
    /* 初始隐藏状态 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.top-btn.visible {
    /* 显示状态 */
    opacity: 1;
    visibility: visible;
}

/* 电话按钮 - 深蓝色（主操作） */
.phone-btn {
}

/* 微信按钮 - 中等蓝色（次要操作） */
.wechat-btn {
}

/* 留言按钮 - 深蓝色（次要操作） */
.chat-btn {
}

/* 信息面板样式 */
.info-panel {
    position: fixed;
    right: 110px;
    bottom: 225px;
    width: 280px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

.info-panel.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* 面板头部样式 */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.panel-header h3 svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* 关闭按钮样式 */
.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.12);
    transform: scale(1.05);
}

.close-btn svg {
    width: 18px;
    height: 18px;
    fill: #333333;
    display: block;
    flex-shrink: 0;
}

/* 如果按钮内没有内容，添加X图标 */
.close-btn:empty:before {
    content: "×";
    font-size: 20px;
    font-weight: 300;
    color: #333;
    line-height: 1;
}

/* 确保关闭按钮正确显示图标 */
.close-btn {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

/* 电话信息样式 */
.phone-info {
    padding: 24px 20px;
    text-align: center;
}

.phone-number {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    font-family: 'Open Sans', 'Noto Sans SC', Arial, Helvetica, sans-serif !important;
}

/* 微信信息样式 */
.wechat-info {
    padding: 24px 20px;
}

.qrcode-container {
    text-align: center;
}

.qrcode {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.qrcode-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--blue-lightest) 0%, var(--blue-lighter) 100%);
    border: 2px dashed var(--blue-pale);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--blue-secondary);
}

.qrcode-placeholder svg {
    width: 48px;
    height: 48px;
    fill: var(--blue-secondary);
}

.qrcode-placeholder p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* 悬停标签样式 */
.app-icon::before {
    content: attr(aria-label);
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10001;
}

.app-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-icon::before {
        right: 70px;
    }
}

@media (max-width: 480px) {
    .app-icon::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-icons-container {
        right: 20px;
        bottom: 200px;
        gap: 12px;
    }
    
    .app-icon {
        width: 52px;
        height: 52px;
    }
    
    .app-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .info-panel {
        right: 80px;
        bottom: 200px;
        width: 260px;
    }
    
    .app-icon::before {
        right: 70px;
    }
}

@media (max-width: 480px) {
    .app-icons-container {
        right: 15px;
        bottom: 180px;
        gap: 10px;
    }
    
    .app-icon {
        width: 48px;
        height: 48px;
    }
    
    .app-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .info-panel {
        right: 70px;
        bottom: 180px;
        width: 240px;
    }
    
    .app-icon::before {
        display: none;
    }
}

/* 微信面板位置调整 - 位于底部180px */
#chatPanel {
    bottom: 180px !important;
}

/* 电话面板位置调整 - 位于底部235px */
#phonePanel {
    bottom: 235px !important;
}

/* 确保面板在不同屏幕尺寸下的显示 */
@media (max-width: 360px) {
    .info-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
    }
    
    /* 微信面板在超小屏幕下的位置 */
    #chatPanel {
        bottom: 140px !important;
    }
    
    /* 电话面板在超小屏幕下的位置 */
    #phonePanel {
        bottom: 195px !important;
    }
}
