/* ============================================================
   浮动留言板按钮 - 公共样式
   ============================================================ */

/* 浮动按钮容器 */
.float-message-btn {
    position: fixed;
    right: 30px;
    bottom: 120px;
    z-index: 9999;
    cursor: pointer;
    user-select: none;
}

/* 按钮主样式 */
.float-message-btn .btn-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a1e9, #0073fe);
    box-shadow: 0 6px 24px rgba(0, 115, 254, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    color: #fff;
    text-decoration: none;
}

.float-message-btn .btn-wrap:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 32px rgba(0, 115, 254, 0.6);
}

.float-message-btn .btn-wrap:active {
    transform: scale(0.95);
}

/* 按钮图标 - 对话气泡 */
.float-message-btn .icon-msg {
    font-size: 30px;
    line-height: 1;
    display: block;
}

.float-message-btn .icon-label {
    font-size: 11px;
    margin-top: 2px;
    letter-spacing: 1px;
    font-weight: 500;
}

/* 小红点提示（有未读留言时显示） */
.float-message-btn .dot-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    color: #fff;
    animation: pulse-dot 2s infinite;
    display: none; /* 默认隐藏，有留言时通过JS显示 */
}

.float-message-btn .dot-badge.show {
    display: flex;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* 悬浮提示文字（鼠标悬停时显示） */
.float-message-btn .tooltip-text {
    position: absolute;
    right: 82px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.float-message-btn .btn-wrap:hover .tooltip-text {
    opacity: 1;
}

.float-message-btn .tooltip-text::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
}

/* 脉冲光环动画 */
.float-message-btn .ripple-ring {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 2px solid rgba(0, 115, 254, 0.3);
    animation: ripple-ring 2.5s ease-out infinite;
    pointer-events: none;
}

@keyframes ripple-ring {
    0% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .float-message-btn {
        right: 16px;
        bottom: 80px;
    }
    .float-message-btn .btn-wrap {
        width: 60px;
        height: 60px;
    }
    .float-message-btn .icon-msg {
        font-size: 24px;
    }
    .float-message-btn .icon-label {
        font-size: 10px;
    }
    .float-message-btn .tooltip-text {
        display: none;
    }
}